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