Debian Codegraph @

libstdc++-v3/testsuite/23_containers/vector/bool/element_access/1.cc

raw
1 // { dg-do compile { target c++23 } }
2
3 #include <vector>
4 #include <testsuite_hooks.h>
5
6 constexpr bool
7 test01()
8 {
9 // P2321R2
10 // constexpr const reference& vector<bool>::operator=(bool x) const noexcept;
11
12 std::vector<bool> v(1);
13 const auto e = v[0];
14 e = true;
15 VERIFY( v[0] );
16
17 return true;
18 }
19
20 int
21 main()
22 {
23 static_assert(test01());
24 }