libcxx

libcxx mirror with random patches
git clone https://git.neptards.moe/neptards/libcxx.git
Log | Files | Refs

locale.version.pass.cpp (1503B)


      1 //===----------------------------------------------------------------------===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is dual licensed under the MIT and the University of Illinois Open
      6 // Source Licenses. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 //
     10 // WARNING: This test was generated by generate_feature_test_macro_components.py
     11 // and should not be edited manually.
     12 
     13 // <locale>
     14 
     15 // Test the feature test macros defined by <locale>
     16 
     17 /*  Constant             Value
     18     __cpp_lib_char8_t    201811L [C++2a]
     19 */
     20 
     21 #include <locale>
     22 #include "test_macros.h"
     23 
     24 #if TEST_STD_VER < 14
     25 
     26 # ifdef __cpp_lib_char8_t
     27 #   error "__cpp_lib_char8_t should not be defined before c++2a"
     28 # endif
     29 
     30 #elif TEST_STD_VER == 14
     31 
     32 # ifdef __cpp_lib_char8_t
     33 #   error "__cpp_lib_char8_t should not be defined before c++2a"
     34 # endif
     35 
     36 #elif TEST_STD_VER == 17
     37 
     38 # ifdef __cpp_lib_char8_t
     39 #   error "__cpp_lib_char8_t should not be defined before c++2a"
     40 # endif
     41 
     42 #elif TEST_STD_VER > 17
     43 
     44 # if defined(__cpp_char8_t)
     45 #   ifndef __cpp_lib_char8_t
     46 #     error "__cpp_lib_char8_t should be defined in c++2a"
     47 #   endif
     48 #   if __cpp_lib_char8_t != 201811L
     49 #     error "__cpp_lib_char8_t should have the value 201811L in c++2a"
     50 #   endif
     51 # else
     52 #   ifdef __cpp_lib_char8_t
     53 #     error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!"
     54 #   endif
     55 # endif
     56 
     57 #endif // TEST_STD_VER > 17
     58 
     59 int main() {}