0.9.7
_features.hpp
Go to the documentation of this file.
1 
33 #pragma once
34 
35 // #define GLM_CXX98_EXCEPTIONS
36 // #define GLM_CXX98_RTTI
37 
38 // #define GLM_CXX11_RVALUE_REFERENCES
39 // Rvalue references - GCC 4.3
40 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html
41 
42 // GLM_CXX11_TRAILING_RETURN
43 // Rvalue references for *this - GCC not supported
44 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm
45 
46 // GLM_CXX11_NONSTATIC_MEMBER_INIT
47 // Initialization of class objects by rvalues - GCC any
48 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html
49 
50 // GLM_CXX11_NONSTATIC_MEMBER_INIT
51 // Non-static data member initializers - GCC 4.7
52 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm
53 
54 // #define GLM_CXX11_VARIADIC_TEMPLATE
55 // Variadic templates - GCC 4.3
56 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf
57 
58 //
59 // Extending variadic template template parameters - GCC 4.4
60 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
61 
62 // #define GLM_CXX11_GENERALIZED_INITIALIZERS
63 // Initializer lists - GCC 4.4
64 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
65 
66 // #define GLM_CXX11_STATIC_ASSERT
67 // Static assertions - GCC 4.3
68 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html
69 
70 // #define GLM_CXX11_AUTO_TYPE
71 // auto-typed variables - GCC 4.4
72 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf
73 
74 // #define GLM_CXX11_AUTO_TYPE
75 // Multi-declarator auto - GCC 4.4
76 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf
77 
78 // #define GLM_CXX11_AUTO_TYPE
79 // Removal of auto as a storage-class specifier - GCC 4.4
80 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm
81 
82 // #define GLM_CXX11_AUTO_TYPE
83 // New function declarator syntax - GCC 4.4
84 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm
85 
86 // #define GLM_CXX11_LAMBDAS
87 // New wording for C++0x lambdas - GCC 4.5
88 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf
89 
90 // #define GLM_CXX11_DECLTYPE
91 // Declared type of an expression - GCC 4.3
92 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
93 
94 //
95 // Right angle brackets - GCC 4.3
96 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html
97 
98 //
99 // Default template arguments for function templates DR226 GCC 4.3
100 // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226
101 
102 //
103 // Solving the SFINAE problem for expressions DR339 GCC 4.4
104 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html
105 
106 // #define GLM_CXX11_ALIAS_TEMPLATE
107 // Template aliases N2258 GCC 4.7
108 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
109 
110 //
111 // Extern templates N1987 Yes
112 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm
113 
114 // #define GLM_CXX11_NULLPTR
115 // Null pointer constant N2431 GCC 4.6
116 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
117 
118 // #define GLM_CXX11_STRONG_ENUMS
119 // Strongly-typed enums N2347 GCC 4.4
120 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf
121 
122 //
123 // Forward declarations for enums N2764 GCC 4.6
124 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf
125 
126 //
127 // Generalized attributes N2761 GCC 4.8
128 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf
129 
130 //
131 // Generalized constant expressions N2235 GCC 4.6
132 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
133 
134 //
135 // Alignment support N2341 GCC 4.8
136 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
137 
138 // #define GLM_CXX11_DELEGATING_CONSTRUCTORS
139 // Delegating constructors N1986 GCC 4.7
140 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf
141 
142 //
143 // Inheriting constructors N2540 GCC 4.8
144 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm
145 
146 // #define GLM_CXX11_EXPLICIT_CONVERSIONS
147 // Explicit conversion operators N2437 GCC 4.5
148 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
149 
150 //
151 // New character types N2249 GCC 4.4
152 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html
153 
154 //
155 // Unicode string literals N2442 GCC 4.5
156 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
157 
158 //
159 // Raw string literals N2442 GCC 4.5
160 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
161 
162 //
163 // Universal character name literals N2170 GCC 4.5
164 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
165 
166 // #define GLM_CXX11_USER_LITERALS
167 // User-defined literals N2765 GCC 4.7
168 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf
169 
170 //
171 // Standard Layout Types N2342 GCC 4.5
172 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm
173 
174 // #define GLM_CXX11_DEFAULTED_FUNCTIONS
175 // #define GLM_CXX11_DELETED_FUNCTIONS
176 // Defaulted and deleted functions N2346 GCC 4.4
177 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
178 
179 //
180 // Extended friend declarations N1791 GCC 4.7
181 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf
182 
183 //
184 // Extending sizeof N2253 GCC 4.4
185 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html
186 
187 // #define GLM_CXX11_INLINE_NAMESPACES
188 // Inline namespaces N2535 GCC 4.4
189 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm
190 
191 // #define GLM_CXX11_UNRESTRICTED_UNIONS
192 // Unrestricted unions N2544 GCC 4.6
193 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf
194 
195 // #define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS
196 // Local and unnamed types as template arguments N2657 GCC 4.5
197 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm
198 
199 // #define GLM_CXX11_RANGE_FOR
200 // Range-based for N2930 GCC 4.6
201 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html
202 
203 // #define GLM_CXX11_OVERRIDE_CONTROL
204 // Explicit virtual overrides N2928 N3206 N3272 GCC 4.7
205 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm
206 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm
207 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm
208 
209 //
210 // Minimal support for garbage collection and reachability-based leak detection N2670 No
211 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm
212 
213 // #define GLM_CXX11_NOEXCEPT
214 // Allowing move constructors to throw [noexcept] N3050 GCC 4.6 (core language only)
215 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html
216 
217 //
218 // Defining move special member functions N3053 GCC 4.6
219 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html
220 
221 //
222 // Sequence points N2239 Yes
223 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
224 
225 //
226 // Atomic operations N2427 GCC 4.4
227 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
228 
229 //
230 // Strong Compare and Exchange N2748 GCC 4.5
231 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
232 
233 //
234 // Bidirectional Fences N2752 GCC 4.8
235 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm
236 
237 //
238 // Memory model N2429 GCC 4.8
239 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm
240 
241 //
242 // Data-dependency ordering: atomics and memory model N2664 GCC 4.4
243 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm
244 
245 //
246 // Propagating exceptions N2179 GCC 4.4
247 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html
248 
249 //
250 // Abandoning a process and at_quick_exit N2440 GCC 4.8
251 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm
252 
253 //
254 // Allow atomics use in signal handlers N2547 Yes
255 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm
256 
257 //
258 // Thread-local storage N2659 GCC 4.8
259 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm
260 
261 //
262 // Dynamic initialization and destruction with concurrency N2660 GCC 4.3
263 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm
264 
265 //
266 // __func__ predefined identifier N2340 GCC 4.3
267 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm
268 
269 //
270 // C99 preprocessor N1653 GCC 4.3
271 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm
272 
273 //
274 // long long N1811 GCC 4.3
275 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf
276 
277 //
278 // Extended integral types N1988 Yes
279 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf
280 
281 #if(GLM_COMPILER & GLM_COMPILER_GCC)
282 
283 # if(GLM_COMPILER >= GLM_COMPILER_GCC43)
284 # define GLM_CXX11_STATIC_ASSERT
285 # endif
286 
287 #elif(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
288 # if(__has_feature(cxx_exceptions))
289 # define GLM_CXX98_EXCEPTIONS
290 # endif
291 
292 # if(__has_feature(cxx_rtti))
293 # define GLM_CXX98_RTTI
294 # endif
295 
296 # if(__has_feature(cxx_access_control_sfinae))
297 # define GLM_CXX11_ACCESS_CONTROL_SFINAE
298 # endif
299 
300 # if(__has_feature(cxx_alias_templates))
301 # define GLM_CXX11_ALIAS_TEMPLATE
302 # endif
303 
304 # if(__has_feature(cxx_alignas))
305 # define GLM_CXX11_ALIGNAS
306 # endif
307 
308 # if(__has_feature(cxx_attributes))
309 # define GLM_CXX11_ATTRIBUTES
310 # endif
311 
312 # if(__has_feature(cxx_constexpr))
313 # define GLM_CXX11_CONSTEXPR
314 # endif
315 
316 # if(__has_feature(cxx_decltype))
317 # define GLM_CXX11_DECLTYPE
318 # endif
319 
320 # if(__has_feature(cxx_default_function_template_args))
321 # define GLM_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS
322 # endif
323 
324 # if(__has_feature(cxx_defaulted_functions))
325 # define GLM_CXX11_DEFAULTED_FUNCTIONS
326 # endif
327 
328 # if(__has_feature(cxx_delegating_constructors))
329 # define GLM_CXX11_DELEGATING_CONSTRUCTORS
330 # endif
331 
332 # if(__has_feature(cxx_deleted_functions))
333 # define GLM_CXX11_DELETED_FUNCTIONS
334 # endif
335 
336 # if(__has_feature(cxx_explicit_conversions))
337 # define GLM_CXX11_EXPLICIT_CONVERSIONS
338 # endif
339 
340 # if(__has_feature(cxx_generalized_initializers))
341 # define GLM_CXX11_GENERALIZED_INITIALIZERS
342 # endif
343 
344 # if(__has_feature(cxx_implicit_moves))
345 # define GLM_CXX11_IMPLICIT_MOVES
346 # endif
347 
348 # if(__has_feature(cxx_inheriting_constructors))
349 # define GLM_CXX11_INHERITING_CONSTRUCTORS
350 # endif
351 
352 # if(__has_feature(cxx_inline_namespaces))
353 # define GLM_CXX11_INLINE_NAMESPACES
354 # endif
355 
356 # if(__has_feature(cxx_lambdas))
357 # define GLM_CXX11_LAMBDAS
358 # endif
359 
360 # if(__has_feature(cxx_local_type_template_args))
361 # define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS
362 # endif
363 
364 # if(__has_feature(cxx_noexcept))
365 # define GLM_CXX11_NOEXCEPT
366 # endif
367 
368 # if(__has_feature(cxx_nonstatic_member_init))
369 # define GLM_CXX11_NONSTATIC_MEMBER_INIT
370 # endif
371 
372 # if(__has_feature(cxx_nullptr))
373 # define GLM_CXX11_NULLPTR
374 # endif
375 
376 # if(__has_feature(cxx_override_control))
377 # define GLM_CXX11_OVERRIDE_CONTROL
378 # endif
379 
380 # if(__has_feature(cxx_reference_qualified_functions))
381 # define GLM_CXX11_REFERENCE_QUALIFIED_FUNCTIONS
382 # endif
383 
384 # if(__has_feature(cxx_range_for))
385 # define GLM_CXX11_RANGE_FOR
386 # endif
387 
388 # if(__has_feature(cxx_raw_string_literals))
389 # define GLM_CXX11_RAW_STRING_LITERALS
390 # endif
391 
392 # if(__has_feature(cxx_rvalue_references))
393 # define GLM_CXX11_RVALUE_REFERENCES
394 # endif
395 
396 # if(__has_feature(cxx_static_assert))
397 # define GLM_CXX11_STATIC_ASSERT
398 # endif
399 
400 # if(__has_feature(cxx_auto_type))
401 # define GLM_CXX11_AUTO_TYPE
402 # endif
403 
404 # if(__has_feature(cxx_strong_enums))
405 # define GLM_CXX11_STRONG_ENUMS
406 # endif
407 
408 # if(__has_feature(cxx_trailing_return))
409 # define GLM_CXX11_TRAILING_RETURN
410 # endif
411 
412 # if(__has_feature(cxx_unicode_literals))
413 # define GLM_CXX11_UNICODE_LITERALS
414 # endif
415 
416 # if(__has_feature(cxx_unrestricted_unions))
417 # define GLM_CXX11_UNRESTRICTED_UNIONS
418 # endif
419 
420 # if(__has_feature(cxx_user_literals))
421 # define GLM_CXX11_USER_LITERALS
422 # endif
423 
424 # if(__has_feature(cxx_variadic_templates))
425 # define GLM_CXX11_VARIADIC_TEMPLATES
426 # endif
427 
428 #endif//(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))