mirror of
https://github.com/g-truc/glm.git
synced 2026-06-08 10:33:48 +00:00
Remove GLM_HAS_STATIC_ASSERT C++11 workarounds
This commit is contained in:
@@ -950,7 +950,7 @@ namespace sign
|
||||
template<typename genFIType>
|
||||
GLM_FUNC_QUALIFIER genFIType sign_if(genFIType x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
static_assert(
|
||||
std::numeric_limits<genFIType>::is_iec559 ||
|
||||
(std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer), "'sign' only accept signed inputs");
|
||||
|
||||
@@ -972,7 +972,7 @@ namespace sign
|
||||
template<typename genFIType>
|
||||
GLM_FUNC_QUALIFIER genFIType sign_alu1(genFIType x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
static_assert(
|
||||
std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,
|
||||
"'sign' only accept integer inputs");
|
||||
|
||||
@@ -985,7 +985,7 @@ namespace sign
|
||||
|
||||
GLM_FUNC_QUALIFIER int sign_alu2(int x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<int>::is_signed && std::numeric_limits<int>::is_integer, "'sign' only accept integer inputs");
|
||||
static_assert(std::numeric_limits<int>::is_signed && std::numeric_limits<int>::is_integer, "'sign' only accept integer inputs");
|
||||
|
||||
# if GLM_COMPILER & GLM_COMPILER_VC
|
||||
# pragma warning(push)
|
||||
@@ -1002,7 +1002,7 @@ namespace sign
|
||||
template<typename genFIType>
|
||||
GLM_FUNC_QUALIFIER genFIType sign_sub(genFIType x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
static_assert(
|
||||
std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,
|
||||
"'sign' only accept integer inputs");
|
||||
|
||||
@@ -1012,7 +1012,7 @@ namespace sign
|
||||
template<typename genFIType>
|
||||
GLM_FUNC_QUALIFIER genFIType sign_cmp(genFIType x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
static_assert(
|
||||
std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,
|
||||
"'sign' only accept integer inputs");
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace bitfieldReverse
|
||||
template<glm::length_t L, typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER glm::vec<L, T, Q> bitfieldReverseLoop(glm::vec<L, T, Q> const& v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldReverse' only accept integer values");
|
||||
static_assert(std::numeric_limits<T>::is_integer, "'bitfieldReverse' only accept integer values");
|
||||
|
||||
glm::vec<L, T, Q> Result(0);
|
||||
T const BitSize = static_cast<T>(sizeof(T) * 8);
|
||||
@@ -567,7 +567,7 @@ namespace findMSB
|
||||
template<typename genIUType>
|
||||
static int findMSB_intrinsic(genIUType Value)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||
static_assert(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||
|
||||
if(Value == 0)
|
||||
return -1;
|
||||
@@ -582,7 +582,7 @@ namespace findMSB
|
||||
template<typename genIUType>
|
||||
static int findMSB_avx(genIUType Value)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||
static_assert(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||
|
||||
if(Value == 0)
|
||||
return -1;
|
||||
@@ -594,7 +594,7 @@ namespace findMSB
|
||||
template<typename genIUType>
|
||||
static int findMSB_095(genIUType Value)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||
static_assert(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||
|
||||
if(Value == genIUType(0) || Value == genIUType(-1))
|
||||
return -1;
|
||||
@@ -618,7 +618,7 @@ namespace findMSB
|
||||
template<typename genIUType>
|
||||
static int findMSB_nlz1(genIUType x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||
static_assert(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||
|
||||
if (x == 0)
|
||||
return -1;
|
||||
@@ -970,7 +970,7 @@ namespace findLSB
|
||||
template<typename genIUType>
|
||||
static int findLSB_intrinsic(genIUType Value)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findLSB' only accept integer values");
|
||||
static_assert(std::numeric_limits<genIUType>::is_integer, "'findLSB' only accept integer values");
|
||||
|
||||
if(Value == 0)
|
||||
return -1;
|
||||
@@ -984,7 +984,7 @@ namespace findLSB
|
||||
template<typename genIUType>
|
||||
static int findLSB_095(genIUType Value)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findLSB' only accept integer values");
|
||||
static_assert(std::numeric_limits<genIUType>::is_integer, "'findLSB' only accept integer values");
|
||||
if(Value == 0)
|
||||
return -1;
|
||||
|
||||
@@ -1397,7 +1397,7 @@ namespace bitCount
|
||||
template<typename T>
|
||||
inline int bitCount_if(T v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitCount' only accept integer values");
|
||||
static_assert(std::numeric_limits<T>::is_integer, "'bitCount' only accept integer values");
|
||||
|
||||
int Count(0);
|
||||
for(T i = 0, n = static_cast<T>(sizeof(T) * 8); i < n; ++i)
|
||||
@@ -1411,7 +1411,7 @@ namespace bitCount
|
||||
template<typename T>
|
||||
inline int bitCount_vec(T v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitCount' only accept integer values");
|
||||
static_assert(std::numeric_limits<T>::is_integer, "'bitCount' only accept integer values");
|
||||
|
||||
int Count(0);
|
||||
for(T i = 0, n = static_cast<T>(sizeof(T) * 8); i < n; ++i)
|
||||
|
||||
Reference in New Issue
Block a user