1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
/*=============================================================================
Boost.Wave: A Standard compliant C++ preprocessor library
http://www.boost.org/
Copyright (c) 2020 Jeff Trull. Distributed under the Boost
Software License, Version 1.0. (See accompanying file
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
//O --c++17
//O -Werror
// Test __has_include() with computed includes
// point system path to this directory
//O -S.
// does this file exist?
#if __has_include(__FILE__)
#define GOTTHISFILE
#else
#warning has_include could not find with file predefined macro
#endif
//H 10: t_2_025.cpp(19): #if
//H 01: <built-in>(1): __FILE__
//H 02: "$F"
//H 03: "$F"
//H 11: t_2_025.cpp(19): #if __has_include(__FILE__): 1
//H 10: t_2_025.cpp(20): #define
//H 08: t_2_025.cpp(20): GOTTHISFILE=
//H 10: t_2_025.cpp(21): #else
// try a computation producing a quoted file
#define FOO(X) "t_2_025.cpp"
#define BAR 0
#if __has_include(FOO(BAR))
#define FOUND_DQUOTE
#else
#warning has_include could not find this file using quotes
#endif
//H 10: t_2_025.cpp(35): #define
//H 08: t_2_025.cpp(35): FOO(X)="t_2_025.cpp"
//H 10: t_2_025.cpp(36): #define
//H 08: t_2_025.cpp(36): BAR=0
//H 10: t_2_025.cpp(37): #if
//H 00: t_2_025.cpp(37): FOO(BAR), [t_2_025.cpp(35): FOO(X)="t_2_025.cpp"]
//H 02: "t_2_025.cpp"
//H 03: "t_2_025.cpp"
//H 11: t_2_025.cpp(37): #if __has_include(FOO(BAR)): 1
//H 10: t_2_025.cpp(38): #define
//H 08: t_2_025.cpp(38): FOUND_DQUOTE=
//H 10: t_2_025.cpp(39): #else
// try a computation producing a bracketed name
#define EMPTY
#define ASSEMBLE(ARG) <t_2_025.cpp>
#if __has_include(ASSEMBLE(EMPTY))
#define FOUND_ABRACKET
#else
#warning has_include could not find this file using angle brackets
#endif
//H 10: t_2_025.cpp(57): #define
//H 08: t_2_025.cpp(57): EMPTY=
//H 10: t_2_025.cpp(58): #define
//H 08: t_2_025.cpp(58): ASSEMBLE(ARG)=<t_2_025.cpp>
//H 10: t_2_025.cpp(59): #if
//H 00: t_2_025.cpp(59): ASSEMBLE(EMPTY), [t_2_025.cpp(58): ASSEMBLE(ARG)=<t_2_025.cpp>]
//H 02: <t_2_025.cpp>
//H 03: <t_2_025.cpp>
//H 11: t_2_025.cpp(59): #if __has_include(ASSEMBLE(EMPTY)): 1
//H 10: t_2_025.cpp(60): #define
//H 08: t_2_025.cpp(60): FOUND_ABRACKET=
//H 10: t_2_025.cpp(61): #else
|