|
65 | 65 | # define optional_HAVE_AUTO 1
|
66 | 66 | # define optional_HAVE_NULLPTR 1
|
67 | 67 | # define optional_HAVE_STATIC_ASSERT 1
|
| 68 | +#else |
| 69 | +# define optional_HAVE_AUTO 0 |
| 70 | +# define optional_HAVE_NULLPTR 0 |
| 71 | +# define optional_HAVE_STATIC_ASSERT 0 |
68 | 72 | #endif
|
69 | 73 |
|
70 | 74 | #if optional_CPP11_OR_GREATER || optional_COMPILER_MSVC_VERSION >= 12
|
71 | 75 | # define optional_HAVE_DEFAULT_FUNCTION_TEMPLATE_ARG 1
|
72 | 76 | # define optional_HAVE_INITIALIZER_LIST 1
|
| 77 | +#else |
| 78 | +# define optional_HAVE_DEFAULT_FUNCTION_TEMPLATE_ARG 0 |
| 79 | +# define optional_HAVE_INITIALIZER_LIST 0 |
73 | 80 | #endif
|
74 | 81 |
|
75 | 82 | #if optional_CPP11_OR_GREATER || optional_COMPILER_MSVC_VERSION >= 14
|
|
81 | 88 | # define optional_HAVE_IS_DELETE 1
|
82 | 89 | # define optional_HAVE_NOEXCEPT 1
|
83 | 90 | # define optional_HAVE_REF_QUALIFIER 1
|
| 91 | +#else |
| 92 | +# define optional_HAVE_ALIAS_TEMPLATE 0 |
| 93 | +# define optional_HAVE_CONSTEXPR_11 0 |
| 94 | +# define optional_HAVE_ENUM_CLASS 0 |
| 95 | +# define optional_HAVE_EXPLICIT_CONVERSION 0 |
| 96 | +# define optional_HAVE_IS_DEFAULT 0 |
| 97 | +# define optional_HAVE_IS_DELETE 0 |
| 98 | +# define optional_HAVE_NOEXCEPT 0 |
| 99 | +# define optional_HAVE_REF_QUALIFIER 0 |
84 | 100 | #endif
|
85 | 101 |
|
86 | 102 | // Presence of C++14 language features:
|
87 | 103 |
|
88 | 104 | #if optional_CPP14_OR_GREATER
|
89 | 105 | # define optional_HAVE_CONSTEXPR_14 1
|
| 106 | +#else |
| 107 | +# define optional_HAVE_CONSTEXPR_14 0 |
90 | 108 | #endif
|
91 | 109 |
|
92 | 110 | // Presence of C++17 language features:
|
93 | 111 |
|
94 | 112 | #if optional_CPP17_OR_GREATER
|
95 | 113 | # define optional_HAVE_ENUM_CLASS_CONSTRUCTION_FROM_UNDERLYING_TYPE 1
|
| 114 | +#else |
| 115 | +# define optional_HAVE_ENUM_CLASS_CONSTRUCTION_FROM_UNDERLYING_TYPE 0 |
96 | 116 | #endif
|
97 | 117 |
|
98 | 118 | // Presence of C++ library features:
|
99 | 119 |
|
100 | 120 | #if optional_COMPILER_GNUC_VERSION
|
101 | 121 | # define optional_HAVE_TR1_TYPE_TRAITS 1
|
102 | 122 | # define optional_HAVE_TR1_ADD_POINTER 1
|
| 123 | +#else |
| 124 | +# define optional_HAVE_TR1_TYPE_TRAITS 0 |
| 125 | +# define optional_HAVE_TR1_ADD_POINTER 0 |
103 | 126 | #endif
|
104 | 127 |
|
105 | 128 | #if optional_CPP11_OR_GREATER || optional_COMPILER_MSVC_VERSION >= 9
|
106 | 129 | # define optional_HAVE_TYPE_TRAITS 1
|
107 | 130 | # define optional_HAVE_STD_ADD_POINTER 1
|
| 131 | +#else |
| 132 | +# define optional_HAVE_TYPE_TRAITS 0 |
| 133 | +# define optional_HAVE_STD_ADD_POINTER 0 |
108 | 134 | #endif
|
109 | 135 |
|
110 | 136 | #if optional_CPP11_OR_GREATER || optional_COMPILER_MSVC_VERSION >= 11
|
111 | 137 | # define optional_HAVE_ARRAY 1
|
| 138 | +#else |
| 139 | +# define optional_HAVE_ARRAY 0 |
112 | 140 | #endif
|
113 | 141 |
|
114 | 142 | #if optional_CPP11_OR_GREATER || optional_COMPILER_MSVC_VERSION >= 12
|
115 | 143 | # define optional_HAVE_CONDITIONAL 1
|
| 144 | +#else |
| 145 | +# define optional_HAVE_CONDITIONAL 0 |
116 | 146 | #endif
|
117 | 147 |
|
118 | 148 | #if optional_CPP11_OR_GREATER || optional_COMPILER_MSVC_VERSION >= 14 || (optional_COMPILER_MSVC_VERSION >= 9 && _HAS_CPP0X)
|
119 | 149 | # define optional_HAVE_CONTAINER_DATA_METHOD 1
|
| 150 | +#else |
| 151 | +# define optional_HAVE_CONTAINER_DATA_METHOD 0 |
120 | 152 | #endif
|
121 | 153 |
|
122 | 154 | #if optional_CPP11_OR_GREATER || optional_COMPILER_MSVC_VERSION >= 12
|
123 | 155 | # define optional_HAVE_REMOVE_CV 1
|
| 156 | +#else |
| 157 | +# define optional_HAVE_REMOVE_CV 0 |
124 | 158 | #endif
|
125 | 159 |
|
126 | 160 | #if optional_CPP11_OR_GREATER || optional_COMPILER_MSVC_VERSION >= 14
|
127 | 161 | # define optional_HAVE_SIZED_TYPES 1
|
| 162 | +#else |
| 163 | +# define optional_HAVE_SIZED_TYPES 0 |
128 | 164 | #endif
|
129 | 165 |
|
130 | 166 | // For the rest, consider VC14 as C++11 for variant-lite:
|
|
188 | 224 | // in_place: code duplicated in any-lite, optional-lite, variant-lite:
|
189 | 225 | //
|
190 | 226 |
|
191 |
| -#if ! nonstd_lite_HAVE_IN_PLACE_TYPES |
| 227 | +#if !defined(nonstd_lite_HAVE_IN_PLACE_TYPES) || !nonstd_lite_HAVE_IN_PLACE_TYPES |
192 | 228 |
|
193 | 229 | namespace nonstd {
|
194 | 230 |
|
@@ -242,7 +278,7 @@ namespace detail {
|
242 | 278 |
|
243 | 279 | // C++11 emulation:
|
244 | 280 |
|
245 |
| -#if variant_HAVE_CONDITIONAL |
| 281 | +#if defined(variant_HAVE_CONDITIONAL) && variant_HAVE_CONDITIONAL |
246 | 282 |
|
247 | 283 | using std::conditional;
|
248 | 284 |
|
|
0 commit comments