ITK  4.13.0
Insight Segmentation and Registration Toolkit
ITK_COMPILER_INFO_Clang_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_Clang_CXX_h
19 #define ITK_COMPILER_INFO_Clang_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__) >= 300)
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 
37 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_aggregate_nsdmi)
38 # define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 1
39 # else
40 # define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0
41 # endif
42 
43 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_alias_templates)
44 # define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1
45 # else
46 # define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0
47 # endif
48 
49 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_alignas)
50 # define ITK_COMPILER_CXX_ALIGNAS 1
51 # else
52 # define ITK_COMPILER_CXX_ALIGNAS 0
53 # endif
54 
55 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_alignas)
56 # define ITK_COMPILER_CXX_ALIGNOF 1
57 # else
58 # define ITK_COMPILER_CXX_ALIGNOF 0
59 # endif
60 
61 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_attributes)
62 # define ITK_COMPILER_CXX_ATTRIBUTES 1
63 # else
64 # define ITK_COMPILER_CXX_ATTRIBUTES 0
65 # endif
66 
67 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L
68 # define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 1
69 # else
70 # define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0
71 # endif
72 
73 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_auto_type)
74 # define ITK_COMPILER_CXX_AUTO_TYPE 1
75 # else
76 # define ITK_COMPILER_CXX_AUTO_TYPE 0
77 # endif
78 
79 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_binary_literals)
80 # define ITK_COMPILER_CXX_BINARY_LITERALS 1
81 # else
82 # define ITK_COMPILER_CXX_BINARY_LITERALS 0
83 # endif
84 
85 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_constexpr)
86 # define ITK_COMPILER_CXX_CONSTEXPR 1
87 # else
88 # define ITK_COMPILER_CXX_CONSTEXPR 0
89 # endif
90 
91 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_contextual_conversions)
92 # define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 1
93 # else
94 # define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0
95 # endif
96 
97 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_decltype_incomplete_return_types)
98 # define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 1
99 # else
100 # define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0
101 # endif
102 
103 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_decltype)
104 # define ITK_COMPILER_CXX_DECLTYPE 1
105 # else
106 # define ITK_COMPILER_CXX_DECLTYPE 0
107 # endif
108 
109 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L
110 # define ITK_COMPILER_CXX_DECLTYPE_AUTO 1
111 # else
112 # define ITK_COMPILER_CXX_DECLTYPE_AUTO 0
113 # endif
114 
115 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_default_function_template_args)
116 # define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1
117 # else
118 # define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0
119 # endif
120 
121 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_defaulted_functions)
122 # define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1
123 # else
124 # define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0
125 # endif
126 
127 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_defaulted_functions)
128 # define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1
129 # else
130 # define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0
131 # endif
132 
133 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_delegating_constructors)
134 # define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1
135 # else
136 # define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0
137 # endif
138 
139 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_deleted_functions)
140 # define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1
141 # else
142 # define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0
143 # endif
144 
145 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L
146 # define ITK_COMPILER_CXX_DIGIT_SEPARATORS 1
147 # else
148 # define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0
149 # endif
150 
151 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
152 # define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1
153 # else
154 # define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0
155 # endif
156 
157 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_explicit_conversions)
158 # define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1
159 # else
160 # define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0
161 # endif
162 
163 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
164 # define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1
165 # else
166 # define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0
167 # endif
168 
169 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
170 # define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1
171 # else
172 # define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0
173 # endif
174 
175 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_override_control)
176 # define ITK_COMPILER_CXX_FINAL 1
177 # else
178 # define ITK_COMPILER_CXX_FINAL 0
179 # endif
180 
181 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
182 # define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1
183 # else
184 # define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0
185 # endif
186 
187 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_generalized_initializers)
188 # define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 1
189 # else
190 # define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0
191 # endif
192 
193 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L
194 # define ITK_COMPILER_CXX_GENERIC_LAMBDAS 1
195 # else
196 # define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0
197 # endif
198 
199 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_inheriting_constructors)
200 # define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1
201 # else
202 # define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0
203 # endif
204 
205 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
206 # define ITK_COMPILER_CXX_INLINE_NAMESPACES 1
207 # else
208 # define ITK_COMPILER_CXX_INLINE_NAMESPACES 0
209 # endif
210 
211 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_lambdas)
212 # define ITK_COMPILER_CXX_LAMBDAS 1
213 # else
214 # define ITK_COMPILER_CXX_LAMBDAS 0
215 # endif
216 
217 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_init_captures)
218 # define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 1
219 # else
220 # define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0
221 # endif
222 
223 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_local_type_template_args)
224 # define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1
225 # else
226 # define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0
227 # endif
228 
229 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
230 # define ITK_COMPILER_CXX_LONG_LONG_TYPE 1
231 # else
232 # define ITK_COMPILER_CXX_LONG_LONG_TYPE 0
233 # endif
234 
235 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_noexcept)
236 # define ITK_COMPILER_CXX_NOEXCEPT 1
237 # else
238 # define ITK_COMPILER_CXX_NOEXCEPT 0
239 # endif
240 
241 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_nonstatic_member_init)
242 # define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1
243 # else
244 # define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0
245 # endif
246 
247 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_nullptr)
248 # define ITK_COMPILER_CXX_NULLPTR 1
249 # else
250 # define ITK_COMPILER_CXX_NULLPTR 0
251 # endif
252 
253 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_override_control)
254 # define ITK_COMPILER_CXX_OVERRIDE 1
255 # else
256 # define ITK_COMPILER_CXX_OVERRIDE 0
257 # endif
258 
259 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_range_for)
260 # define ITK_COMPILER_CXX_RANGE_FOR 1
261 # else
262 # define ITK_COMPILER_CXX_RANGE_FOR 0
263 # endif
264 
265 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_raw_string_literals)
266 # define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1
267 # else
268 # define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0
269 # endif
270 
271 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_reference_qualified_functions)
272 # define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1
273 # else
274 # define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0
275 # endif
276 
277 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_relaxed_constexpr)
278 # define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 1
279 # else
280 # define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0
281 # endif
282 
283 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_return_type_deduction)
284 # define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 1
285 # else
286 # define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0
287 # endif
288 
289 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
290 # define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1
291 # else
292 # define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0
293 # endif
294 
295 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_rvalue_references)
296 # define ITK_COMPILER_CXX_RVALUE_REFERENCES 1
297 # else
298 # define ITK_COMPILER_CXX_RVALUE_REFERENCES 0
299 # endif
300 
301 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
302 # define ITK_COMPILER_CXX_SIZEOF_MEMBER 1
303 # else
304 # define ITK_COMPILER_CXX_SIZEOF_MEMBER 0
305 # endif
306 
307 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_static_assert)
308 # define ITK_COMPILER_CXX_STATIC_ASSERT 1
309 # else
310 # define ITK_COMPILER_CXX_STATIC_ASSERT 0
311 # endif
312 
313 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_strong_enums)
314 # define ITK_COMPILER_CXX_STRONG_ENUMS 1
315 # else
316 # define ITK_COMPILER_CXX_STRONG_ENUMS 0
317 # endif
318 
319 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_thread_local)
320 # define ITK_COMPILER_CXX_THREAD_LOCAL 1
321 # else
322 # define ITK_COMPILER_CXX_THREAD_LOCAL 0
323 # endif
324 
325 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_trailing_return)
326 # define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1
327 # else
328 # define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0
329 # endif
330 
331 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_unicode_literals)
332 # define ITK_COMPILER_CXX_UNICODE_LITERALS 1
333 # else
334 # define ITK_COMPILER_CXX_UNICODE_LITERALS 0
335 # endif
336 
337 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_generalized_initializers)
338 # define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1
339 # else
340 # define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0
341 # endif
342 
343 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_unrestricted_unions)
344 # define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1
345 # else
346 # define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0
347 # endif
348 
349 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_user_literals)
350 # define ITK_COMPILER_CXX_USER_LITERALS 1
351 # else
352 # define ITK_COMPILER_CXX_USER_LITERALS 0
353 # endif
354 
355 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_variable_templates)
356 # define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 1
357 # else
358 # define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0
359 # endif
360 
361 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L
362 # define ITK_COMPILER_CXX_VARIADIC_MACROS 1
363 # else
364 # define ITK_COMPILER_CXX_VARIADIC_MACROS 0
365 # endif
366 
367 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_variadic_templates)
368 # define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1
369 # else
370 # define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0
371 # endif
372 
373 # if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 199711L
374 # define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1
375 # else
376 # define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0
377 # endif
378 
379 # if ((__clang_major__ * 100) + __clang_minor__) >= 301 && __has_feature(cxx_atomic)
380 # define ITK_COMPILER_CXX_ATOMIC 1
381 # else
382 # define ITK_COMPILER_CXX_ATOMIC 0
383 # endif
384 #endif // ITK_COMPILER_INFO_Clang_CXX_h