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