Browse Source

Redesigned constexpr support which supports both SIMD and constexpr on Clang #783

Groove 7 years ago
parent
commit
baca827371
2 changed files with 4 additions and 4 deletions
  1. 3 3
      glm/detail/setup.hpp
  2. 1 1
      readme.md

+ 3 - 3
glm/detail/setup.hpp

@@ -436,7 +436,7 @@
 	// 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_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48) && (GLM_ARCH == GLM_ARCH_PURE)) || \
 		((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))))
 #endif
@@ -454,8 +454,8 @@
 #	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_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \
+		((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))))
 #endif
 

+ 1 - 1
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 requires disable GLM SIMD on Visual C++ #783
+- Redesigned constexpr support which supports both SIMD and constexpr on Clang #783
 - Added detection of Visual C++ 2017 toolsets
 
 #### Fixes: