| 1 |
// { dg-do preprocess { target c++23 } } |
| 2 |
// { dg-add-options no_pch } |
| 3 |
|
| 4 |
#include <version> |
| 5 |
|
| 6 |
#ifndef __cpp_lib_expected |
| 7 |
# error "Feature-test macro for expected missing in <version>" |
| 8 |
#elif __cpp_lib_expected != 202211L |
| 9 |
# error "Feature-test macro for expected has wrong value in <version>" |
| 10 |
#endif |
| 11 |
|
| 12 |
#ifndef __cpp_lib_freestanding_expected |
| 13 |
# error "Feature-test macro for freestanding expected missing in <version>" |
| 14 |
#elif __cpp_lib_freestanding_expected != 202311L |
| 15 |
# error "Feature-test macro for freestanding expected has wrong value in <version>" |
| 16 |
#endif |
| 17 |
|
| 18 |
#undef __cpp_lib_expected |
| 19 |
#undef __cpp_lib_freestanding_expected |
| 20 |
#include <expected> |
| 21 |
|
| 22 |
#ifndef __cpp_lib_expected |
| 23 |
# error "Feature-test macro for expected missing in <expected>" |
| 24 |
#elif __cpp_lib_expected != 202211L |
| 25 |
# error "Feature-test macro for expected has wrong value in <expected>" |
| 26 |
#endif |
| 27 |
|
| 28 |
#ifndef __cpp_lib_freestanding_expected |
| 29 |
# error "Feature-test macro for freestanding expected missing in <expected>" |
| 30 |
#elif __cpp_lib_freestanding_expected != 202311L |
| 31 |
# error "Feature-test macro for freestanding expected has wrong value in <expected>" |
| 32 |
#endif |