1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// WARNING: This test was generated by generate_feature_test_macro_components.py
10// and should not be edited manually.
11
12// UNSUPPORTED: no-localization
13
14// <iomanip>
15
16// Test the feature test macros defined by <iomanip>
17
18// clang-format off
19
20#include <iomanip>
21#include "test_macros.h"
22
23#if TEST_STD_VER < 14
24
25# ifdef __cpp_lib_quoted_string_io
26# error "__cpp_lib_quoted_string_io should not be defined before c++14"
27# endif
28
29#elif TEST_STD_VER == 14
30
31# if !defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION
32# ifndef __cpp_lib_quoted_string_io
33# error "__cpp_lib_quoted_string_io should be defined in c++14"
34# endif
35# if __cpp_lib_quoted_string_io != 201304L
36# error "__cpp_lib_quoted_string_io should have the value 201304L in c++14"
37# endif
38# else
39# ifdef __cpp_lib_quoted_string_io
40# error "__cpp_lib_quoted_string_io should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION' is not met!"
41# endif
42# endif
43
44#elif TEST_STD_VER == 17
45
46# if !defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION
47# ifndef __cpp_lib_quoted_string_io
48# error "__cpp_lib_quoted_string_io should be defined in c++17"
49# endif
50# if __cpp_lib_quoted_string_io != 201304L
51# error "__cpp_lib_quoted_string_io should have the value 201304L in c++17"
52# endif
53# else
54# ifdef __cpp_lib_quoted_string_io
55# error "__cpp_lib_quoted_string_io should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION' is not met!"
56# endif
57# endif
58
59#elif TEST_STD_VER == 20
60
61# if !defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION
62# ifndef __cpp_lib_quoted_string_io
63# error "__cpp_lib_quoted_string_io should be defined in c++20"
64# endif
65# if __cpp_lib_quoted_string_io != 201304L
66# error "__cpp_lib_quoted_string_io should have the value 201304L in c++20"
67# endif
68# else
69# ifdef __cpp_lib_quoted_string_io
70# error "__cpp_lib_quoted_string_io should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION' is not met!"
71# endif
72# endif
73
74#elif TEST_STD_VER == 23
75
76# if !defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION
77# ifndef __cpp_lib_quoted_string_io
78# error "__cpp_lib_quoted_string_io should be defined in c++23"
79# endif
80# if __cpp_lib_quoted_string_io != 201304L
81# error "__cpp_lib_quoted_string_io should have the value 201304L in c++23"
82# endif
83# else
84# ifdef __cpp_lib_quoted_string_io
85# error "__cpp_lib_quoted_string_io should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION' is not met!"
86# endif
87# endif
88
89#elif TEST_STD_VER > 23
90
91# if !defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION
92# ifndef __cpp_lib_quoted_string_io
93# error "__cpp_lib_quoted_string_io should be defined in c++26"
94# endif
95# if __cpp_lib_quoted_string_io != 201304L
96# error "__cpp_lib_quoted_string_io should have the value 201304L in c++26"
97# endif
98# else
99# ifdef __cpp_lib_quoted_string_io
100# error "__cpp_lib_quoted_string_io should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION' is not met!"
101# endif
102# endif
103
104#endif // TEST_STD_VER > 23
105
106// clang-format on
107
108

source code of libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.compile.pass.cpp