diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 0148f5f9..e2f65e88 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -506,6 +506,14 @@ ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \ __has_feature(cxx_rvalue_references)) +// N2437 +#define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS ( \ + (GLM_LANG & GLM_LANG_CXX11_FLAG) || \ + ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013))) || \ + ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14))) || \ + ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC45)) || \ + __has_feature(cxx_explicit_conversions) + #define GLM_HAS_STL_ARRAY ( \ (GLM_LANG & GLM_LANG_CXX11_FLAG) || \ ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010))) || \ diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 15372cd0..0230bacf 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -113,8 +113,10 @@ namespace glm # endif // explicit conversion operators - GLM_FUNC_DECL explicit operator tmat3x3(); - GLM_FUNC_DECL explicit operator tmat4x4(); +# if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS + GLM_FUNC_DECL explicit operator tmat3x3(); + GLM_FUNC_DECL explicit operator tmat4x4(); +# endif /// Create a quaternion from two normalized axis /// diff --git a/readme.txt b/readme.txt index fec7dd1c..97a40c66 100644 --- a/readme.txt +++ b/readme.txt @@ -67,6 +67,7 @@ GLM 0.9.6.1: 2014-12-XX -------------------------------------------------------------------------------- Fixes: - Fixed scalar uaddCarry build error with Cuda #276 +- Fixed C++11 explicit conversion operators detection #282 ================================================================================ GLM 0.9.6.0: 2014-11-30