diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 8df19a8e..51b8c680 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -428,17 +428,17 @@ #endif // N2235 Generalized Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf -#if GLM_COMPILER & GLM_COMPILER_CLANG +#if (GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_ARCH == GLM_ARCH_PURE) # define GLM_HAS_CONSTEXPR_CXX11 __has_feature(cxx_constexpr) -#elif GLM_LANG & GLM_LANG_CXX11_FLAG +#elif (GLM_LANG & GLM_LANG_CXX11_FLAG) && (GLM_ARCH == GLM_ARCH_PURE) # define GLM_HAS_CONSTEXPR_CXX11 1 #else // GCC 4.6 support constexpr but there is a compiler bug causing a crash // Visual C++ has a bug #594 https://github.com/g-truc/glm/issues/594 -# define GLM_HAS_CONSTEXPR_CXX11 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ - ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48) && (GLM_ARCH == GLM_ARCH_PURE)) || \ +# define GLM_HAS_CONSTEXPR_CXX11 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_ARCH == GLM_ARCH_PURE) && (\ + ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \ ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \ - ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH == GLM_ARCH_PURE)))) + ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14)))) #endif #if GLM_HAS_CONSTEXPR_CXX11 @@ -448,15 +448,15 @@ #endif // N3652 Extended Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html -#if GLM_COMPILER & GLM_COMPILER_CLANG +#if (GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_ARCH == GLM_ARCH_PURE) # define GLM_HAS_CONSTEXPR_CXX14 __has_feature(cxx_relaxed_constexpr) -#elif GLM_LANG & GLM_LANG_CXX14_FLAG +#elif (GLM_LANG & GLM_LANG_CXX14_FLAG) && (GLM_ARCH == GLM_ARCH_PURE) # define GLM_HAS_CONSTEXPR_CXX14 1 #else -# define GLM_HAS_CONSTEXPR_CXX14 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ - ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC50) && (GLM_ARCH == GLM_ARCH_PURE)) || \ - ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17) && (GLM_ARCH == GLM_ARCH_PURE)) || \ - ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15) && (GLM_ARCH == GLM_ARCH_PURE)))) +# define GLM_HAS_CONSTEXPR_CXX14 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_ARCH == GLM_ARCH_PURE) && (\ + ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC50)) || \ + ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \ + ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)))) #endif #if GLM_HAS_CONSTEXPR_CXX14 diff --git a/readme.md b/readme.md index 4084a869..1ed0e9dc 100644 --- a/readme.md +++ b/readme.md @@ -57,7 +57,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate) #### Improvements: - Added missing vec1 based constructors -- Redesigned constexpr support which supports both SIMD and constexpr on Clang #783 +- Redesigned constexpr support which excludes both SIMD and constexpr #783 - Added detection of Visual C++ 2017 toolsets #### Fixes: