Added constexpr relational operators

This commit is contained in:
Christophe Riccio
2018-08-06 19:28:42 +02:00
parent f82d23949a
commit 389fb2457d
12 changed files with 121 additions and 64 deletions

View File

@@ -1,4 +1,5 @@
#include <glm/gtc/constants.hpp>
#include <glm/ext/scalar_relational.hpp>
#include <glm/ext/vector_relational.hpp>
#include <glm/ext/vector_dvec1.hpp>
#include <glm/ext/vector_dvec1_precision.hpp>
@@ -89,9 +90,6 @@ static int test_constexpr()
{
# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
static_assert(genType::length() == 1, "GLM: Failed constexpr");
static_assert(glm::equal(genType(1)[0], 1.0, glm::epsilon<double>()), "GLM: Failed constexpr");
static_assert(glm::all(glm::equal(genType(1), genType(glm::vec1(1), glm::epsilon<double>()), "GLM: Failed constexpr");
static_assert(glm::all(glm::notEqual(genType(1), genType(0), glm::epsilon<double>())), "GLM: Failed constexpr");
# endif
return 0;

View File

@@ -89,9 +89,6 @@ static int test_constexpr()
{
# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
static_assert(genType::length() == 1, "GLM: Failed constexpr");
static_assert(glm::equal(genType(1)[0], 1.0f, glm::epsilon<float>()), "GLM: Failed constexpr");
static_assert(glm::all(glm::equal(genType(1), genType(glm::vec1(1), glm::epsilon<float>()), "GLM: Failed constexpr");
static_assert(glm::all(glm::notEqual(genType(1), genType(0), glm::epsilon<float>())), "GLM: Failed constexpr");
# endif
return 0;