t_9_005.cpp 1.2 KB

123456789101112131415161718192021222324252627
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. http://www.boost.org/
  4. Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying file
  6. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. =============================================================================*/
  8. // Tests, if no universal character values are to be generated accidently by
  9. // concatenation
  10. #define CONCAT(a, b) PRIMITIVE_CONCAT(a, b)
  11. #define PRIMITIVE_CONCAT(a, b) a ## b
  12. #define STRINGIZE(x) STRINGIZE_D(x)
  13. #define STRINGIZE_D(x) # x
  14. //R #line 19 "t_9_005.cpp"
  15. STRINGIZE( CONCAT(\, u00ff) ) //R "\u00ff"
  16. STRINGIZE( CONCAT(\u00, ff) ) //R "\u00ff"
  17. STRINGIZE( CONCAT(\u00ff, 56) ) //R "\u00ff56"
  18. CONCAT(\, u00ff) //R \u00ff
  19. CONCAT(\u00, ff) //R \ u00ff
  20. CONCAT(\u00ff, 56) //R \u00ff56
  21. //E t_9_005.cpp(27): error: a universal character name cannot designate a character in the basic character set: \u0061
  22. STRINGIZE( CONCAT(\, u0061) ) // reports an error