From c965ac42d63e9115357a158d65711c457bc7910e Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Fri, 11 Sep 2015 17:13:01 -0400 Subject: [PATCH] Add detection for noexcept --- glm/detail/setup.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 830eb700..df347f1f 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -670,6 +670,18 @@ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)))) #endif +// N3050 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html +#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG) +# define GLM_HAS_NOEXCEPT __has_feature(cxx_noexcept) +#elif GLM_LANG & GLM_LANG_CXX11_FLAG +# define GLM_HAS_NOEXCEPT 1 +#else +# define GLM_HAS_NOEXCEPT ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ + ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \ + ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \ + ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015)))) +#endif + // #if GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_ASSIGNABLE 1