Debian Codegraph @

libstdc++-v3/testsuite/20_util/expected/synopsis.cc

raw
1 // { dg-do compile { target c++23 } }
2 // { dg-require-normal-namespace "" }
3 // { dg-add-options no_pch }
4
5 #include <expected>
6
7 #ifndef __cpp_lib_expected
8 # error "Feature-test macro for expected missing in <expected>"
9 #elif __cpp_lib_expected != 202211L
10 # error "Feature-test macro for expected has wrong value in <expected>"
11 #endif
12
13 namespace std
14 {
15 template<class E> class unexpected;
16 template<class E> class bad_expected_access;
17 template<> class bad_expected_access<void>;
18 struct unexpect_t;
19 extern inline const unexpect_t unexpect;
20 template<class T, class E> class expected;
21 template<class T, class E> requires is_void_v<T> class expected<T, E>;
22 }