]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/21_strings/char_traits/requirements/version.cc
libstdc++: Disable hosted-only tests [PR103626]
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 21_strings / char_traits / requirements / version.cc
CommitLineData
3da80ed7 1// { dg-do compile { target c++17 } }
7cc9022f 2// { dg-require-effective-target hosted }
3da80ed7
JW
3
4#include <version>
5
6#ifndef __cpp_lib_constexpr_string
7# error Feature-test macro for constexpr char_traits is missing in <version>
8#elif __cpp_lib_constexpr_string < (__cplusplus == 201703 ? 201611 : 201811)
9# error Feature-test macro for constexpr char_traits has the wrong value in <version>
10#endif
11
12// We also provide this non-standard macro for P0426R1 and P1032R1.
13#ifndef __cpp_lib_constexpr_char_traits
14# error Feature-test macro for constexpr char_traits is missing in <version>
15#elif __cpp_lib_constexpr_char_traits != (__cplusplus == 201703 ? 201611 : 201811)
16# error Feature-test macro for constexpr char_traits has the wrong value in <version>
17#endif