Workaround GCC compiler bug with constexpr support
This commit is contained in:
parent
e8ff04aaec
commit
152c71abff
@ -102,7 +102,15 @@ namespace glm
|
|||||||
// -- Explicit basic constructors --
|
// -- Explicit basic constructors --
|
||||||
|
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec1(ctor);
|
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec1(ctor);
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec1(T scalar);
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
GLM_FUNC_DECL GLM_CONSTEXPR_GCC explicit tvec1(T scalar);
|
||||||
|
|
||||||
// -- Conversion vector constructors --
|
// -- Conversion vector constructors --
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ namespace glm
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
template <typename T, precision P>
|
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)
|
: x(scalar)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user