summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string_view
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-03-21 00:36:05 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-03-21 00:36:05 +0000
commit4a6f3c471040807e0ef6534893fdc3fbcdd796a4 (patch)
treeeb919bcc4cf2055f37db18d69a06a34a69f91df9 /libcxx/include/string_view
parent1c1057af0b56f7d8defbf81c64a53e55cc95c147 (diff)
downloadbcm5719-llvm-4a6f3c471040807e0ef6534893fdc3fbcdd796a4.tar.gz
bcm5719-llvm-4a6f3c471040807e0ef6534893fdc3fbcdd796a4.zip
Implement LWG3034: P0767R1 breaks previously-standard-layout types
llvm-svn: 328064
Diffstat (limited to 'libcxx/include/string_view')
-rw-r--r--libcxx/include/string_view4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/include/string_view b/libcxx/include/string_view
index fd8c3790bae..6377aeb6d64 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -208,7 +208,9 @@ public:
typedef ptrdiff_t difference_type;
static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1);
- static_assert(is_trivial<value_type>::value, "Character type of basic_string_view must be trivial");
+ static_assert((!is_array<value_type>::value), "Character type of basic_string_view must not be an array");
+ static_assert(( is_standard_layout<value_type>::value), "Character type of basic_string_view must be standard-layout");
+ 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),
"traits_type::char_type must be the same type as CharT");
OpenPOWER on IntegriCloud