]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/23_containers/vector/bool/element_access/1.cc
libstdc++: Remove dg-options "-std=gnu++23" from remaining tests
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 23_containers / vector / bool / element_access / 1.cc
1 // { dg-do compile { target c++23 } }
2 // { dg-xfail-if "not supported" { debug_mode } }
3
4 #include <vector>
5 #include <testsuite_hooks.h>
6
7 constexpr bool
8 test01()
9 {
10 // P2321R2
11 // constexpr const reference& vector<bool>::operator=(bool x) const noexcept;
12
13 std::vector<bool> v(1);
14 const auto e = v[0];
15 e = true;
16 VERIFY( v[0] );
17
18 return true;
19 }
20
21 int
22 main()
23 {
24 static_assert(test01());
25 }