From ab95005a05232030a16c2da7a8de867c2ded5f88 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 9 Apr 2025 07:40:01 +0800 Subject: [libc++] P3247R2: Deprecate `is_trivial(_v)` (#130573) Requirements on character-like types are updated unconditionally, because `basic_string` does requires the default-constructibility. It might be possible to make `basic_string_view` support classes with non-public trivial default constructor, but this doesn't seem sensible. libcxxabi's `ItaniumDemangle.h` is also updated to avoid deprecated features. --- libcxxabi/src/demangle/ItaniumDemangle.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libcxxabi') diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h index 3df41b5f4d7d..4122781beb59 100644 --- a/libcxxabi/src/demangle/ItaniumDemangle.h +++ b/libcxxabi/src/demangle/ItaniumDemangle.h @@ -38,8 +38,10 @@ DEMANGLE_NAMESPACE_BEGIN template class PODSmallVector { - static_assert(std::is_trivial::value, - "T is required to be a trivial type"); + static_assert(std::is_trivially_copyable::value, + "T is required to be a trivially copyable type"); + static_assert(std::is_trivially_default_constructible::value, + "T is required to be trivially default constructible"); T *First = nullptr; T *Last = nullptr; T *Cap = nullptr; -- cgit v1.2.3