| 1 |
// { dg-do preprocess { target c++26 } } |
| 2 |
// { dg-add-options no_pch } |
| 3 |
|
| 4 |
#include <numeric> |
| 5 |
|
| 6 |
#ifndef __cpp_lib_saturation_arithmetic |
| 7 |
# error "Feature test macro for saturation arithmetic is missing in <numeric>" |
| 8 |
#elif __cpp_lib_saturation_arithmetic < 202311L |
| 9 |
# error "Feature test macro for saturation arithmetic has wrong value in <numeric>" |
| 10 |
#endif |
| 11 |
|
| 12 |
#undef __cpp_lib_saturation_arithmetic |
| 13 |
#include <version> |
| 14 |
|
| 15 |
#ifndef __cpp_lib_saturation_arithmetic |
| 16 |
# error "Feature test macro for saturation arithmetic is missing in <version>" |
| 17 |
#elif __cpp_lib_saturation_arithmetic < 202311L |
| 18 |
# error "Feature test macro for saturation arithmetic has wrong value in <version>" |
| 19 |
#endif |