From 0684a5e2c65d77a412cd264e1701eec217dd6865 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 5 Oct 2014 14:42:17 +0200 Subject: [PATCH] GTX_range is only available for C++11 compilers #240 --- glm/ext.hpp | 8 +++++--- glm/gtx/range.hpp | 10 ++++++++-- readme.txt | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/glm/ext.hpp b/glm/ext.hpp index 01369df1..9e232984 100644 --- a/glm/ext.hpp +++ b/glm/ext.hpp @@ -117,9 +117,6 @@ #include "./gtx/raw_data.hpp" #include "./gtx/rotate_vector.hpp" #include "./gtx/spline.hpp" -#if GLM_LANG & GLM_LANG_CXX0X_FLAG -# include "./gtx/scalar_multiplication.hpp" -#endif #include "./gtx/std_based_type.hpp" #if !(GLM_COMPILER & GLM_COMPILER_CUDA) # include "./gtx/string_cast.hpp" @@ -131,6 +128,11 @@ #include "./gtx/vector_query.hpp" #include "./gtx/wrap.hpp" +#if GLM_LANG & GLM_LANG_CXX0X_FLAG +# include "./gtx/scalar_multiplication.hpp" +# include "./gtx/range.hpp" +#endif + #if GLM_ARCH & GLM_ARCH_SSE2 # include "./gtx/simd_vec4.hpp" # include "./gtx/simd_mat4.hpp" diff --git a/glm/gtx/range.hpp b/glm/gtx/range.hpp index 26be2e32..db2efb86 100644 --- a/glm/gtx/range.hpp +++ b/glm/gtx/range.hpp @@ -32,6 +32,12 @@ #pragma once +#include "../detail/setup.hpp" + +#if !(GLM_LANG & GLM_LANG_CXX0X_FLAG) +# error "GLM_GTX_range requires C++11 suppport" +#endif + #include "../gtc/type_ptr.hpp" namespace glm{ @@ -78,5 +84,5 @@ namespace detail typename genType::value_type * end(genType& v){ return begin(v) + number_of_elements_(v); } -} -} +}//namespace detail +}//namespace glm diff --git a/readme.txt b/readme.txt index d66cd4ce..e4b5bc13 100644 --- a/readme.txt +++ b/readme.txt @@ -57,6 +57,7 @@ GLM 0.9.6.0: 2014-XX-XX - Added GTX_common with isdenomal #223 - Fixed implicit conversion from another tvec2 type to another tvec2 #241 - Added GTX_scalar_multiplication for C++ 11 compiler only #242 +- Added GTX_range for C++ 11 compiler only #240 ================================================================================ GLM 0.9.5.4: 2014-06-21