Use constexpr only with C++14 compiler
This commit is contained in:
@@ -309,7 +309,7 @@ int test_size()
|
||||
|
||||
static int test_constexpr()
|
||||
{
|
||||
#if GLM_HAS_CONSTEXPR_CXX11
|
||||
#if GLM_HAS_CONSTEXPR
|
||||
static_assert(glm::quat::length() == 4, "GLM: Failed constexpr");
|
||||
static_assert(glm::quat(1.0f, glm::vec3(0.0f)).w > 0.0f, "GLM: Failed constexpr");
|
||||
#endif
|
||||
|
||||
@@ -95,7 +95,7 @@ static int test_ctor()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR_CXX11
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
{
|
||||
constexpr glm::aligned_ivec4 v(1);
|
||||
|
||||
@@ -122,7 +122,7 @@ static int test_ctor()
|
||||
Error += v.z == 1 ? 0 : 1;
|
||||
Error += v.w == 1 ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_CONSTEXPR_CXX11
|
||||
# endif//GLM_HAS_CONSTEXPR
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user