From: Giuseppe D'Angelo Date: Mon, 9 Dec 2024 01:11:19 +0000 (+0100) Subject: libstdc++: port bitwise relocatable away from is_trivial X-Git-Tag: basepoints/gcc-16~3493 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4a0157c2397c9b582cff71d114240a6b083a3dc;p=thirdparty%2Fgcc.git libstdc++: port bitwise relocatable away from is_trivial In preparation for the deprecation of is_trivial (P3247R2). "bitwise relocation" (or "trivial relocation" à la P1144/P2786) doesn't need the full-fledged notion of triviality, just checking for a trivial move constructor and a trivial destructor is sufficient. libstdc++-v3/ChangeLog: * include/bits/stl_uninitialized.h: Amended the __is_bitwise_relocatable type trait. Signed-off-by: Giuseppe D'Angelo --- diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index 2190261134e0..916288352d70 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -1248,7 +1248,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Also known as is_trivially_relocatable. template struct __is_bitwise_relocatable - : is_trivial<_Tp> { }; + : __and_, is_trivially_destructible<_Tp>> { }; template