libc++ patch for max_align_t

Because of 17.6.5.2 [res.on.headers]/p3, I do not believe we should make <cstddef> dependent upon (include) <cstdint> or <stdint.h>. Therefore <cstddef> should not reference the typedef uintmax_t. That being said, we could certainly include the aliased type for uintmax_t on any platform we wish to target. On Apple platforms this would be unsigned long long, and for archaic reasons, also unsigned long.

While investigating your question, I think I've uncovered an ancient bug in libc++. The defaulted alignment argument for aligned storage is supposed to be:

The value of default-alignment shall be the most stringent alignment requirement for any C++ object type whose size is no greater than Len (3.9).

If you output the value of __find_max_align<__all_types, _Len>::value for many values of _Len on OS X, you get:

std::__default_align<1>::value = 1
std::__default_align<2>::value = 2
std::__default_align<3>::value = 2
std::__default_align<4>::value = 4
std::__default_align<5>::value = 4
std::__default_align<6>::value = 4
std::__default_align<7>::value = 4
std::__default_align<8>::value = 8
std::__default_align<9>::value = 8
std::__default_align<10>::value = 8
std::__default_align<11>::value = 8
std::__default_align<12>::value = 8
std::__default_align<13>::value = 8
std::__default_align<14>::value = 8
std::__default_align<15>::value = 8
std::__default_align<16>::value = 16
std::__default_align<17>::value = 16
std::__default_align<18>::value = 16
std::__default_align<19>::value = 16
std::__default_align<20>::value = 16
std::__default_align<21>::value = 16
std::__default_align<22>::value = 16
std::__default_align<23>::value = 16
std::__default_align<24>::value = 16
std::__default_align<25>::value = 16
std::__default_align<26>::value = 16
std::__default_align<27>::value = 16
std::__default_align<28>::value = 16
std::__default_align<29>::value = 16
std::__default_align<30>::value = 16
std::__default_align<31>::value = 16
std::__default_align<32>::value = 16
std::__default_align<33>::value = 16
...

I.e. The default alignement for an object 17 bytes big is 16.

However on reflection, I believe this is incorrect. I believe it should look like:

It seems like the old behavior follows the standard more closely. If Len
== 17, then _any_ c++ object with size no greater than Len includes
objects of size 16 and some objects of size 16 maybe have an alignment
requirement of 16.