Fixed build
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user