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 delayed macro expansion (rescanning)
11
12#define CONCAT_1(A, B) A ## B
13#define CONCAT_2(A, B) CONCAT_1(A, B)
14
15#define DELAY(NAME) NAME
16
17#define A1 a
18#define B1 b
19
20#define A2() a
21#define B2() b
22
23#define LHS (
24#define RHS )
25
26//R #line 27 "t_1_027.cpp"
27DELAY(CONCAT_1)( a, b ) (); //R ab ();
28DELAY(CONCAT_1)(A1, B1)(); //R A1B1();
29DELAY(CONCAT_1) LHS A1, B1 RHS (); //R CONCAT_1 ( a, b )();
30CONCAT_1 ( a, b ) (); //R ab ();
31CONCAT_1 ( A1, B1 ) (); //R A1B1 ();
32CONCAT_1 LHS a, b RHS (); //R CONCAT_1 ( a, b )();
33//R
34DELAY(CONCAT_2)( a, b ) (); //R ab ();
35DELAY(CONCAT_2)(A1, B1)(); //R ab();
36DELAY(CONCAT_2) LHS A1, B1 RHS (); //R CONCAT_2 ( a, b )();
37DELAY(CONCAT_2)(A2(), B2())(); //R ab();
38CONCAT_2 ( a, b ) (); //R ab ();
39CONCAT_2 ( A1, B1 ) (); //R ab ();
40CONCAT_2 LHS a, b RHS (); //R CONCAT_2 ( a, b )();
41CONCAT_2(A2(), B2())(); //R ab();
42

source code of boost/libs/wave/test/testwave/testfiles/t_1_027.cpp