Fixed defaulted constructor and fixed anonymous struct detection and use

This commit is contained in:
Christophe Riccio
2018-07-23 16:02:21 +02:00
parent ba4a4c6014
commit 508d0bcbb1
15 changed files with 103 additions and 89 deletions

View File

@@ -6,7 +6,7 @@ static int test_vec1_ctor()
{
int Error = 0;
# if GLM_HAS_DEFAULTED_FUNCTIONS
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_ENABLE
{
union pack
{
@@ -20,7 +20,7 @@ static int test_vec1_ctor()
B.f = glm::vec1(1);
Error += glm::all(glm::equal(B.i, glm::ivec1(1065353216))) ? 0 : 1;
}
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
# endif//GLM_USE_DEFAULTED_FUNCTIONS == GLM_ENABLE
return Error;
}
@@ -29,7 +29,7 @@ static int test_vec2_ctor()
{
int Error = 0;
# if GLM_HAS_DEFAULTED_FUNCTIONS
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_ENABLE
{
union pack
{
@@ -43,7 +43,7 @@ static int test_vec2_ctor()
B.f = glm::vec2(1);
Error += glm::all(glm::equal(B.i, glm::ivec2(1065353216))) ? 0 : 1;
}
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
# endif
return Error;
}
@@ -52,7 +52,7 @@ static int test_vec3_ctor()
{
int Error = 0;
# if GLM_HAS_DEFAULTED_FUNCTIONS
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_ENABLE
{
union pack
{
@@ -66,7 +66,7 @@ static int test_vec3_ctor()
B.f = glm::vec3(1);
Error += glm::all(glm::equal(B.i, glm::ivec3(1065353216))) ? 0 : 1;
}
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
# endif
return Error;
}
@@ -75,7 +75,7 @@ static int test_vec4_ctor()
{
int Error = 0;
# if GLM_HAS_DEFAULTED_FUNCTIONS
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_ENABLE
{
union pack
{
@@ -89,7 +89,7 @@ static int test_vec4_ctor()
B.f = glm::vec4(1);
Error += glm::all(glm::equal(B.i, glm::ivec4(1065353216))) ? 0 : 1;
}
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
# endif
return Error;
}

View File

@@ -1,7 +1,8 @@
#define GLM_FORCE_MESSAGES
#define GLM_FORCE_ALIGNED_GENTYPES
#include <glm/glm.hpp>
#if GLM_HAS_ANONYMOUS_STRUCT
#if GLM_USE_ALIGNED_GENTYPES == GLM_ENABLE
#include <glm/gtc/type_aligned.hpp>
GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_lowp>::value, "aligned_lowp is not aligned");
@@ -143,4 +144,4 @@ int main()
return 0;
}
#endif//GLM_HAS_ANONYMOUS_STRUCT
#endif//GLM_USE_ANONYMOUS_STRUCT