C++ Logo

std-proposals

Advanced search

Re: Allowing access to object representations

From: Language Lawyer <language.lawyer_at_[hidden]>
Date: Sat, 17 Aug 2019 22:16:02 +0300
> I am probably missing something here, but can't we solve this in C++20 by doing a std::bit_cast<std::byte[sizeof(T)]>?

std::bless<std::byte[sizeof(T)]> (or how it is currently named), when it is added to the standard, will kinda allow accessing object representation without introducing very non-trivial changes to the C++ memory and object model.

Received on 2019-08-17 14:18:06