t_9_017.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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, whether true and false are usable a 'normal' identifiers
  9. #define true 1
  10. #define false 0
  11. //R #line 18 "t_9_017.cpp"
  12. //R 1 is defined
  13. #if defined(true)
  14. true is defined
  15. #else
  16. true is not defined
  17. #endif
  18. //R #line 26 "t_9_017.cpp"
  19. //R 0 is defined
  20. #if defined(false)
  21. false is defined
  22. #else
  23. false is not defined
  24. #endif
  25. #undef true
  26. #undef false
  27. //R #line 37 "t_9_017.cpp"
  28. //R true is not defined
  29. #ifndef true
  30. true is not defined
  31. #else
  32. true is defined
  33. #endif
  34. //R #line 45 "t_9_017.cpp"
  35. //R false is not defined
  36. #ifndef false
  37. false is not defined
  38. #else
  39. false is defined
  40. #endif
  41. //H 10: t_9_017.cpp(12): #define
  42. //H 08: t_9_017.cpp(12): true=1
  43. //H 10: t_9_017.cpp(13): #define
  44. //H 08: t_9_017.cpp(13): false=0
  45. //H 10: t_9_017.cpp(17): #if
  46. //H 11: t_9_017.cpp(17): #if defined(true): 1
  47. //H 01: t_9_017.cpp(12): true
  48. //H 02: 1
  49. //H 03: 1
  50. //H 10: t_9_017.cpp(19): #else
  51. //H 10: t_9_017.cpp(25): #if
  52. //H 11: t_9_017.cpp(25): #if defined(false): 1
  53. //H 01: t_9_017.cpp(13): false
  54. //H 02: 0
  55. //H 03: 0
  56. //H 10: t_9_017.cpp(27): #else
  57. //H 10: t_9_017.cpp(31): #undef
  58. //H 09: t_9_017.cpp(31): true
  59. //H 10: t_9_017.cpp(32): #undef
  60. //H 09: t_9_017.cpp(32): false
  61. //H 10: t_9_017.cpp(36): #ifndef
  62. //H 11: t_9_017.cpp(36): #ifndef true: 0
  63. //H 10: t_9_017.cpp(38): #else
  64. //H 10: t_9_017.cpp(44): #ifndef
  65. //H 11: t_9_017.cpp(44): #ifndef false: 0
  66. //H 10: t_9_017.cpp(46): #else