t_1_034.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. http://www.boost.org/
  4. Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying file
  6. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. =============================================================================*/
  8. // Tests empty __VA_ARGS__ expansion
  9. //O --variadics
  10. #define MACRO1(x, ...) x -> __VA_ARGS__
  11. #define MACRO2(...) __VA_ARGS__
  12. #define STR(...) #__VA_ARGS__
  13. //R #line 19 "t_1_034.cpp"
  14. MACRO1(1,) //R 1 ->
  15. MACRO2(1, 2) //R 1, 2
  16. STR() //R ""
  17. //H 10: t_1_034.cpp(14): #define
  18. //H 08: t_1_034.cpp(14): MACRO1(x, ...)=x -> __VA_ARGS__
  19. //H 10: t_1_034.cpp(15): #define
  20. //H 08: t_1_034.cpp(15): MACRO2(...)=__VA_ARGS__
  21. //H 10: t_1_034.cpp(16): #define
  22. //H 08: t_1_034.cpp(16): STR(...)=#__VA_ARGS__
  23. //H 00: t_1_034.cpp(19): MACRO1(1,§), [t_1_034.cpp(14): MACRO1(x, ...)=x -> __VA_ARGS__]
  24. //H 02: 1 ->
  25. //H 03: 1 ->
  26. //H 00: t_1_034.cpp(20): MACRO2(1, 2), [t_1_034.cpp(15): MACRO2(...)=__VA_ARGS__]
  27. //H 02: 1, 2
  28. //H 03: 1, 2
  29. //H 00: t_1_034.cpp(21): STR(§), [t_1_034.cpp(16): STR(...)=#__VA_ARGS__]
  30. //H 02: ""
  31. //H 03: ""
  32. // boostinspect:noascii this file needs to contain non-ASCII characters