diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 5e71ef48..0bf43585 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -623,8 +623,8 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType packUnorm(vecType const & v) { - static_assert(std::numeric_limits::is_integer, "uintType must be an integer type"); - static_assert(std::numeric_limits::is_iec559, "floatType must be a floating point type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); return vecType(round(clamp(v, static_cast(0), static_cast(1)) * static_cast(std::numeric_limits::max()))); } @@ -632,8 +632,8 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType unpackUnorm(vecType const & v) { - static_assert(std::numeric_limits::is_integer, "uintType must be an integer type"); - static_assert(std::numeric_limits::is_iec559, "floatType must be a floating point type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); return vecType(v) * (static_cast(1) / static_cast(std::numeric_limits::max())); } @@ -641,8 +641,8 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType packSnorm(vecType const & v) { - static_assert(std::numeric_limits::is_integer, "uintType must be an integer type"); - static_assert(std::numeric_limits::is_iec559, "floatType must be a floating point type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); return vecType(round(clamp(v , static_cast(-1), static_cast(1)) * static_cast(std::numeric_limits::max()))); } @@ -650,8 +650,8 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType unpackSnorm(vecType const & v) { - static_assert(std::numeric_limits::is_integer, "uintType must be an integer type"); - static_assert(std::numeric_limits::is_iec559, "floatType must be a floating point type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); return clamp(vecType(v) * (static_cast(1) / static_cast(std::numeric_limits::max())), static_cast(-1), static_cast(1)); }