Initial work on more constexpr support in GLM
This commit is contained in:
@@ -321,6 +321,8 @@ static int test_size()
|
||||
|
||||
static int test_constexpr()
|
||||
{
|
||||
glm::mat4 const I(1.0f);
|
||||
|
||||
#if GLM_HAS_CONSTEXPR_CXX11
|
||||
static_assert(glm::mat4::length() == 4, "GLM: Failed constexpr");
|
||||
#endif
|
||||
|
||||
@@ -563,6 +563,7 @@ static int test_constexpr()
|
||||
#if GLM_HAS_CONSTEXPR_CXX11
|
||||
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");
|
||||
static_assert(glm::vec3(1.0f, -1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");
|
||||
static_assert(glm::vec3(1.0f, -1.0f, -1.0f).y < 0.0f, "GLM: Failed constexpr");
|
||||
#endif
|
||||
|
||||
@@ -714,6 +714,7 @@ static int test_constexpr()
|
||||
#if GLM_HAS_CONSTEXPR_CXX11
|
||||
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, -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