]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use feature test macros in <bits/stl_construct.h>
authorJonathan Wakely <jwakely@redhat.com>
Mon, 18 Mar 2024 13:09:52 +0000 (13:09 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 22 Mar 2024 22:39:05 +0000 (22:39 +0000)
commit8539c5610a7c36099af2ea756d8bbfa398a40e0b
tree17d0d3d04a2beb838bd9c30908bfed9fd180f61e
parentff773ac3d9c2bec21fa1a56cad99d63a1cf2a74f
libstdc++: Use feature test macros in <bits/stl_construct.h>

The preprocessor checks for __cplusplus in <bits/stl_construct.h> should
use the appropriate feature test macros instead of __cplusplus, namely
__glibcxx_raw_memory_algorithms and __cpp_constexpr_dynamic_alloc.

For the latter, we want to check the compiler macro not the library's
__cpp_lib_constexpr_dynamic_alloc, because the latter is not defined for
freestanding but std::construct_at needs to be.

libstdc++-v3/ChangeLog:

* include/bits/stl_construct.h (destroy_at, construct_at): Guard
with feature test macros instead of just __cplusplus.
libstdc++-v3/include/bits/stl_construct.h