Browse Source

GTX_range is only available for C++11 compilers #240

Christophe Riccio 11 years ago
parent
commit
0684a5e2c6
3 changed files with 14 additions and 5 deletions
  1. 5 3
      glm/ext.hpp
  2. 8 2
      glm/gtx/range.hpp
  3. 1 0
      readme.txt

+ 5 - 3
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"

+ 8 - 2
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

+ 1 - 0
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