Fixed build

This commit is contained in:
Groove
2018-07-11 22:45:18 +02:00
parent b76f938505
commit 5620858a14
17 changed files with 64 additions and 50 deletions

View File

@@ -1291,10 +1291,13 @@ namespace ldexp_
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX11
#if GLM_HAS_CONSTEXPR_CXX14
static_assert(glm::abs(1.0f) > 0.0f, "GLM: Failed constexpr");
static_assert(glm::abs(glm::vec1(1.0f)) != glm::vec1(0.0f), "GLM: Failed constexpr");
static_assert(glm::abs(glm::vec2(1.0f)) != glm::vec2(0.0f), "GLM: Failed constexpr");
static_assert(glm::abs(glm::vec3(1.0f)) != glm::vec3(0.0f), "GLM: Failed constexpr");
#endif // GLM_HAS_CONSTEXPR_CXX11
static_assert(glm::abs(glm::vec4(1.0f)) != glm::vec4(0.0f), "GLM: Failed constexpr");
#endif // GLM_HAS_CONSTEXPR_CXX14
return 0;
}

View File

@@ -137,6 +137,16 @@ static int test_vec1_operator_increment()
return Error;
}
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
static_assert(glm::vec1::length() == 1, "GLM: Failed constexpr");
static_assert(glm::vec1(1.0f).x > 0.0f, "GLM: Failed constexpr");
#endif
return 0;
}
int main()
{
int Error = 0;
@@ -145,6 +155,7 @@ int main()
Error += test_vec1_ctor();
Error += test_vec1_operators();
Error += test_vec1_operator_increment();
Error += test_constexpr();
return Error;
}

View File

@@ -347,7 +347,7 @@ static int test_operator_increment()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX11
#if GLM_HAS_CONSTEXPR_CXX14
static_assert(glm::vec2::length() == 2, "GLM: Failed constexpr");
static_assert(glm::vec2(1.0f).x > 0.0f, "GLM: Failed constexpr");
static_assert(glm::vec2(1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");

View File

@@ -564,7 +564,7 @@ static int test_operator_increment()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX11
#if GLM_HAS_CONSTEXPR_CXX14
static_assert(glm::vec3::length() == 3, "GLM: Failed constexpr");
static_assert(glm::vec3(1.0f).x > 0.0f, "GLM: Failed constexpr");
static_assert(glm::vec3(1.0f) == glm::vec3(1.0f), "GLM: Failed constexpr");

View File

@@ -711,10 +711,10 @@ static int test_inheritance()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX11
#if GLM_HAS_CONSTEXPR_CXX14
static_assert(glm::vec4::length() == 4, "GLM: Failed constexpr");
static_assert(glm::vec4(1.0f).x > 0.0f, "GLM: Failed constexpr");
//static_assert(glm::vec4(1.0f) == glm::vec4(1.0f), "GLM: Failed constexpr");
static_assert(glm::vec4(1.0f) == glm::vec4(1.0f), "GLM: Failed constexpr");
static_assert(glm::vec4(1.0f, -1.0f, -1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");
static_assert(glm::vec4(1.0f, -1.0f, -1.0f, -1.0f).y < 0.0f, "GLM: Failed constexpr");
#endif