Sync with latest GLM, fixes issue with MINGW (nw)

This commit is contained in:
Miodrag Milanovic 2016-05-05 20:48:39 +02:00
parent d3c0199769
commit b27adb7b7c
32 changed files with 67 additions and 52 deletions

View file

@ -723,16 +723,31 @@
# define GLM_DEFAULT_CTOR
#endif
#if GLM_HAS_CONSTEXPR_PARTIAL
#if GLM_HAS_CONSTEXPR
# define GLM_CONSTEXPR constexpr
# define GLM_CONSTEXPR_CTOR constexpr
# define GLM_RELAXED_CONSTEXPR constexpr
#elif GLM_HAS_CONSTEXPR_PARTIAL
# define GLM_CONSTEXPR constexpr
# define GLM_CONSTEXPR_CTOR
# define GLM_RELAXED_CONSTEXPR const
#else
# define GLM_CONSTEXPR
# define GLM_CONSTEXPR_CTOR
# define GLM_RELAXED_CONSTEXPR const
#endif
#if GLM_HAS_CONSTEXPR
# define GLM_RELAXED_CONSTEXPR constexpr
#if GLM_ARCH == GLM_ARCH_PURE
# define GLM_CONSTEXPR_SIMD GLM_CONSTEXPR
#else
# define GLM_RELAXED_CONSTEXPR const
# define GLM_CONSTEXPR_SIMD
#endif
// GCC 4.6 has a bug causing a compiler crash
#if GLM_COMPILER & GLM_COMPILER_GCC
# define GLM_CONSTEXPR_GCC
#else
# define GLM_CONSTEXPR_GCC GLM_CONSTEXPR
#endif
#ifdef GLM_FORCE_EXPLICIT_CTOR

View file

@ -60,7 +60,7 @@ namespace glm
template <precision Q>
GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat2x2(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat2x2(ctor);
GLM_FUNC_DECL explicit tmat2x2(T scalar);
GLM_FUNC_DECL tmat2x2(
T const & x1, T const & y1,

View file

@ -81,7 +81,7 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat2x2<T, P>::tmat2x2(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat2x2<T, P>::tmat2x2(ctor)
{}
template <typename T, precision P>

View file

@ -61,7 +61,7 @@ namespace glm
template <precision Q>
GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat2x3(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat2x3(ctor);
GLM_FUNC_DECL explicit tmat2x3(T scalar);
GLM_FUNC_DECL tmat2x3(
T x0, T y0, T z0,

View file

@ -63,7 +63,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat2x3<T, P>::tmat2x3(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat2x3<T, P>::tmat2x3(ctor)
{}
template <typename T, precision P>

View file

@ -61,7 +61,7 @@ namespace glm
template <precision Q>
GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat2x4(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat2x4(ctor);
GLM_FUNC_DECL explicit tmat2x4(T scalar);
GLM_FUNC_DECL tmat2x4(
T x0, T y0, T z0, T w0,

View file

@ -63,7 +63,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat2x4<T, P>::tmat2x4(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat2x4<T, P>::tmat2x4(ctor)
{}
template <typename T, precision P>

View file

@ -61,7 +61,7 @@ namespace glm
template <precision Q>
GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat3x2(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat3x2(ctor);
GLM_FUNC_DECL explicit tmat3x2(T scalar);
GLM_FUNC_DECL tmat3x2(
T x0, T y0,

View file

@ -66,7 +66,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat3x2<T, P>::tmat3x2(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat3x2<T, P>::tmat3x2(ctor)
{}
template <typename T, precision P>

View file

@ -60,7 +60,7 @@ namespace glm
template <precision Q>
GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat3x3(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat3x3(ctor);
GLM_FUNC_DECL explicit tmat3x3(T scalar);
GLM_FUNC_DECL tmat3x3(
T x0, T y0, T z0,

View file

@ -90,7 +90,7 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat3x3<T, P>::tmat3x3(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat3x3<T, P>::tmat3x3(ctor)
{}
template <typename T, precision P>

View file

@ -61,7 +61,7 @@ namespace glm
template <precision Q>
GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat3x4(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat3x4(ctor);
GLM_FUNC_DECL explicit tmat3x4(T scalar);
GLM_FUNC_DECL tmat3x4(
T x0, T y0, T z0, T w0,

View file

@ -66,7 +66,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat3x4<T, P>::tmat3x4(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat3x4<T, P>::tmat3x4(ctor)
{}
template <typename T, precision P>

View file

@ -61,7 +61,7 @@ namespace glm
template <precision Q>
GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat4x2(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat4x2(ctor);
GLM_FUNC_DECL explicit tmat4x2(T scalar);
GLM_FUNC_DECL tmat4x2(
T x0, T y0,

View file

@ -76,7 +76,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat4x2<T, P>::tmat4x2(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat4x2<T, P>::tmat4x2(ctor)
{}
template <typename T, precision P>

View file

@ -57,11 +57,11 @@ namespace glm
// -- Constructors --
GLM_FUNC_DECL tmat4x3() GLM_DEFAULT_CTOR;
GLM_FUNC_DECL GLM_CONSTEXPR tmat4x3(tmat4x3<T, P> const & m) GLM_DEFAULT;
GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m) GLM_DEFAULT;
template <precision Q>
GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat4x3(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat4x3(ctor);
GLM_FUNC_DECL explicit tmat4x3(T const & x);
GLM_FUNC_DECL tmat4x3(
T const & x0, T const & y0, T const & z0,

View file

@ -69,7 +69,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat4x3<T, P>::tmat4x3(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat4x3<T, P>::tmat4x3(ctor)
{}
template <typename T, precision P>

View file

@ -60,7 +60,7 @@ namespace glm
template <precision Q>
GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat4x4(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat4x4(ctor);
GLM_FUNC_DECL explicit tmat4x4(T const & x);
GLM_FUNC_DECL tmat4x4(
T const & x0, T const & y0, T const & z0, T const & w0,

View file

@ -129,7 +129,7 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tmat4x4<T, P>::tmat4x4(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat4x4<T, P>::tmat4x4(ctor)
{}
template <typename T, precision P>

View file

@ -101,8 +101,8 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec1(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec1(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec1(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_GCC explicit tvec1(T scalar);
// -- Conversion vector constructors --

View file

@ -59,11 +59,11 @@ namespace glm
// -- Explicit basic constructors --
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec1<T, P>::tvec1(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1<T, P>::tvec1(ctor)
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec1<T, P>::tvec1(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_GCC tvec1<T, P>::tvec1(T scalar)
: x(scalar)
{}

View file

@ -101,8 +101,8 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec2(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec2(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec2(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_GCC explicit tvec2(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR tvec2(T s1, T s2);
// -- Conversion constructors --

View file

@ -68,11 +68,11 @@ namespace glm
// -- Explicit basic constructors --
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec2<T, P>::tvec2(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2<T, P>::tvec2(ctor)
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec2<T, P>::tvec2(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_GCC tvec2<T, P>::tvec2(T scalar)
: x(scalar), y(scalar)
{}

View file

@ -102,8 +102,8 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec3(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec3(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec3(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_GCC explicit tvec3(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR tvec3(T a, T b, T c);
// -- Conversion scalar constructors --

View file

@ -85,11 +85,11 @@ namespace glm
// -- Explicit basic constructors --
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec3<T, P>::tvec3(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec3<T, P>::tvec3(ctor)
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec3<T, P>::tvec3(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_GCC tvec3<T, P>::tvec3(T scalar)
: x(scalar), y(scalar), z(scalar)
{}

View file

@ -157,9 +157,9 @@ namespace detail
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec4(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec4(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR tvec4(T a, T b, T c, T d);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec4(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit tvec4(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD tvec4(T a, T b, T c, T d);
// -- Conversion scalar constructors --

View file

@ -59,16 +59,16 @@ namespace glm
// -- Explicit basic constructors --
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec4<T, P>::tvec4(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4(ctor)
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec4<T, P>::tvec4(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4(T scalar)
: x(scalar), y(scalar), z(scalar), w(scalar)
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec4<T, P>::tvec4(T a, T b, T c, T d)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4(T a, T b, T c, T d)
: x(a), y(b), z(c), w(d)
{}

View file

@ -36,7 +36,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec4<float, simd>::tvec4()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, simd>::tvec4()
# ifndef GLM_FORCE_NO_CTOR_INIT
: data(_mm_setzero_ps())
# endif
@ -44,12 +44,12 @@ namespace glm
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec4<float, simd>::tvec4(float s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, simd>::tvec4(float s) :
data(_mm_set1_ps(s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec4<float, simd>::tvec4(float a, float b, float c, float d) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, simd>::tvec4(float a, float b, float c, float d) :
data(_mm_set_ps(d, c, b, a))
{}

View file

@ -89,7 +89,7 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR explicit tquat(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tquat(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & s, tvec3<T, P> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & w, T const & x, T const & y, T const & z);

View file

@ -98,7 +98,7 @@ namespace detail
// -- Explicit basic constructors --
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tquat<T, P>::tquat(ctor)
{}
template <typename T, precision P>

View file

@ -88,7 +88,7 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR explicit tdualquat(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tdualquat(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, P> const & real);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, P> const & orientation, tvec3<T, P> const & translation);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, P> const & real, tquat<T, P> const & dual);
@ -98,8 +98,8 @@ namespace glm
template <typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tdualquat<U, Q> const & q);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tmat2x4<T, P> const & holder_mat);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tmat3x4<T, P> const & aug_mat);
GLM_FUNC_DECL GLM_EXPLICIT tdualquat(tmat2x4<T, P> const & holder_mat);
GLM_FUNC_DECL GLM_EXPLICIT tdualquat(tmat3x4<T, P> const & aug_mat);
// -- Unary arithmetic operators --

View file

@ -87,7 +87,7 @@ namespace glm
// -- Explicit basic constructors --
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, P>::tdualquat(ctor)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tdualquat<T, P>::tdualquat(ctor)
{}
template <typename T, precision P>
@ -119,13 +119,13 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, P>::tdualquat(tmat2x4<T, P> const & m)
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tmat2x4<T, P> const & m)
{
*this = dualquat_cast(m);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, P>::tdualquat(tmat3x4<T, P> const & m)
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tmat3x4<T, P> const & m)
{
*this = dualquat_cast(m);
}