complex.version.pass.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. // <complex>
  12. // Test the feature test macros defined by <complex>
  13. /* Constant Value
  14. __cpp_lib_complex_udls 201309L [C++14]
  15. */
  16. #include <complex>
  17. #include "test_macros.h"
  18. #if TEST_STD_VER < 14
  19. # ifdef __cpp_lib_complex_udls
  20. # error "__cpp_lib_complex_udls should not be defined before c++14"
  21. # endif
  22. #elif TEST_STD_VER == 14
  23. # ifndef __cpp_lib_complex_udls
  24. # error "__cpp_lib_complex_udls should be defined in c++14"
  25. # endif
  26. # if __cpp_lib_complex_udls != 201309L
  27. # error "__cpp_lib_complex_udls should have the value 201309L in c++14"
  28. # endif
  29. #elif TEST_STD_VER == 17
  30. # ifndef __cpp_lib_complex_udls
  31. # error "__cpp_lib_complex_udls should be defined in c++17"
  32. # endif
  33. # if __cpp_lib_complex_udls != 201309L
  34. # error "__cpp_lib_complex_udls should have the value 201309L in c++17"
  35. # endif
  36. #elif TEST_STD_VER > 17
  37. # ifndef __cpp_lib_complex_udls
  38. # error "__cpp_lib_complex_udls should be defined in c++2a"
  39. # endif
  40. # if __cpp_lib_complex_udls != 201309L
  41. # error "__cpp_lib_complex_udls should have the value 201309L in c++2a"
  42. # endif
  43. #endif // TEST_STD_VER > 17
  44. int main(int, char**) { return 0; }