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