Change a static_assert to check for is_trivial instead of is_pod, as is mandated by P0767.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2018-01-22 00:17:48 +00:00
parent f7e345ab81
commit 46ea17ee62
2 changed files with 2 additions and 2 deletions

View File

@@ -651,7 +651,7 @@ public:
typedef typename __alloc_traits::pointer pointer; typedef typename __alloc_traits::pointer pointer;
typedef typename __alloc_traits::const_pointer const_pointer; typedef typename __alloc_traits::const_pointer const_pointer;
static_assert(is_pod<value_type>::value, "Character type of basic_string must be a POD"); static_assert(is_trivial<value_type>::value, "Character type of basic_string must be trivial");
static_assert((is_same<_CharT, typename traits_type::char_type>::value), static_assert((is_same<_CharT, typename traits_type::char_type>::value),
"traits_type::char_type must be the same type as CharT"); "traits_type::char_type must be the same type as CharT");
static_assert((is_same<typename allocator_type::value_type, value_type>::value), static_assert((is_same<typename allocator_type::value_type, value_type>::value),

View File

@@ -208,7 +208,7 @@ public:
typedef ptrdiff_t difference_type; typedef ptrdiff_t difference_type;
static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1); static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1);
static_assert(is_pod<value_type>::value, "Character type of basic_string_view must be a POD"); static_assert(is_trivial<value_type>::value, "Character type of basic_string_view must be trivial");
static_assert((is_same<_CharT, typename traits_type::char_type>::value), static_assert((is_same<_CharT, typename traits_type::char_type>::value),
"traits_type::char_type must be the same type as CharT"); "traits_type::char_type must be the same type as CharT");