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 //O --variadics 11 12 // Tests the correctness of parameter replacement, if the parameter is 13 // adjacent to an operator '##'. 14 15 #define CONCAT(a, b) PRIMITIVE_CONCAT(a, b) 16 #define PRIMITIVE_CONCAT(a, b) a ## b 17 18 //R #line 20 "t_1_007.cpp" 19 //R 123 20 CONCAT(1, PRIMITIVE_CONCAT(2, 3)) 21 //R #line 23 "t_1_007.cpp" 22 //R 123 23 CONCAT(1, CONCAT(2, 3)) 24 //R #line 26 "t_1_007.cpp" 25 //R 1 CONCAT(2, 3) 26 PRIMITIVE_CONCAT(1, CONCAT(2, 3)) 27 28 //H 10: t_1_007.cpp(15): #define 29 //H 08: t_1_007.cpp(15): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b) 30 //H 10: t_1_007.cpp(16): #define 31 //H 08: t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b 32 //H 00: t_1_007.cpp(20): CONCAT(1, PRIMITIVE_CONCAT(2, 3)), [t_1_007.cpp(15): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)] 33 //H 00: t_1_007.cpp(20): PRIMITIVE_CONCAT(2, 3), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b] 34 //H 02: 23 35 //H 03: 23 36 //H 02: PRIMITIVE_CONCAT(1, 23) 37 //H 00: t_1_007.cpp(15): PRIMITIVE_CONCAT(1, 23), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b] 38 //H 02: 123 39 //H 03: 123 40 //H 03: 123 41 //H 00: t_1_007.cpp(23): CONCAT(1, CONCAT(2, 3)), [t_1_007.cpp(15): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)] 42 //H 00: t_1_007.cpp(23): CONCAT(2, 3), [t_1_007.cpp(15): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)] 43 //H 02: PRIMITIVE_CONCAT(2, 3) 44 //H 00: t_1_007.cpp(15): PRIMITIVE_CONCAT(2, 3), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b] 45 //H 02: 23 46 //H 03: 23 47 //H 03: 23 48 //H 02: PRIMITIVE_CONCAT(1, 23) 49 //H 00: t_1_007.cpp(15): PRIMITIVE_CONCAT(1, 23), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b] 50 //H 02: 123 51 //H 03: 123 52 //H 03: 123 53 //H 00: t_1_007.cpp(26): PRIMITIVE_CONCAT(1, CONCAT(2, 3)), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b] 54 //H 02: 1CONCAT(2, 3) 55 //H 03: 1CONCAT(2, 3) 56