Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

398 lines
11KB

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