Fix GLM_GTX_hash (#1202)

* Fix GLM_GTX_hash, requires C++ 11
master
Christophe ago%!(EXTRA string=1 year) committed by GitHub
parent a40974fb86
commit b6618171dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      glm/ext.hpp
  2. 4
      glm/gtx/hash.hpp
  3. 15
      test/gtx/gtx_hash.cpp
  4. 1
      test/gtx/gtx_quaternion.cpp

@ -214,7 +214,11 @@
#include "./gtx/functions.hpp"
#include "./gtx/gradient_paint.hpp"
#include "./gtx/handed_coordinate_space.hpp"
#if __cplusplus >= 201103L
#include "./gtx/hash.hpp"
#endif
#include "./gtx/integer.hpp"
#include "./gtx/intersect.hpp"
#include "./gtx/io.hpp"

@ -40,11 +40,11 @@
#include "../mat4x3.hpp"
#include "../mat4x4.hpp"
#if !GLM_HAS_CXX11_STL
#if __cplusplus >= 201103L
#pragma message("GLM_GTX_hash requires C++11 standard library support")
#endif
#if 0 && GLM_LANG & GLM_LANG_CXX11
#if GLM_LANG & GLM_LANG_CXX11
#define GLM_GTX_hash 1
#include <functional>

@ -1,7 +1,7 @@
#if __cplusplus >= 201103L
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/hash.hpp>
#if defined(GLM_GTX_hash) && GLM_LANG & GLM_LANG_CXX11
#include <unordered_map>
int test_compile()
@ -46,16 +46,23 @@ int test_compile()
return Error > 0 ? 0 : 1;
}
#endif//GLM_LANG& GLM_LANG_CXX11
int main()
{
int Error = 0;
#if defined(GLM_GTX_hash)
Error += test_compile();
#endif//
return Error;
}
#else
int main()
{
return 0;
}
#endif// __cplusplus >= 201103L

@ -5,7 +5,6 @@
#include <glm/gtx/transform.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtx/compatibility.hpp>
#include <glm/ext.hpp>
int test_quat_fastMix()
{

Loading…
Cancel
Save