summaryrefslogtreecommitdiff
path: root/libs/wave/test/testwave/testfiles/t_1_006.cpp
blob: 0635181059c2f17f21a36945ba9ff621ffbe1ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*=============================================================================
    Boost.Wave: A Standard compliant C++ preprocessor library
    http://www.boost.org/

    Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
    Software License, Version 1.0. (See accompanying file
    LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/

// Tests the correctness of parameter replacement, if the parameter is
// adjacent to an operator '##'.

#define CONCAT(a, b) PRIMITIVE_CONCAT(a, b)
#define PRIMITIVE_CONCAT(a, b) a ## b

//R #line 18 "t_1_006.cpp"
//R 123
CONCAT(1, PRIMITIVE_CONCAT(2, 3))
//R #line 21 "t_1_006.cpp"
//R 123
CONCAT(1, CONCAT(2, 3))
// E t_1_006.cpp(23): error: pasting the following two tokens does not give a valid preprocessing token: "1" and "CONCAT"
//R #line 25 "t_1_006.cpp"
//R 1 CONCAT(2, 3)
PRIMITIVE_CONCAT(1, CONCAT(2, 3))

//H 10: t_1_006.cpp(13): #define
//H 08: t_1_006.cpp(13): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)
//H 10: t_1_006.cpp(14): #define
//H 08: t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b
//H 00: t_1_006.cpp(18): CONCAT(1, PRIMITIVE_CONCAT(2, 3)), [t_1_006.cpp(13): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
//H 00: t_1_006.cpp(18): PRIMITIVE_CONCAT(2, 3), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
//H 02: 23
//H 03: 23
//H 02: PRIMITIVE_CONCAT(1,  23)
//H 00: t_1_006.cpp(13): PRIMITIVE_CONCAT(1, 23), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
//H 02: 123
//H 03: 123
//H 03: 123
//H 00: t_1_006.cpp(21): CONCAT(1, CONCAT(2, 3)), [t_1_006.cpp(13): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
//H 00: t_1_006.cpp(21): CONCAT(2, 3), [t_1_006.cpp(13): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
//H 02: PRIMITIVE_CONCAT(2,  3)
//H 00: t_1_006.cpp(13): PRIMITIVE_CONCAT(2, 3), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
//H 02: 23
//H 03: 23
//H 03: 23
//H 02: PRIMITIVE_CONCAT(1,  23)
//H 00: t_1_006.cpp(13): PRIMITIVE_CONCAT(1, 23), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
//H 02: 123
//H 03: 123
//H 03: 123
//H 00: t_1_006.cpp(25): PRIMITIVE_CONCAT(1, CONCAT(2, 3)), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
//H 02: 1CONCAT(2, 3)
//H 03: 1CONCAT(2, 3)