diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index ad160b20..7ebf1e66 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -55,17 +55,10 @@ namespace glm friend tvec2 operator/(tvec2 const & v, tmat2x2 const & m); # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 2; - static GLM_CONSTEXPR length_t columns = 2; - static GLM_CONSTEXPR length_t rows = 2; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 2; - static const length_t columns = 2; - static const length_t rows = 2; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 2; + static GLM_CONSTEXPR_MAYBE length_t columns = 2; + static GLM_CONSTEXPR_MAYBE length_t rows = 2; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS private: diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index af37884e..51a1a862 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -51,17 +51,10 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 2; - static GLM_CONSTEXPR length_t cols = 3; - static GLM_CONSTEXPR length_t rows = 2; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 2; - static const length_t cols = 3; - static const length_t rows = 2; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 2; + static GLM_CONSTEXPR_MAYBE length_t cols = 3; + static GLM_CONSTEXPR_MAYBE length_t rows = 2; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS private: diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index 48521460..9f776899 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -51,17 +51,10 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 2; - static GLM_CONSTEXPR length_t cols = 4; - static GLM_CONSTEXPR length_t rows = 2; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 2; - static const length_t cols = 4; - static const length_t rows = 2; - static const precision prec = P; -# endif + static GLM_CONSTEXPR_MAYBE length_t components = 2; + static GLM_CONSTEXPR_MAYBE length_t cols = 4; + static GLM_CONSTEXPR_MAYBE length_t rows = 2; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS private: diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index d5480432..5bbeed79 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -51,17 +51,10 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 3; - static GLM_CONSTEXPR length_t cols = 2; - static GLM_CONSTEXPR length_t rows = 3; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 3; - static const length_t cols = 2; - static const length_t rows = 3; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 3; + static GLM_CONSTEXPR_MAYBE length_t cols = 2; + static GLM_CONSTEXPR_MAYBE length_t rows = 3; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS private: diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index 73142e6b..83b18efb 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -49,17 +49,12 @@ namespace glm typedef tmat3x3 transpose_type; typedef T value_type; -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 3; - static GLM_CONSTEXPR length_t cols = 3; - static GLM_CONSTEXPR length_t rows = 3; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 3; - static const length_t cols = 3; - static const length_t rows = 3; - static const precision prec = P; -# endif +# ifdef GLM_META_PROG_HELPERS + static GLM_CONSTEXPR_MAYBE length_t components = 3; + static GLM_CONSTEXPR_MAYBE length_t cols = 3; + static GLM_CONSTEXPR_MAYBE length_t rows = 3; + static GLM_CONSTEXPR_MAYBE precision prec = P; +# endif//GLM_META_PROG_HELPERS template friend tvec3 operator/(tmat3x3 const & m, tvec3 const & v); diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index 8074ea43..d894c9ee 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -51,17 +51,10 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 3; - static GLM_CONSTEXPR length_t cols = 4; - static GLM_CONSTEXPR length_t rows = 3; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 3; - static const length_t cols = 4; - static const length_t rows = 3; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 3; + static GLM_CONSTEXPR_MAYBE length_t cols = 4; + static GLM_CONSTEXPR_MAYBE length_t rows = 3; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS private: diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index 3bc73706..95b7d3dc 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -51,17 +51,10 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 4; - static GLM_CONSTEXPR length_t cols = 2; - static GLM_CONSTEXPR length_t rows = 4; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 4; - static const length_t cols = 2; - static const length_t rows = 4; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 4; + static GLM_CONSTEXPR_MAYBE length_t cols = 2; + static GLM_CONSTEXPR_MAYBE length_t rows = 4; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS private: diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index a0ff185c..cab8872c 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -51,17 +51,10 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 4; - static GLM_CONSTEXPR length_t cols = 3; - static GLM_CONSTEXPR length_t rows = 4; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 4; - static const length_t cols = 3; - static const length_t rows = 4; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 4; + static GLM_CONSTEXPR_MAYBE length_t cols = 3; + static GLM_CONSTEXPR_MAYBE length_t rows = 4; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS private: diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index 0973fd83..f34d8fe8 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -50,17 +50,10 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 4; - static GLM_CONSTEXPR length_t cols = 4; - static GLM_CONSTEXPR length_t rows = 4; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 4; - static const length_t cols = 4; - static const length_t rows = 4; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 4; + static GLM_CONSTEXPR_MAYBE length_t cols = 4; + static GLM_CONSTEXPR_MAYBE length_t rows = 4; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS template diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index ce0a00db..c1cfea25 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -56,13 +56,8 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 1; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 1; - static const precision prec = P; -# endif + static GLM_CONSTEXPR_MAYBE length_t components = 1; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS ////////////////////////////////////// diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index d25de4ea..b328e88a 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -56,13 +56,8 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 2; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 2; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 2; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS ////////////////////////////////////// diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index b0abde48..0fcee272 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -47,7 +47,7 @@ namespace glm { template struct tvec3 - { + { ////////////////////////////////////// // Implementation detail @@ -56,13 +56,8 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 3; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 3; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 3; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS ////////////////////////////////////// diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index c0f07661..265f9dae 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -110,13 +110,8 @@ namespace detail typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 4; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 4; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 4; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS ////////////////////////////////////// diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 97c7dc50..4be2782e 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -66,13 +66,8 @@ namespace glm typedef T value_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 4; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 4; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 4; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS public: diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index 10ffa836..3b5c87b4 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -65,13 +65,8 @@ namespace glm typedef glm::tquat part_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 8; - static GLM_CONSTEXPR precision prec = P; -# else - static const length_t components = 8; - static const precision prec = P; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 8; + static GLM_CONSTEXPR_MAYBE precision prec = P; # endif//GLM_META_PROG_HELPERS public: diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index 649bdef2..7373431b 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -72,17 +72,10 @@ namespace detail typedef fmat4x4SIMD transpose_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 4; - static GLM_CONSTEXPR length_t cols = 4; - static GLM_CONSTEXPR length_t rows = 4; - static GLM_CONSTEXPR precision prec = defaultp; -# else - static const length_t components = 4; - static const length_t cols = 4; - static const length_t rows = 4; - static const precision prec = defaultp; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 4; + static GLM_CONSTEXPR_MAYBE length_t cols = 4; + static GLM_CONSTEXPR_MAYBE length_t rows = 4; + static GLM_CONSTEXPR_MAYBE precision prec = defaultp; # endif//GLM_META_PROG_HELPERS GLM_FUNC_DECL length_t length() const; diff --git a/glm/gtx/simd_quat.hpp b/glm/gtx/simd_quat.hpp index 8595bc99..82df9abf 100644 --- a/glm/gtx/simd_quat.hpp +++ b/glm/gtx/simd_quat.hpp @@ -77,13 +77,8 @@ namespace detail typedef tquat bool_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 4; - static GLM_CONSTEXPR precision prec = defaultp; -# else - static const length_t components = 4; - static const precision prec = defaultp; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 4; + static GLM_CONSTEXPR_MAYBE precision prec = defaultp; # endif//GLM_META_PROG_HELPERS #ifdef GLM_SIMD_ENABLE_XYZW_UNION diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index d576bbc2..149f9111 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -100,13 +100,8 @@ namespace detail typedef tvec4 bool_type; # ifdef GLM_META_PROG_HELPERS -# if GLM_HAS_CONSTEXPR - static GLM_CONSTEXPR length_t components = 4; - static GLM_CONSTEXPR precision prec = defaultp; -# else - static const length_t components = 4; - static const precision prec = defaultp; -# endif//GLM_HAS_CONSTEXPR + static GLM_CONSTEXPR_MAYBE length_t components = 4; + static GLM_CONSTEXPR_MAYBE precision prec = defaultp; # endif//GLM_META_PROG_HELPERS #ifdef GLM_SIMD_ENABLE_XYZW_UNION