From 1331e156cb879dd9b7fa981b789e105d66ca7fb6 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 31 Oct 2014 01:26:00 +0100 Subject: [PATCH 1/2] Fixed non C++11 build --- glm/detail/func_common.inl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index fa9ac5ed..373ac935 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -173,7 +173,7 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType floor(vecType const & x) { - return detail::functor1::call(::std::floor, x); + return detail::functor1::call(floor, x); } // trunc @@ -192,7 +192,7 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType trunc(vecType const & x) { - return detail::functor1::call(::std::trunc, x); + return detail::functor1::call(trunc, x); } // round @@ -269,7 +269,7 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType ceil(vecType const & x) { - return detail::functor1::call(::std::ceil, x); + return detail::functor1::call(ceil, x); } // fract From fc253a0e5b65a0486df165dcd92bb2f8c0faafb6 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 31 Oct 2014 01:29:38 +0100 Subject: [PATCH 2/2] Fixed Visual C++ 10 build --- glm/detail/func_common.inl | 4 ++-- glm/detail/setup.hpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 373ac935..cbfdaf01 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -177,7 +177,7 @@ namespace detail } // trunc -# if GLM_LANG & GLM_LANG_CXX0X_FLAG +# if GLM_HAS_CXX11_STL using ::std::trunc; # else template @@ -196,7 +196,7 @@ namespace detail } // round -# if GLM_LANG & GLM_LANG_CXX0X_FLAG +# if GLM_HAS_CXX11_STL using ::std::round; # else template diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index c2018fb2..41d0503c 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -458,6 +458,11 @@ // http://gcc.gnu.org/projects/cxx0x.html // http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx +// N1720 +#define GLM_HAS_CXX11_STL ( \ + (GLM_LANG & GLM_LANG_CXX11_FLAG) || \ + ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC13))) + // N1720 #define GLM_HAS_STATIC_ASSERT ( \ (GLM_LANG & GLM_LANG_CXX11_FLAG) || \