t_1_001.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. // Test macro expansion order
  9. #define A(x, y) x,y
  10. #define B(x, y) [x][y]
  11. #define C(x) B(x)
  12. //R #line 16 "t_1_001.cpp"
  13. C(A(2,3)) //R [2][3]
  14. C( A(2 , 3) ) //R [ 2 ][ 3 ]
  15. //H 10: t_1_001.cpp(11): #define
  16. //H 08: t_1_001.cpp(11): A(x, y)=x,y
  17. //H 10: t_1_001.cpp(12): #define
  18. //H 08: t_1_001.cpp(12): B(x, y)=[x][y]
  19. //H 10: t_1_001.cpp(13): #define
  20. //H 08: t_1_001.cpp(13): C(x)=B(x)
  21. //H 00: t_1_001.cpp(16): C(A(2,3)), [t_1_001.cpp(13): C(x)=B(x)]
  22. //H 00: t_1_001.cpp(16): A(2,3), [t_1_001.cpp(11): A(x, y)=x,y]
  23. //H 02: 2,3
  24. //H 03: 2,3
  25. //H 02: B(2,3)
  26. //H 00: t_1_001.cpp(13): B(2,3), [t_1_001.cpp(12): B(x, y)=[x][y]]
  27. //H 02: [2][3]
  28. //H 03: [2][3]
  29. //H 03: [2][3]
  30. //H 00: t_1_001.cpp(17): C( A(2 , 3) ), [t_1_001.cpp(13): C(x)=B(x)]
  31. //H 00: t_1_001.cpp(17): A(2 , 3), [t_1_001.cpp(11): A(x, y)=x,y]
  32. //H 02: 2 , 3
  33. //H 03: 2 , 3
  34. //H 02: B( 2 , 3 )
  35. //H 00: t_1_001.cpp(13): B( 2 , 3 ), [t_1_001.cpp(12): B(x, y)=[x][y]]
  36. //H 02: [ 2 ][ 3 ]
  37. //H 03: [ 2 ][ 3 ]
  38. //H 03: [ 2 ][ 3 ]