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