diff --git a/doc/api/a00023_source.html b/doc/api/a00023_source.html
index 73a0ccfdb..57bc29141 100644
--- a/doc/api/a00023_source.html
+++ b/doc/api/a00023_source.html
@@ -87,7 +87,7 @@ $(function() {
16 GLM_FUNC_QUALIFIER GLM_CONSTEXPR
static genFIType call(genFIType x)
-
+
19 std::numeric_limits<genFIType>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits<genFIType>::is_signed,
20 "'abs' only accept floating-point and integer scalar or vector inputs");
@@ -112,7 +112,7 @@ $(function() {
41 GLM_FUNC_QUALIFIER GLM_CONSTEXPR
static genFIType call(genFIType x)
-
+
44 (!std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer),
45 "'abs' only accept floating-point and integer scalar or vector inputs");
diff --git a/doc/api/a00035_source.html b/doc/api/a00035_source.html
index 504e985c3..a0ee7e4d2 100644
--- a/doc/api/a00035_source.html
+++ b/doc/api/a00035_source.html
@@ -501,11 +501,11 @@ $(function() {
440 #if GLM_HAS_STATIC_ASSERT
- 441 # define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
+ 441 # define static_assert(x, message) static_assert(x, message)
442 #elif GLM_COMPILER & GLM_COMPILER_VC
- 443 # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
+ 443 # define static_assert(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
- 445 # define GLM_STATIC_ASSERT(x, message) assert(x)
+ 445 # define static_assert(x, message) assert(x)
diff --git a/doc/api/a00740_source.html b/doc/api/a00740_source.html
index fbf09be38..304ad4623 100644
--- a/doc/api/a00740_source.html
+++ b/doc/api/a00740_source.html
@@ -97,19 +97,19 @@ $(function() {
32 template<std::
size_t I,glm::length_t L,
typename T,glm::qualifier Q>
33 struct tuple_element<I, glm::vec<L,T,Q>>
- 35 GLM_STATIC_ASSERT(I < L,
"Index out of bounds");
+ 35 static_assert(I < L,
"Index out of bounds");
38 template<std::
size_t I, glm::length_t C, glm::length_t R,
typename T, glm::qualifier Q>
39 struct tuple_element<I, glm::mat<C,R, T, Q>>
- 41 GLM_STATIC_ASSERT(I < C,
"Index out of bounds");
+ 41 static_assert(I < C,
"Index out of bounds");
42 typedef glm::vec<R,T,Q> type;
44 template<std::
size_t I,
typename T, glm::qualifier Q>
45 struct tuple_element<I, glm::qua<T, Q>>
- 47 GLM_STATIC_ASSERT(I < 4,
"Index out of bounds");
+ 47 static_assert(I < 4,
"Index out of bounds");
diff --git a/glm/detail/compute_common.hpp b/glm/detail/compute_common.hpp
index 83362bc7b..127d2479d 100644
--- a/glm/detail/compute_common.hpp
+++ b/glm/detail/compute_common.hpp
@@ -15,7 +15,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x)
{
- GLM_STATIC_ASSERT(
+ static_assert(
std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_signed,
"'abs' only accept floating-point and integer scalar or vector inputs");
@@ -40,7 +40,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x)
{
- GLM_STATIC_ASSERT(
+ static_assert(
(!std::numeric_limits::is_signed && std::numeric_limits::is_integer),
"'abs' only accept floating-point and integer scalar or vector inputs");
return x;
diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl
index 37314596d..390541528 100644
--- a/glm/detail/func_common.inl
+++ b/glm/detail/func_common.inl
@@ -16,7 +16,7 @@ namespace glm
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType min(genType x, genType y)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs");
return (y < x) ? y : x;
}
@@ -24,7 +24,7 @@ namespace glm
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType max(genType x, genType y)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs");
return (x < y) ? y : x;
}
@@ -89,7 +89,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec call(vec const& x, vec const& y, vec const& a)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
return vec(vec(x) * (static_cast(1) - a) + vec(y) * a);
}
@@ -112,7 +112,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec call(vec const& x, vec const& y, U const& a)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
return vec(vec(x) * (static_cast(1) - a) + vec(y) * a);
}
@@ -132,7 +132,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 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
return static_cast(static_cast(x) * (static_cast(1) - a) + static_cast(y) * a);
}
@@ -220,7 +220,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec call(vec const& a, vec const& b)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'mod' only accept floating-point inputs. Include for integer inputs.");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'mod' only accept floating-point inputs. Include for integer inputs.");
return a - b * floor(a / b);
}
};
@@ -275,7 +275,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec call(vec const& edge0, vec const& edge1, vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs");
vec const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast(0), static_cast(1)));
return tmp * tmp * (static_cast(3) - static_cast(2) * tmp);
}
@@ -349,7 +349,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genFIType sign(genFIType x)
{
- GLM_STATIC_ASSERT(
+ static_assert(
std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || (std::numeric_limits::is_signed && std::numeric_limits::is_integer),
"'sign' only accept signed inputs");
@@ -360,7 +360,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec sign(vec const& x)
{
- GLM_STATIC_ASSERT(
+ static_assert(
std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || (std::numeric_limits::is_signed && std::numeric_limits::is_integer),
"'sign' only accept signed inputs");
@@ -372,21 +372,21 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec floor(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'floor' only accept floating-point inputs.");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'floor' only accept floating-point inputs.");
return detail::compute_floor::value>::call(x);
}
template
GLM_FUNC_QUALIFIER vec trunc(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'trunc' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'trunc' only accept floating-point inputs");
return detail::compute_trunc::value>::call(x);
}
template
GLM_FUNC_QUALIFIER vec round(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'round' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'round' only accept floating-point inputs");
return detail::compute_round::value>::call(x);
}
@@ -395,8 +395,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType roundEven(genType const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs");
-
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs");
return genType(int(x + genType(int(x) % 2)));
}
*/
@@ -405,7 +404,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType roundEven(genType x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs");
int Integer = static_cast(x);
genType IntegerPart = static_cast(Integer);
@@ -436,7 +435,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec roundEven(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs");
return detail::functor1::call(roundEven, x);
}
@@ -445,7 +444,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec ceil(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ceil' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ceil' only accept floating-point inputs");
return detail::compute_ceil::value>::call(x);
}
@@ -459,7 +458,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec fract(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fract' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fract' only accept floating-point inputs");
return detail::compute_fract::value>::call(x);
}
@@ -547,7 +546,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType modf(genType x, genType & i)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'modf' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'modf' only accept floating-point inputs");
return std::modf(x, &i);
}
@@ -597,7 +596,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec min(vec const& a, T b)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs");
return detail::compute_min_vector::value>::call(a, vec(b));
}
@@ -611,7 +610,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec max(vec const& a, T b)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs");
return detail::compute_max_vector::value>::call(a, vec(b));
}
@@ -625,21 +624,21 @@ namespace detail
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType clamp(genType x, genType minVal, genType maxVal)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs");
return min(max(x, minVal), maxVal);
}
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec clamp(vec const& x, T minVal, T maxVal)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs");
return detail::compute_clamp_vector::value>::call(x, vec(minVal), vec(maxVal));
}
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec clamp(vec const& x, vec const& minVal, vec const& maxVal)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs");
return detail::compute_clamp_vector::value>::call(x, minVal, maxVal);
}
@@ -684,7 +683,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType smoothstep(genType edge0, genType edge1, genType x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_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);
@@ -707,7 +706,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec isnan(vec const& v)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isnan' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isnan' only accept floating-point inputs");
vec Result(0);
for (length_t l = 0; l < v.length(); ++l)
@@ -720,7 +719,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec isinf(vec const& v)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isinf' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isinf' only accept floating-point inputs");
vec Result(0);
for (length_t l = 0; l < v.length(); ++l)
@@ -809,7 +808,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType frexp(genType x, int& exp)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'frexp' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'frexp' only accept floating-point inputs");
return std::frexp(x, &exp);
}
@@ -817,7 +816,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec frexp(vec const& v, vec& exp)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'frexp' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'frexp' only accept floating-point inputs");
vec Result(0);
for (length_t l = 0; l < v.length(); ++l)
@@ -828,7 +827,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType ldexp(genType const& x, int const& exp)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ldexp' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ldexp' only accept floating-point inputs");
return std::ldexp(x, exp);
}
@@ -836,7 +835,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec ldexp(vec const& v, vec const& exp)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ldexp' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ldexp' only accept floating-point inputs");
vec Result(0);
for (length_t l = 0; l < v.length(); ++l)
diff --git a/glm/detail/func_exponential.inl b/glm/detail/func_exponential.inl
index fc7695def..167d91d30 100644
--- a/glm/detail/func_exponential.inl
+++ b/glm/detail/func_exponential.inl
@@ -17,7 +17,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec call(vec const& v)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'log2' only accept floating-point inputs. Include for integer inputs.");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'log2' only accept floating-point inputs. Include for integer inputs.");
return detail::functor1::call(log2, v);
}
@@ -108,7 +108,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec sqrt(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'sqrt' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'sqrt' only accept floating-point inputs");
return detail::compute_sqrt::value>::call(x);
}
@@ -122,7 +122,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec inversesqrt(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'inversesqrt' only accept floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'inversesqrt' only accept floating-point inputs");
return detail::compute_inversesqrt::value>::call(x);
}
}//namespace glm
diff --git a/glm/detail/func_geometric.inl b/glm/detail/func_geometric.inl
index 8f3cc7734..aea7a715e 100644
--- a/glm/detail/func_geometric.inl
+++ b/glm/detail/func_geometric.inl
@@ -74,7 +74,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<3, T, Q> call(vec<3, T, Q> const& x, vec<3, T, Q> const& y)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs");
return vec<3, T, Q>(
x.y * y.z - y.y * x.z,
@@ -84,7 +84,7 @@ namespace detail
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<4, T, Q> call(vec<4, T, Q> const& x, vec<4, T, Q> const& y)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs");
return vec<4, T, Q>(
x.y * y.z - y.y * x.z,
@@ -99,7 +99,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec call(vec const& v)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'normalize' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'normalize' accepts only floating-point inputs");
return v * inversesqrt(dot(v, v));
}
@@ -110,7 +110,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec call(vec const& N, vec const& I, vec const& Nref)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'normalize' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'normalize' accepts only floating-point inputs");
return dot(Nref, I) < static_cast(0) ? N : -N;
}
@@ -143,7 +143,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType length(genType x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'length' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'length' accepts only floating-point inputs");
return abs(x);
}
@@ -151,7 +151,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER T length(vec const& v)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'length' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'length' accepts only floating-point inputs");
return detail::compute_length::value>::call(v);
}
@@ -160,7 +160,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType distance(genType const& p0, genType const& p1)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'distance' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'distance' accepts only floating-point inputs");
return length(p1 - p0);
}
@@ -175,14 +175,14 @@ namespace detail
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T dot(T x, T y)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'dot' accepts only floating-point inputs");
return x * y;
}
template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T dot(vec const& x, vec const& y)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'dot' accepts only floating-point inputs");
return detail::compute_dot, T, detail::is_aligned::value>::call(x, y);
}
@@ -197,7 +197,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER genType normalize(genType const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'normalize' accepts only floating-point inputs");
+ static_assert(std::numeric_limits::is_iec559, "'normalize' accepts only floating-point inputs");
return x < genType(0) ? genType(-1) : genType(1);
}
@@ -205,7 +205,7 @@ namespace detail
template
GLM_FUNC_QUALIFIER vec normalize(vec const& x)
{
- GLM_STATIC_ASSERT(std::numeric_limits