File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1209,6 +1209,10 @@ public:
12091209 "Bad char_traits for basic_string_view; "
12101210 "N4659 24.4.2 [string.view.template]/1 \"the type traits::char_type shall name the same type as charT.\"");
12111211
1212+ static_assert(!is_array_v<_Elem> && is_trivial_v<_Elem> && is_standard_layout_v<_Elem>,
1213+ "The character type of basic_string_view must be a non-array trivial standard-layout type. See N4861 "
1214+ "[strings.general]/1.");
1215+
12121216 using traits_type = _Traits;
12131217 using value_type = _Elem;
12141218 using pointer = _Elem*;
@@ -2290,6 +2294,10 @@ private:
22902294 "N4659 24.3.2.1 [string.require]/3 requires that the supplied "
22912295 "char_traits character type match the string's character type.");
22922296
2297+ static_assert(!is_array_v<_Elem> && is_trivial_v<_Elem> && is_standard_layout_v<_Elem>,
2298+ "The character type of basic_string must be a non-array trivial standard-layout type. See N4861 "
2299+ "[strings.general]/1.");
2300+
22932301public:
22942302 using traits_type = _Traits;
22952303 using allocator_type = _Alloc;
Original file line number Diff line number Diff line change @@ -551,9 +551,6 @@ std/containers/sequences/array/array.data/data_const.pass.cpp FAIL
551551std/containers/sequences/array/array.data/data.pass.cpp FAIL
552552std/containers/sequences/array/iterators.pass.cpp FAIL
553553
554- # STL bug: string_view doesn't enforce "non-array trivial standard-layout", related to LWG-3034.
555- std/strings/string.view/char.bad.fail.cpp:0 FAIL
556-
557554# Predicate count assertions - IDL2 is slightly bending the Standard's rules here.
558555std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp FAIL
559556std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp FAIL
Original file line number Diff line number Diff line change @@ -551,9 +551,6 @@ containers\sequences\array\array.data\data_const.pass.cpp
551551containers\sequences\array\array.data\data.pass.cpp
552552containers\sequences\array\iterators.pass.cpp
553553
554- # STL bug: string_view doesn't enforce "non-array trivial standard-layout", related to LWG-3034.
555- strings\string.view\char.bad.fail.cpp
556-
557554# Predicate count assertions - IDL2 is slightly bending the Standard's rules here.
558555algorithms\alg.sorting\alg.heap.operations\make.heap\make_heap_comp.pass.cpp
559556algorithms\alg.sorting\alg.merge\inplace_merge_comp.pass.cpp
You can’t perform that action at this time.
0 commit comments