]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/21_strings/basic_string/version.cc
libstdc++: Disable hosted-only tests [PR103626]
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 21_strings / basic_string / version.cc
CommitLineData
b96e2ff9 1// { dg-do compile { target c++17 } }
7cc9022f 2// { dg-require-effective-target hosted }
b96e2ff9
ML
3
4#include <version>
5
6#ifndef __cpp_lib_constexpr_string
7# error "Feature-test macro for constexpr std::string missing in <version>"
8#endif
9
10#if __cplusplus == 201703L
11# if __cpp_lib_constexpr_string != 201611L
12# error "Feature-test macro for constexpr std::string has wrong value for C++17 in <version>"
13# endif
14#endif
15
16#if __cplusplus == 202002L
17# if _GLIBCXX_USE_CXX11_ABI
18# if __cpp_lib_constexpr_string != 201907L
19# error "Feature-test macro for constexpr std::string has wrong value for C++20 in <version>"
20# endif
21# else // COW strings
22# if __cpp_lib_constexpr_string != 201811L
23# error "Feature-test macro for constexpr std::string has wrong value for C++20 in <version>"
24# endif
25# endif
26#endif