• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Boost.Wave: A Standard compliant C++ preprocessor library
3     http://www.boost.org/
4 
5     Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
6     Software License, Version 1.0. (See accompanying file
7     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 =============================================================================*/
9 
10 // Tests, whether adjacent tokens are separated by whitespace if the adjacency
11 // is created by macro expansion
12 
13 #define A(x) x
14 
15 //R #line 16 "t_9_010.cpp"
16 A(1)1         //R 1 1
17 A(1)X         //R 1 X
18 A(X)1         //R X 1
19 A(X)X         //R X X
20 
21 #define CAT(a, b) PRIMITIVE_CAT(a, b)
22 #define PRIMITIVE_CAT(a, b) a ## b
23 
24 #define X() B
25 #define ABC 1
26 
27 //R #line 28 "t_9_010.cpp"
28 CAT(A, X() C) //R AB C
29 CAT(A, X()C)  //R AB C
30 
31 //H 10: t_9_010.cpp(13): #define
32 //H 08: t_9_010.cpp(13): A(x)=x
33 //H 00: t_9_010.cpp(16): A(1), [t_9_010.cpp(13): A(x)=x]
34 //H 02: 1
35 //H 03: 1
36 //H 00: t_9_010.cpp(17): A(1), [t_9_010.cpp(13): A(x)=x]
37 //H 02: 1
38 //H 03: 1
39 //H 00: t_9_010.cpp(18): A(X), [t_9_010.cpp(13): A(x)=x]
40 //H 02: X
41 //H 03: X
42 //H 00: t_9_010.cpp(19): A(X), [t_9_010.cpp(13): A(x)=x]
43 //H 02: X
44 //H 03: X
45 //H 10: t_9_010.cpp(21): #define
46 //H 08: t_9_010.cpp(21): CAT(a, b)=PRIMITIVE_CAT(a, b)
47 //H 10: t_9_010.cpp(22): #define
48 //H 08: t_9_010.cpp(22): PRIMITIVE_CAT(a, b)=a ## b
49 //H 10: t_9_010.cpp(24): #define
50 //H 08: t_9_010.cpp(24): X()=B
51 //H 10: t_9_010.cpp(25): #define
52 //H 08: t_9_010.cpp(25): ABC=1
53 //H 00: t_9_010.cpp(28): CAT(A, X() C), [t_9_010.cpp(21): CAT(a, b)=PRIMITIVE_CAT(a, b)]
54 //H 00: t_9_010.cpp(28): X(), [t_9_010.cpp(24): X()=B]
55 //H 02: B
56 //H 03: B
57 //H 02: PRIMITIVE_CAT(A,  B C)
58 //H 00: t_9_010.cpp(21): PRIMITIVE_CAT(A, B C), [t_9_010.cpp(22): PRIMITIVE_CAT(a, b)=a ## b]
59 //H 02: AB C
60 //H 03: AB C
61 //H 03: AB C
62 //H 00: t_9_010.cpp(29): CAT(A, X()C), [t_9_010.cpp(21): CAT(a, b)=PRIMITIVE_CAT(a, b)]
63 //H 00: t_9_010.cpp(29): X(), [t_9_010.cpp(24): X()=B]
64 //H 02: B
65 //H 03: B
66 //H 02: PRIMITIVE_CAT(A,  BC)
67 //H 00: t_9_010.cpp(21): PRIMITIVE_CAT(A, BC), [t_9_010.cpp(22): PRIMITIVE_CAT(a, b)=a ## b]
68 //H 02: ABC
69 //H 03: ABC
70 //H 03: ABC
71