From 33ea25c0521faa02db427cb62fc7e897520f1594 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 1 Nov 2016 23:34:37 +0100 Subject: [PATCH] Broader support of GLM_FORCE_UNRESTRICTED_GENTYPE #378 --- glm/detail/func_common.inl | 47 +++++++++++++++++++------------------- glm/detail/func_matrix.inl | 10 ++++---- glm/detail/setup.hpp | 6 +++++ glm/detail/type_mat4x4.inl | 40 ++++++++++++++++---------------- readme.md | 3 +++ 5 files changed, 58 insertions(+), 48 deletions(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 6c39092e..0ce66b1c 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -14,7 +14,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType min(genType x, genType y) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "'min' only accept floating-point or integer inputs"); return x < y ? x : y; } @@ -22,7 +22,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType max(genType x, genType y) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "'max' only accept floating-point or integer inputs"); return x > y ? x : y; } @@ -76,7 +76,7 @@ namespace detail GLM_FUNC_QUALIFIER static genFIType call(genFIType x) { GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_signed, + std::numeric_limits::is_iec559 || std::numeric_limits::is_signed || GLM_UNRESTRICTED_GENTYPE, "'abs' only accept floating-point and integer scalar or vector inputs"); return x >= genFIType(0) ? x : -x; @@ -101,7 +101,7 @@ namespace detail GLM_FUNC_QUALIFIER static genFIType call(genFIType x) { GLM_STATIC_ASSERT( - !std::numeric_limits::is_signed && std::numeric_limits::is_integer, + !std::numeric_limits::is_signed && std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "'abs' only accept floating-point and integer scalar or vector inputs"); return x; } @@ -121,7 +121,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, vecType const & a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'mix' only accept floating-point inputs for the interpolator a"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); return vecType(vecType(x) + a * vecType(y - x)); } @@ -144,7 +144,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, U const & a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'mix' only accept floating-point inputs for the interpolator a"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); return vecType(vecType(x) + a * vecType(y - x)); } @@ -164,7 +164,7 @@ namespace detail { GLM_FUNC_QUALIFIER static T call(T const & x, T const & y, U const & a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'mix' only accept floating-point inputs for the interpolator a"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); return static_cast(static_cast(x) + a * static_cast(y - x)); } @@ -298,7 +298,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vecType call(vecType const & edge0, vecType const & edge1, vecType const & x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'step' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'step' only accept floating-point inputs"); vecType const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast(0), static_cast(1))); return tmp * tmp * (static_cast(3) - static_cast(2) * tmp); } @@ -514,7 +514,7 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType min(vecType const & a, T b) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'min' only accept floating-point inputs for the interpolator a"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'min' only accept floating-point inputs for the interpolator a"); return detail::compute_min_vector::value>::call(a, vecType(b)); } @@ -528,6 +528,7 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType max(vecType const & a, T b) { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'max' only accept floating-point inputs for the interpolator a"); return detail::compute_max_vector::value>::call(a, vecType(b)); } @@ -541,21 +542,21 @@ namespace detail template GLM_FUNC_QUALIFIER genType clamp(genType x, genType minVal, genType maxVal) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "'clamp' only accept floating-point or integer inputs"); return min(max(x, minVal), maxVal); } template class vecType> GLM_FUNC_QUALIFIER vecType clamp(vecType const & x, T minVal, T maxVal) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "'clamp' only accept floating-point or integer inputs"); return detail::compute_clamp_vector::value>::call(x, vecType(minVal), vecType(maxVal)); } template class vecType> GLM_FUNC_QUALIFIER vecType clamp(vecType const & x, vecType const & minVal, vecType const & maxVal) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "'clamp' only accept floating-point or integer inputs"); return detail::compute_clamp_vector::value>::call(x, minVal, maxVal); } @@ -600,7 +601,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType smoothstep(genType edge0, genType edge1, genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'smoothstep' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs"); genType const tmp(clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1))); return tmp * tmp * (genType(3) - genType(2) * tmp); @@ -746,7 +747,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType frexp(genType x, int & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'frexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); return std::frexp(x, &exp); } @@ -754,7 +755,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 frexp(tvec1 const & x, tvec1 & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'frexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); return tvec1(std::frexp(x.x, &exp.x)); } @@ -762,7 +763,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec2 frexp(tvec2 const & x, tvec2 & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'frexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); return tvec2( frexp(x.x, exp.x), @@ -772,7 +773,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec3 frexp(tvec3 const & x, tvec3 & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'frexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); return tvec3( frexp(x.x, exp.x), @@ -783,7 +784,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 frexp(tvec4 const & x, tvec4 & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'frexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); return tvec4( frexp(x.x, exp.x), @@ -795,7 +796,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType ldexp(genType const & x, int const & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'ldexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); return std::ldexp(x, exp); } @@ -803,7 +804,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 ldexp(tvec1 const & x, tvec1 const & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'ldexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); return tvec1( ldexp(x.x, exp.x)); @@ -812,7 +813,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec2 ldexp(tvec2 const & x, tvec2 const & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'ldexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); return tvec2( ldexp(x.x, exp.x), @@ -822,7 +823,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec3 ldexp(tvec3 const & x, tvec3 const & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'ldexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); return tvec3( ldexp(x.x, exp.x), @@ -833,7 +834,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 ldexp(tvec4 const & x, tvec4 const & exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'ldexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); return tvec4( ldexp(x.x, exp.x), diff --git a/glm/detail/func_matrix.inl b/glm/detail/func_matrix.inl index fcd1de30..6d1746be 100644 --- a/glm/detail/func_matrix.inl +++ b/glm/detail/func_matrix.inl @@ -358,14 +358,14 @@ namespace detail template class matType> GLM_FUNC_QUALIFIER matType matrixCompMult(matType const & x, matType const & y) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'matrixCompMult' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'matrixCompMult' only accept floating-point inputs"); return detail::compute_matrixCompMult::value>::call(x, y); } template class vecTypeA, template class vecTypeB> GLM_FUNC_QUALIFIER typename detail::outerProduct_trait::type outerProduct(vecTypeA const & c, vecTypeB const & r) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'outerProduct' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'outerProduct' only accept floating-point inputs"); typename detail::outerProduct_trait::type m(uninitialize); for(length_t i = 0; i < m.length(); ++i) @@ -376,21 +376,21 @@ namespace detail template class matType> GLM_FUNC_QUALIFIER typename matType::transpose_type transpose(matType const & m) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'transpose' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'transpose' only accept floating-point inputs"); return detail::compute_transpose::value>::call(m); } template class matType> GLM_FUNC_QUALIFIER T determinant(matType const & m) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'determinant' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'determinant' only accept floating-point inputs"); return detail::compute_determinant::value>::call(m); } template class matType> GLM_FUNC_QUALIFIER matType inverse(matType const & m) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'inverse' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'inverse' only accept floating-point inputs"); return detail::compute_inverse::value>::call(m); } }//namespace glm diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 5d7d311c..610c7473 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -608,6 +608,12 @@ // #define GLM_FORCE_UNRESTRICTED_GENTYPE +#ifdef GLM_FORCE_UNRESTRICTED_GENTYPE +# define GLM_UNRESTRICTED_GENTYPE 1 +#else +# define GLM_UNRESTRICTED_GENTYPE 0 +#endif + #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_UNRESTRICTED_GENTYPE_DISPLAYED) # define GLM_MESSAGE_UNRESTRICTED_GENTYPE_DISPLAYED # ifdef GLM_FORCE_UNRESTRICTED_GENTYPE diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index 9fc572ea..4b75d947 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -113,25 +113,25 @@ namespace glm X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4 ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid."); this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1), value_type(w1)); this->value[1] = col_type(static_cast(x2), value_type(y2), value_type(z2), value_type(w2)); @@ -149,10 +149,10 @@ namespace glm tvec4 const & v4 ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); this->value[0] = col_type(v1); this->value[1] = col_type(v2); diff --git a/readme.md b/readme.md index 99933db9..5e8c3176 100644 --- a/readme.md +++ b/readme.md @@ -52,6 +52,9 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) ## Release notes #### [GLM 0.9.8.3](https://github.com/g-truc/glm/tree/0.9.8) - 2016-XX-XX +##### Improvements: +- Broader support of GLM_FORCE_UNRESTRICTED_GENTYPE #378 + ##### Fixes: - Fixed Android build error with C++11 compiler but C++98 STL #284 #564