Is it always the case that sizeof(T) >= alignof(T) for all object types T?
At least in standard C++, for anything you can make an array of (with length > 1), this will have to be true. If you have Foo arr[2]; and alignof(Foo) > sizeof(Foo), then arr[0] and arr[1] can’t both be aligned. As Zalman Stern’s example shows, though, at least some compilers will allow you to declare … Read more