What is the memory representation of this structure?
struct S { constexpr static unsigned x = -1; S&& s; } What is the memory representation of this structure?
struct S { constexpr static unsigned x = -1; S&& s; } Source: https://ru.stackoverflow.com/questions/571288/
All Articles
unsigned x = -1want to give a little bit of my hands ... - pavelconstexpr static- in general, more than can be inline.S&&- is the link - sizesize_t? - pavelxwill definitely be outside the structure, even if the compiler foolishly allocates memory for it - because it isstatic. So all that will be stored is a link, but physically, as I understand it, there is always an address ... So, the whole structure will consist of one address. - Harry