ソースを参照

Fixed C++98 only build

Christophe Riccio 11 年 前
コミット
c556770a32
4 ファイル変更11 行追加4 行削除
  1. 3 1
      glm/detail/type_int.hpp
  2. 1 0
      readme.txt
  3. 3 1
      test/core/core_type_vec2.cpp
  4. 4 2
      test/gtx/gtx_dual_quaternion.cpp

+ 3 - 1
glm/detail/type_int.hpp

@@ -33,7 +33,9 @@
 #pragma once
 
 #include "setup.hpp"
-#include <type_traits>
+#if GLM_HAS_MAKE_SIGNED
+#	include <type_traits>
+#endif
 
 #if GLM_HAS_EXTENDED_INTEGER_TYPE
 #	include <cstdint>

+ 1 - 0
readme.txt

@@ -81,6 +81,7 @@ Fixes:
 - Fixed unsupported _BitScanForward64 and _BitScanReverse64 in VC10
 - Fixed Visual C++ 32 bit build #283
 - Fixed GLM_FORCE_SIZE_FUNC pragma message
+- Fixed C++98 only build
 
 ================================================================================
 GLM 0.9.6.0: 2014-11-30

+ 3 - 1
test/core/core_type_vec2.cpp

@@ -33,7 +33,9 @@
 #include <glm/vector_relational.hpp>
 #include <glm/vec2.hpp>
 #include <vector>
-#include <type_traits>
+#if GLM_HAS_TRIVIAL_QUERIES
+#	include <type_traits>
+#endif
 
 int test_vec2_operators()
 {

+ 4 - 2
test/gtx/gtx_dual_quaternion.cpp

@@ -34,7 +34,9 @@
 #include <glm/gtc/epsilon.hpp>
 #include <glm/gtx/euler_angles.hpp>
 #include <glm/vector_relational.hpp>
-#include <type_traits>
+#if GLM_HAS_TRIVIAL_QUERIES
+#	include <type_traits>
+#endif
 
 int myrand()
 {
@@ -164,7 +166,7 @@ int test_mul()
 			// test both multiplication orders        
 			glm::vec4 dst_pt_m3  = m3 * src_pt; 
 			glm::vec4 dst_pt_dq3 = dq3 * src_pt;
-         
+
 			glm::vec4 dst_pt_m3_i  = glm::inverse(m3) * src_pt;
 			glm::vec4 dst_pt_dq3_i = src_pt * dq3;