ITK  4.13.0
Insight Segmentation and Registration Toolkit
ITK_COMPILER_INFO_AppleClang_CXX.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef ITK_COMPILER_INFO_AppleClang_CXX_h
19 #define ITK_COMPILER_INFO_AppleClang_CXX_h
20 #ifndef itk_compiler_detection_h
21 # error This file may only be included from itk_compiler_detection.h
22 #endif
23 
24 # if !(((__clang_major__ * 100) + __clang_minor__) >= 400)
25 # error Unsupported compiler version
26 # endif
27 
28 # define ITK_COMPILER_VERSION_MAJOR ITK_DEC(__clang_major__)
29 # define ITK_COMPILER_VERSION_MINOR ITK_DEC(__clang_minor__)
30 # define ITK_COMPILER_VERSION_PATCH ITK_DEC(__clang_patchlevel__)
31 # if defined(_MSC_VER)
32  /* _MSC_VER = VVRR */
33 # define ITK_SIMULATE_VERSION_MAJOR ITK_DEC(_MSC_VER / 100)
34 # define ITK_SIMULATE_VERSION_MINOR ITK_DEC(_MSC_VER % 100)
35 # endif
36 # define ITK_COMPILER_VERSION_TWEAK ITK_DEC(__apple_build_version__)
37 
38 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_aggregate_nsdmi)
39 # define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 1
40 # else
41 # define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0
42 # endif
43 
44 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_alias_templates)
45 # define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1
46 # else
47 # define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0
48 # endif
49 
50 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_alignas)
51 # define ITK_COMPILER_CXX_ALIGNAS 1
52 # else
53 # define ITK_COMPILER_CXX_ALIGNAS 0
54 # endif
55 
56 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_alignas)
57 # define ITK_COMPILER_CXX_ALIGNOF 1
58 # else
59 # define ITK_COMPILER_CXX_ALIGNOF 0
60 # endif
61 
62 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_attributes)
63 # define ITK_COMPILER_CXX_ATTRIBUTES 1
64 # else
65 # define ITK_COMPILER_CXX_ATTRIBUTES 0
66 # endif
67 
68 # if ((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L
69 # define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 1
70 # else
71 # define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0
72 # endif
73 
74 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_auto_type)
75 # define ITK_COMPILER_CXX_AUTO_TYPE 1
76 # else
77 # define ITK_COMPILER_CXX_AUTO_TYPE 0
78 # endif
79 
80 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_binary_literals)
81 # define ITK_COMPILER_CXX_BINARY_LITERALS 1
82 # else
83 # define ITK_COMPILER_CXX_BINARY_LITERALS 0
84 # endif
85 
86 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_constexpr)
87 # define ITK_COMPILER_CXX_CONSTEXPR 1
88 # else
89 # define ITK_COMPILER_CXX_CONSTEXPR 0
90 # endif
91 
92 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_contextual_conversions)
93 # define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 1
94 # else
95 # define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0
96 # endif
97 
98 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_decltype_incomplete_return_types)
99 # define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 1
100 # else
101 # define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0
102 # endif
103 
104 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_decltype)
105 # define ITK_COMPILER_CXX_DECLTYPE 1
106 # else
107 # define ITK_COMPILER_CXX_DECLTYPE 0
108 # endif
109 
110 # if ((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L
111 # define ITK_COMPILER_CXX_DECLTYPE_AUTO 1
112 # else
113 # define ITK_COMPILER_CXX_DECLTYPE_AUTO 0
114 # endif
115 
116 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_default_function_template_args)
117 # define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1
118 # else
119 # define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0
120 # endif
121 
122 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_defaulted_functions)
123 # define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1
124 # else
125 # define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0
126 # endif
127 
128 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_defaulted_functions)
129 # define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1
130 # else
131 # define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0
132 # endif
133 
134 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_delegating_constructors)
135 # define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1
136 # else
137 # define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0
138 # endif
139 
140 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_deleted_functions)
141 # define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1
142 # else
143 # define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0
144 # endif
145 
146 # if ((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L
147 # define ITK_COMPILER_CXX_DIGIT_SEPARATORS 1
148 # else
149 # define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0
150 # endif
151 
152 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
153 # define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1
154 # else
155 # define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0
156 # endif
157 
158 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_explicit_conversions)
159 # define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1
160 # else
161 # define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0
162 # endif
163 
164 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
165 # define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1
166 # else
167 # define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0
168 # endif
169 
170 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
171 # define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1
172 # else
173 # define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0
174 # endif
175 
176 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_override_control)
177 # define ITK_COMPILER_CXX_FINAL 1
178 # else
179 # define ITK_COMPILER_CXX_FINAL 0
180 # endif
181 
182 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
183 # define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1
184 # else
185 # define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0
186 # endif
187 
188 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_generalized_initializers)
189 # define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 1
190 # else
191 # define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0
192 # endif
193 
194 # if ((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L
195 # define ITK_COMPILER_CXX_GENERIC_LAMBDAS 1
196 # else
197 # define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0
198 # endif
199 
200 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_inheriting_constructors)
201 # define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1
202 # else
203 # define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0
204 # endif
205 
206 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
207 # define ITK_COMPILER_CXX_INLINE_NAMESPACES 1
208 # else
209 # define ITK_COMPILER_CXX_INLINE_NAMESPACES 0
210 # endif
211 
212 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_lambdas)
213 # define ITK_COMPILER_CXX_LAMBDAS 1
214 # else
215 # define ITK_COMPILER_CXX_LAMBDAS 0
216 # endif
217 
218 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_init_captures)
219 # define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 1
220 # else
221 # define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0
222 # endif
223 
224 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_local_type_template_args)
225 # define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1
226 # else
227 # define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0
228 # endif
229 
230 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
231 # define ITK_COMPILER_CXX_LONG_LONG_TYPE 1
232 # else
233 # define ITK_COMPILER_CXX_LONG_LONG_TYPE 0
234 # endif
235 
236 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_noexcept)
237 # define ITK_COMPILER_CXX_NOEXCEPT 1
238 # else
239 # define ITK_COMPILER_CXX_NOEXCEPT 0
240 # endif
241 
242 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_nonstatic_member_init)
243 # define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1
244 # else
245 # define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0
246 # endif
247 
248 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_nullptr)
249 # define ITK_COMPILER_CXX_NULLPTR 1
250 # else
251 # define ITK_COMPILER_CXX_NULLPTR 0
252 # endif
253 
254 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_override_control)
255 # define ITK_COMPILER_CXX_OVERRIDE 1
256 # else
257 # define ITK_COMPILER_CXX_OVERRIDE 0
258 # endif
259 
260 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_range_for)
261 # define ITK_COMPILER_CXX_RANGE_FOR 1
262 # else
263 # define ITK_COMPILER_CXX_RANGE_FOR 0
264 # endif
265 
266 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_raw_string_literals)
267 # define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1
268 # else
269 # define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0
270 # endif
271 
272 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_reference_qualified_functions)
273 # define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1
274 # else
275 # define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0
276 # endif
277 
278 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_relaxed_constexpr)
279 # define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 1
280 # else
281 # define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0
282 # endif
283 
284 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_return_type_deduction)
285 # define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 1
286 # else
287 # define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0
288 # endif
289 
290 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
291 # define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1
292 # else
293 # define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0
294 # endif
295 
296 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_rvalue_references)
297 # define ITK_COMPILER_CXX_RVALUE_REFERENCES 1
298 # else
299 # define ITK_COMPILER_CXX_RVALUE_REFERENCES 0
300 # endif
301 
302 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
303 # define ITK_COMPILER_CXX_SIZEOF_MEMBER 1
304 # else
305 # define ITK_COMPILER_CXX_SIZEOF_MEMBER 0
306 # endif
307 
308 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_static_assert)
309 # define ITK_COMPILER_CXX_STATIC_ASSERT 1
310 # else
311 # define ITK_COMPILER_CXX_STATIC_ASSERT 0
312 # endif
313 
314 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_strong_enums)
315 # define ITK_COMPILER_CXX_STRONG_ENUMS 1
316 # else
317 # define ITK_COMPILER_CXX_STRONG_ENUMS 0
318 # endif
319 
320 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_thread_local)
321 # define ITK_COMPILER_CXX_THREAD_LOCAL 1
322 # else
323 # define ITK_COMPILER_CXX_THREAD_LOCAL 0
324 # endif
325 
326 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_trailing_return)
327 # define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1
328 # else
329 # define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0
330 # endif
331 
332 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_unicode_literals)
333 # define ITK_COMPILER_CXX_UNICODE_LITERALS 1
334 # else
335 # define ITK_COMPILER_CXX_UNICODE_LITERALS 0
336 # endif
337 
338 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_generalized_initializers)
339 # define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1
340 # else
341 # define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0
342 # endif
343 
344 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_unrestricted_unions)
345 # define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1
346 # else
347 # define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0
348 # endif
349 
350 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_user_literals)
351 # define ITK_COMPILER_CXX_USER_LITERALS 1
352 # else
353 # define ITK_COMPILER_CXX_USER_LITERALS 0
354 # endif
355 
356 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_variable_templates)
357 # define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 1
358 # else
359 # define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0
360 # endif
361 
362 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L
363 # define ITK_COMPILER_CXX_VARIADIC_MACROS 1
364 # else
365 # define ITK_COMPILER_CXX_VARIADIC_MACROS 0
366 # endif
367 
368 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_variadic_templates)
369 # define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1
370 # else
371 # define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0
372 # endif
373 
374 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 199711L
375 # define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1
376 # else
377 # define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0
378 # endif
379 
380 # if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_atomic)
381 # define ITK_COMPILER_CXX_ATOMIC 1
382 # else
383 # define ITK_COMPILER_CXX_ATOMIC 0
384 # endif
385 #endif //ITK_COMPILER_INFO_AppleClang_CXX_h