diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 5e497459..d08b7c29 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -58,6 +58,7 @@ 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; static const type Y; @@ -66,6 +67,7 @@ namespace glm static const type XZ; static const type YZ; static const type XYZ; +# endif // -- Data -- diff --git a/glm/detail/type_vec3.inl b/glm/detail/type_vec3.inl index 51fbf23c..1db51ffb 100644 --- a/glm/detail/type_vec3.inl +++ b/glm/detail/type_vec3.inl @@ -32,30 +32,32 @@ namespace glm { -template -const tvec3 tvec3::ZERO = tvec3(static_cast(0), static_cast(0), static_cast(0)); -template -const tvec3 tvec3::X = tvec3(static_cast(1), static_cast(0), static_cast(0)); +# ifdef GLM_STATIC_CONST_MEMBERS + template + const tvec3 tvec3::ZERO = tvec3(static_cast(0), static_cast(0), static_cast(0)); -template -const tvec3 tvec3::Y = tvec3(static_cast(0), static_cast(1), static_cast(0)); + template + const tvec3 tvec3::X = tvec3(static_cast(1), static_cast(0), static_cast(0)); -template -const tvec3 tvec3::Z = tvec3(static_cast(0), static_cast(0), static_cast(1)); + template + const tvec3 tvec3::Y = tvec3(static_cast(0), static_cast(1), static_cast(0)); -template -const tvec3 tvec3::XY = tvec3(static_cast(1), static_cast(1), static_cast(0)); + template + const tvec3 tvec3::Z = tvec3(static_cast(0), static_cast(0), static_cast(1)); -template -const tvec3 tvec3::XZ = tvec3(static_cast(1), static_cast(0), static_cast(1)); + template + const tvec3 tvec3::XY = tvec3(static_cast(1), static_cast(1), static_cast(0)); -template -const tvec3 tvec3::YZ = tvec3(static_cast(0), static_cast(1), static_cast(1)); + template + const tvec3 tvec3::XZ = tvec3(static_cast(1), static_cast(0), static_cast(1)); -template -const tvec3 tvec3::XYZ = tvec3(static_cast(1), static_cast(1), static_cast(1)); + template + const tvec3 tvec3::YZ = tvec3(static_cast(0), static_cast(1), static_cast(1)); + template + const tvec3 tvec3::XYZ = tvec3(static_cast(1), static_cast(1), static_cast(1)); +# endif // -- Implicit basic constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/test/core/core_type_vec3.cpp b/test/core/core_type_vec3.cpp index 46e3f2d7..8b0c8d09 100644 --- a/test/core/core_type_vec3.cpp +++ b/test/core/core_type_vec3.cpp @@ -33,6 +33,7 @@ # define GLM_META_PROG_HELPERS #endif #define GLM_SWIZZLE +#define GLM_STATIC_CONST_MEMBERS #include #include #include