| 0.9.8

- Main Page
- Modules
- Files

- File List

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