diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 11783c4b..f59e1c96 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -59,8 +59,10 @@ namespace glm static GLM_RELAXED_CONSTEXPR precision prec = P; # endif//GLM_META_PROG_HELPERS +# ifdef GLM_STATIC_CONST_MEMBERS static const type ZERO; static const type X; +# endif // -- Data -- # if GLM_HAS_ANONYMOUS_UNION diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 5a6c4d7a..5dfc2556 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -32,11 +32,13 @@ namespace glm { +# ifdef GLM_STATIC_CONST_MEMBERS template const tvec1 tvec1::X = tvec1(static_cast(1)); template const tvec1 tvec1::ZERO = tvec1(static_cast(0)); +# endif // -- Implicit basic constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/test/core/core_type_vec1.cpp b/test/core/core_type_vec1.cpp index 3a51be94..32c23670 100644 --- a/test/core/core_type_vec1.cpp +++ b/test/core/core_type_vec1.cpp @@ -32,6 +32,7 @@ #if !(GLM_COMPILER & GLM_COMPILER_GCC) # define GLM_META_PROG_HELPERS #endif +#define GLM_STATIC_CONST_MEMBERS #define GLM_SWIZZLE #include #include