[PATCH] D73245: Depend stddef.h to provide max_align_t for C++11 and provide better fallback in <new>
Eric Fiselier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 26 14:11:39 PST 2020
EricWF added a subscriber: ldionne.
EricWF added a comment.
@ldionne Since this has the possibility of breaking existing users of `std::max_align_t`, can you test this against your c++03 codebases?
@joerg I still don't understand why you need this change. Why can't we provide the name in C++03 mode?
I'll repeat: libc++ does not provide a C++03 mode. Only a C++11 mode that tolerates C++03 compilers.
C++03 conformance is not a valid reason for this change.
================
Comment at: libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp:144
void* p = nullptr;
+#if TEST_STD_VER >= 11
size_t over_align_val = TEST_ALIGNOF(std::max_align_t) * 2;
----------------
Tests under `test/libcxx` can use the `__libcpp_max_align_t` name directly, instead of being disabled.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73245/new/
https://reviews.llvm.org/D73245
More information about the llvm-commits
mailing list