In this video , at about 6.39, the presenter seems to say that he newalways returns memory aligned to std::max_align_tthat, because he operator newdoes not know anything about the type of allocated variable. That is, the compiler must choose the very lowercase alignment. But I can not find it in the Standard.
The host also says that this rule does not apply when newused to allocate arrays charor unsigned char. In this case, alignment depends on the size. But it was not clear to me either.
source
share