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