Is sizeof(T) == sizeof(int)?
问题 I've been poring over the draft standard and can't seem to find what I'm looking for. If I have a standard-layout type struct T { unsigned handle; }; Then I know that reinterpret_cast<unsigned*>(&t) == &t.handle for some T t; The goal is to create some vector<T> v and pass &v[0] to a C function that expects a pointer to an array of unsigned integers. So, does the standard define sizeof(T) == sizeof(unsigned) and does that imply that an array of T would have the same layout as an array of