diff options
| author | A. Jiang <de34@live.cn> | 2025-04-09 07:40:01 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-09 07:40:01 +0800 |
| commit | ab95005a05232030a16c2da7a8de867c2ded5f88 (patch) | |
| tree | 46050026531cea7e087ab3fdbd5f8a7edbd91f0c /libcxxabi | |
| parent | 36cb81cced6cb9ab8a68a4313963d4ccf7669e76 (diff) | |
[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.
Diffstat (limited to 'libcxxabi')
| -rw-r--r-- | libcxxabi/src/demangle/ItaniumDemangle.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 T, size_t N> class PODSmallVector { - static_assert(std::is_trivial<T>::value, - "T is required to be a trivial type"); + static_assert(std::is_trivially_copyable<T>::value, + "T is required to be a trivially copyable type"); + static_assert(std::is_trivially_default_constructible<T>::value, + "T is required to be trivially default constructible"); T *First = nullptr; T *Last = nullptr; T *Cap = nullptr; |
