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, if no universal character values are to be generated accidently by 11 // concatenation 12 13 #define CONCAT(a, b) PRIMITIVE_CONCAT(a, b) 14 #define PRIMITIVE_CONCAT(a, b) a ## b 15 #define STRINGIZE(x) STRINGIZE_D(x) 16 #define STRINGIZE_D(x) # x 17 18 //R #line 19 "t_9_005.cpp" 19 STRINGIZE( CONCAT(\, u00ff) ) //R "\u00ff" 20 STRINGIZE( CONCAT(\u00, ff) ) //R "\u00ff" 21 STRINGIZE( CONCAT(\u00ff, 56) ) //R "\u00ff56" 22 CONCAT(\, u00ff) //R \u00ff 23 CONCAT(\u00, ff) //R \ u00ff 24 CONCAT(\u00ff, 56) //R \u00ff56 25 26 //E t_9_005.cpp(27): error: a universal character name cannot designate a character in the basic character set: \u0061 27 STRINGIZE( CONCAT(\, u0061) ) // reports an error 28