cstddef.version.pass.cpp 1.3 KB

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