diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 02397973..a026fd30 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -926,8 +926,14 @@ #if GLM_HAS_DEFAULTED_FUNCTIONS # define GLM_DEFAULT = default +# ifdef GLM_FORCE_NO_CTOR_INIT +# define GLM_DEFAULT_CTOR = default +# else +# define GLM_DEFAULT_CTOR +# endif #else # define GLM_DEFAULT +# define GLM_DEFAULT_CTOR #endif #if GLM_HAS_CONSTEXPR diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index 29585654..48b40402 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -68,7 +68,7 @@ namespace glm ////////////////////////////////////// // Constructors - GLM_FUNC_DECL tmat2x2() GLM_DEFAULT; + GLM_FUNC_DECL tmat2x2() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat2x2(tmat2x2 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat2x2(tmat2x2 const & m); diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index 640cb824..477122af 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -53,7 +53,7 @@ namespace detail ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat2x2::tmat2x2() { @@ -62,7 +62,9 @@ namespace detail this->value[1] = col_type(0, 1); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x2 const & m) { diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index 76216634..4a55ae9b 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -62,7 +62,8 @@ namespace glm public: // Constructors - GLM_FUNC_DECL tmat2x3() GLM_DEFAULT; + + GLM_FUNC_DECL tmat2x3() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat2x3(tmat2x3 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index fd90a807..2857577a 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -35,7 +35,7 @@ namespace glm ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat2x3::tmat2x3() { @@ -44,7 +44,9 @@ namespace glm this->value[1] = col_type(0, 1, 0); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x3 const & m) { diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index 0b3395f9..c0391541 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -58,13 +58,12 @@ namespace glm # endif//GLM_META_PROG_HELPERS private: - /// @cond DETAIL col_type value[2]; - /// @endcond public: // Constructors - GLM_FUNC_DECL tmat2x4() GLM_DEFAULT; + + GLM_FUNC_DECL tmat2x4() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat2x4(tmat2x4 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index 6df47937..e45959dd 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -35,7 +35,7 @@ namespace glm ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat2x4::tmat2x4() { @@ -44,7 +44,9 @@ namespace glm this->value[1] = col_type(0, 1, 0, 0); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x4 const & m) { diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index ff452fbf..61c1de88 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -58,14 +58,12 @@ namespace glm # endif//GLM_META_PROG_HELPERS private: - /// @cond DETAIL col_type value[3]; - /// @endcond public: // Constructors - GLM_FUNC_DECL tmat3x2() GLM_DEFAULT; + GLM_FUNC_DECL tmat3x2() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat3x2(tmat3x2 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 967a4418..395d1c4d 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -35,7 +35,7 @@ namespace glm ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat3x2::tmat3x2() { @@ -45,7 +45,9 @@ namespace glm this->value[2] = col_type(0, 0); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x2 const & m) { diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index 93608455..97996a98 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -69,7 +69,7 @@ namespace glm public: // Constructors - GLM_FUNC_DECL tmat3x3() GLM_DEFAULT; + GLM_FUNC_DECL tmat3x3() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat3x3(tmat3x3 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index 17141fab..e36a574f 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -59,7 +59,7 @@ namespace detail ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat3x3::tmat3x3() { @@ -69,7 +69,9 @@ namespace detail this->value[2] = col_type(0, 0, 1); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x3 const & m) { diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index e058a36c..da728dd8 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -65,7 +65,7 @@ namespace glm public: // Constructors - GLM_FUNC_DECL tmat3x4() GLM_DEFAULT; + GLM_FUNC_DECL tmat3x4() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat3x4(tmat3x4 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index ba717a7c..dcff32c6 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -35,7 +35,7 @@ namespace glm ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat3x4::tmat3x4() { @@ -45,7 +45,9 @@ namespace glm this->value[2] = col_type(0, 0, 1, 0); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x4 const & m) { diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index b213e699..ecea8785 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -65,7 +65,7 @@ namespace glm public: // Constructors - GLM_FUNC_DECL tmat4x2() GLM_DEFAULT; + GLM_FUNC_DECL tmat4x2() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat4x2(tmat4x2 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index 8a6b813b..5741f25f 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -35,7 +35,7 @@ namespace glm ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat4x2::tmat4x2() { @@ -46,7 +46,9 @@ namespace glm this->value[3] = col_type(0, 0); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x2 const & m) { diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index f6e69956..65a00c3c 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -63,7 +63,7 @@ namespace glm public: // Constructors - GLM_FUNC_DECL tmat4x3() GLM_DEFAULT; + GLM_FUNC_DECL tmat4x3() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat4x3(tmat4x3 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index 28847624..11eada6b 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -35,7 +35,7 @@ namespace glm ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat4x3::tmat4x3() { @@ -46,7 +46,9 @@ namespace glm this->value[3] = col_type(0, 0, 0); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x3 const & m) { diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index 4cf6791d..07f0f641 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -66,7 +66,7 @@ namespace glm public: // Constructors - GLM_FUNC_DECL tmat4x4() GLM_DEFAULT; + GLM_FUNC_DECL tmat4x4() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tmat4x4(tmat4x4 const & m) GLM_DEFAULT; template GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index a8bd03e5..0b8b4a3d 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -95,7 +95,7 @@ namespace detail ////////////////////////////////////////////////////////////// // Constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tmat4x4::tmat4x4() { @@ -106,7 +106,9 @@ namespace detail this->value[3] = col_type(0, 0, 0, 1); # endif } +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x4 const & m) { diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 36f15ff0..353602f6 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -112,7 +112,7 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors - GLM_FUNC_DECL tvec1() GLM_DEFAULT; + GLM_FUNC_DECL tvec1() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tvec1(tvec1 const & v) GLM_DEFAULT; template GLM_FUNC_DECL tvec1(tvec1 const & v); diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 887e9ab3..84776622 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -35,14 +35,16 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tvec1::tvec1() # ifndef GLM_FORCE_NO_CTOR_INIT : x(0) # endif {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tvec1::tvec1(tvec1 const & v) : x(v.x) diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index 62f9ac19..4daf9a00 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -113,7 +113,7 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors - GLM_FUNC_DECL tvec2() GLM_DEFAULT; + GLM_FUNC_DECL tvec2() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tvec2(tvec2 const & v) GLM_DEFAULT; template GLM_FUNC_DECL tvec2(tvec2 const & v); diff --git a/glm/detail/type_vec2.inl b/glm/detail/type_vec2.inl index 5458e54a..240a010e 100644 --- a/glm/detail/type_vec2.inl +++ b/glm/detail/type_vec2.inl @@ -31,14 +31,16 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tvec2::tvec2() # ifndef GLM_FORCE_NO_CTOR_INIT : x(0), y(0) # endif {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tvec2::tvec2(tvec2 const & v) : x(v.x), y(v.y) diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index c74fde18..5a8bb0a6 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -114,7 +114,7 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors - GLM_FUNC_DECL tvec3() GLM_DEFAULT; + GLM_FUNC_DECL tvec3() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tvec3(tvec3 const & v) GLM_DEFAULT; template GLM_FUNC_DECL tvec3(tvec3 const & v); diff --git a/glm/detail/type_vec3.inl b/glm/detail/type_vec3.inl index a032cd3f..247ad25e 100644 --- a/glm/detail/type_vec3.inl +++ b/glm/detail/type_vec3.inl @@ -35,14 +35,16 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tvec3::tvec3() # ifndef GLM_FORCE_NO_CTOR_INIT : x(0), y(0), z(0) # endif {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tvec3::tvec3(tvec3 const & v) : x(v.x), y(v.y), z(v.z) diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index fb6a6760..88954e85 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -171,7 +171,7 @@ namespace detail ////////////////////////////////////// // Implicit basic constructors - GLM_FUNC_DECL tvec4() GLM_DEFAULT; + GLM_FUNC_DECL tvec4() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tvec4(tvec4 const & v) GLM_DEFAULT; template GLM_FUNC_DECL tvec4(tvec4 const & v); diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 35869cb7..c866f0b7 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -35,14 +35,16 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tvec4::tvec4() # ifndef GLM_FORCE_NO_CTOR_INIT : x(0), y(0), z(0), w(0) # endif {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec4 const & v) : x(v.x), y(v.y), z(v.z), w(v.w) diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 2478c7c7..28c22b23 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -95,7 +95,7 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors - GLM_FUNC_DECL tquat() GLM_DEFAULT; + GLM_FUNC_DECL tquat() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tquat(tquat const & q) GLM_DEFAULT; template GLM_FUNC_DECL tquat(tquat const & q); diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 73eab726..063a1093 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -97,14 +97,16 @@ namespace detail ////////////////////////////////////// // Implicit basic constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tquat::tquat() # ifndef GLM_FORCE_NO_CTOR_INIT : x(0), y(0), z(0), w(1) # endif {} +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tquat::tquat(tquat const & q) : x(q.x), y(q.y), z(q.z), w(q.w) diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index ad861afd..3a0dd18a 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -94,7 +94,7 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors - GLM_FUNC_DECL tdualquat() GLM_DEFAULT; + GLM_FUNC_DECL tdualquat() GLM_DEFAULT_CTOR; GLM_FUNC_DECL tdualquat(tdualquat const & d) GLM_DEFAULT; template GLM_FUNC_DECL tdualquat(tdualquat const & d); diff --git a/glm/gtx/dual_quaternion.inl b/glm/gtx/dual_quaternion.inl index 7d2ed2ac..b242217f 100644 --- a/glm/gtx/dual_quaternion.inl +++ b/glm/gtx/dual_quaternion.inl @@ -83,7 +83,7 @@ namespace glm ////////////////////////////////////// // Implicit basic constructors -# if !GLM_HAS_DEFAULTED_FUNCTIONS +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) template GLM_FUNC_QUALIFIER tdualquat::tdualquat() # ifndef GLM_FORCE_NO_CTOR_INIT @@ -91,7 +91,9 @@ namespace glm , dual(tquat(0, 0, 0, 0)) # endif {} +# endif +# if !GLM_HAS_DEFAULTED_FUNCTIONS template GLM_FUNC_QUALIFIER tdualquat::tdualquat(tdualquat const & d) : real(d.real) diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index a321d1ed..6f13855b 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -85,7 +85,7 @@ namespace detail ////////////////////////////////////// // Constructors - fmat4x4SIMD(); + fmat4x4SIMD() GLM_DEFAULT_CTOR; explicit fmat4x4SIMD(float const & s); explicit fmat4x4SIMD( float const & x0, float const & y0, float const & z0, float const & w0, @@ -120,7 +120,7 @@ namespace detail fvec4SIMD const & operator[](length_t i) const; // Unary updatable operators - fmat4x4SIMD & operator= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator= (fmat4x4SIMD const & m) GLM_DEFAULT; fmat4x4SIMD & operator+= (float const & s); fmat4x4SIMD & operator+= (fmat4x4SIMD const & m); fmat4x4SIMD & operator-= (float const & s); diff --git a/glm/gtx/simd_mat4.inl b/glm/gtx/simd_mat4.inl index 14c8b45e..13dcb20f 100644 --- a/glm/gtx/simd_mat4.inl +++ b/glm/gtx/simd_mat4.inl @@ -64,15 +64,17 @@ GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[] ////////////////////////////////////////////////////////////// // Constructors -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD() -{ -# ifndef GLM_FORCE_NO_CTOR_INIT - this->Data[0] = fvec4SIMD(1, 0, 0, 0); - this->Data[1] = fvec4SIMD(0, 1, 0, 0); - this->Data[2] = fvec4SIMD(0, 0, 1, 0); - this->Data[3] = fvec4SIMD(0, 0, 0, 1); -# endif -} +#if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) + GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD() + { +# ifndef GLM_FORCE_NO_CTOR_INIT + this->Data[0] = fvec4SIMD(1, 0, 0, 0); + this->Data[1] = fvec4SIMD(0, 1, 0, 0); + this->Data[2] = fvec4SIMD(0, 0, 1, 0); + this->Data[3] = fvec4SIMD(0, 0, 0, 1); +# endif + } +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s) { @@ -135,17 +137,19 @@ GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD ////////////////////////////////////////////////////////////// // mat4 operators -GLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= -( - fmat4x4SIMD const & m -) -{ - this->Data[0] = m[0]; - this->Data[1] = m[1]; - this->Data[2] = m[2]; - this->Data[3] = m[3]; - return *this; -} +#if !GLM_HAS_DEFAULTED_FUNCTIONS + GLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= + ( + fmat4x4SIMD const & m + ) + { + this->Data[0] = m[0]; + this->Data[1] = m[1]; + this->Data[2] = m[2]; + this->Data[3] = m[3]; + return *this; + } +#endif//!GLM_HAS_DEFAULTED_FUNCTIONS GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= ( diff --git a/glm/gtx/simd_quat.hpp b/glm/gtx/simd_quat.hpp index 0c30e501..d718dcae 100644 --- a/glm/gtx/simd_quat.hpp +++ b/glm/gtx/simd_quat.hpp @@ -94,9 +94,9 @@ namespace detail ////////////////////////////////////// // Implicit basic constructors - fquatSIMD(); + fquatSIMD() GLM_DEFAULT_CTOR; + fquatSIMD(fquatSIMD const & q) GLM_DEFAULT; fquatSIMD(__m128 const & Data); - fquatSIMD(fquatSIMD const & q); ////////////////////////////////////// // Explicit basic constructors @@ -117,7 +117,7 @@ namespace detail ////////////////////////////////////// // Unary arithmetic operators - fquatSIMD& operator =(fquatSIMD const & q); + fquatSIMD& operator= (fquatSIMD const & q) GLM_DEFAULT; fquatSIMD& operator*=(float const & s); fquatSIMD& operator/=(float const & s); }; diff --git a/glm/gtx/simd_quat.inl b/glm/gtx/simd_quat.inl index f9dd4c00..2fcc7fe4 100644 --- a/glm/gtx/simd_quat.inl +++ b/glm/gtx/simd_quat.inl @@ -55,21 +55,24 @@ void print(const fvec4SIMD &v) ////////////////////////////////////// // Implicit basic constructors -GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD() -# ifdef GLM_FORCE_NO_CTOR_INIT - : Data(_mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f)) +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) + GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD() +# ifdef GLM_FORCE_NO_CTOR_INIT + : Data(_mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f)) +# endif + {} # endif -{} + +# if !GLM_HAS_DEFAULTED_FUNCTIONS + GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(fquatSIMD const & q) : + Data(q.Data) + {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(__m128 const & Data) : Data(Data) {} -GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(fquatSIMD const & q) : - Data(q.Data) -{} - - ////////////////////////////////////// // Explicit basic constructors @@ -83,25 +86,27 @@ GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(quat const & q) : GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(vec3 const & eulerAngles) { - vec3 c = glm::cos(eulerAngles * 0.5f); + vec3 c = glm::cos(eulerAngles * 0.5f); vec3 s = glm::sin(eulerAngles * 0.5f); - Data = _mm_set_ps( - (c.x * c.y * c.z) + (s.x * s.y * s.z), - (c.x * c.y * s.z) - (s.x * s.y * c.z), - (c.x * s.y * c.z) + (s.x * c.y * s.z), - (s.x * c.y * c.z) - (c.x * s.y * s.z)); + Data = _mm_set_ps( + (c.x * c.y * c.z) + (s.x * s.y * s.z), + (c.x * c.y * s.z) - (s.x * s.y * c.z), + (c.x * s.y * c.z) + (s.x * c.y * s.z), + (s.x * c.y * c.z) - (c.x * s.y * s.z)); } ////////////////////////////////////// // Unary arithmetic operators -GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator=(fquatSIMD const & q) -{ - this->Data = q.Data; - return *this; -} +#if !GLM_HAS_DEFAULTED_FUNCTIONS + GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator=(fquatSIMD const & q) + { + this->Data = q.Data; + return *this; + } +#endif//!GLM_HAS_DEFAULTED_FUNCTIONS GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator*=(float const & s) { diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 905af456..a89251cb 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -117,9 +117,9 @@ namespace detail ////////////////////////////////////// // Implicit basic constructors - fvec4SIMD(); + fvec4SIMD() GLM_DEFAULT_CTOR; + fvec4SIMD(fvec4SIMD const & v) GLM_DEFAULT; fvec4SIMD(__m128 const & Data); - fvec4SIMD(fvec4SIMD const & v); ////////////////////////////////////// // Explicit basic constructors @@ -150,7 +150,7 @@ namespace detail ////////////////////////////////////// // Unary arithmetic operators - fvec4SIMD& operator= (fvec4SIMD const & v); + fvec4SIMD& operator= (fvec4SIMD const & v) GLM_DEFAULT; fvec4SIMD& operator+=(fvec4SIMD const & v); fvec4SIMD& operator-=(fvec4SIMD const & v); fvec4SIMD& operator*=(fvec4SIMD const & v); diff --git a/glm/gtx/simd_vec4.inl b/glm/gtx/simd_vec4.inl index ba5387c2..e375073f 100644 --- a/glm/gtx/simd_vec4.inl +++ b/glm/gtx/simd_vec4.inl @@ -19,20 +19,24 @@ struct shuffle_mask ////////////////////////////////////// // Implicit basic constructors -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD() -# ifdef GLM_FORCE_NO_CTOR_INIT - : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f)) -# endif -{} +#if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) + GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD() +# ifdef GLM_FORCE_NO_CTOR_INIT + : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f)) +# endif + {} +#endif//!GLM_HAS_DEFAULTED_FUNCTIONS + +#if !GLM_HAS_DEFAULTED_FUNCTIONS + GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) : + Data(v.Data) + {} +#endif//!GLM_HAS_DEFAULTED_FUNCTIONS GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) : Data(Data) {} -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) : - Data(v.Data) -{} - GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec4 const & v) : Data(_mm_set_ps(v.w, v.z, v.y, v.x)) {} @@ -92,11 +96,13 @@ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) : ////////////////////////////////////// // Unary arithmetic operators -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v) -{ - this->Data = v.Data; - return *this; -} +#if !GLM_HAS_DEFAULTED_FUNCTIONS + GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v) + { + this->Data = v.Data; + return *this; + } +#endif//!GLM_HAS_DEFAULTED_FUNCTIONS GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s) { diff --git a/test/core/CMakeLists.txt b/test/core/CMakeLists.txt index c7314b1d..37741777 100644 --- a/test/core/CMakeLists.txt +++ b/test/core/CMakeLists.txt @@ -1,4 +1,5 @@ glmCreateTestGTC(core_type_cast) +glmCreateTestGTC(core_type_ctor) glmCreateTestGTC(core_type_float) glmCreateTestGTC(core_type_int) glmCreateTestGTC(core_type_length) diff --git a/test/core/core_type_ctor.cpp b/test/core/core_type_ctor.cpp new file mode 100644 index 00000000..f9f43e6e --- /dev/null +++ b/test/core/core_type_ctor.cpp @@ -0,0 +1,387 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// Restrictions: +/// By making use of the Software for military purposes, you choose to make +/// a Bunny unhappy. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @file test/core/core_type_ctor.cpp +/// @date 2015-07-25 / 2015-07-25 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#define GLM_FORCE_NO_CTOR_INIT +#include +#include +#include + +int test_vec1_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::vec1 f; + glm::ivec1 i; + } A, B; + + A.f = glm::vec1(0); + Error += glm::all(glm::equal(A.i, glm::ivec1(0))) ? 0 : 1; + + B.f = glm::vec1(1); + Error += glm::all(glm::equal(B.i, glm::ivec1(1065353216))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_vec2_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::vec2 f; + glm::ivec2 i; + } A, B; + + A.f = glm::vec2(0); + Error += glm::all(glm::equal(A.i, glm::ivec2(0))) ? 0 : 1; + + B.f = glm::vec2(1); + Error += glm::all(glm::equal(B.i, glm::ivec2(1065353216))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_vec3_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::vec3 f; + glm::ivec3 i; + } A, B; + + A.f = glm::vec3(0); + Error += glm::all(glm::equal(A.i, glm::ivec3(0))) ? 0 : 1; + + B.f = glm::vec3(1); + Error += glm::all(glm::equal(B.i, glm::ivec3(1065353216))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_vec4_ctor() +{ + int Error = 0; + +# ifndef GLM_FORCE_NO_CTOR_INIT + { + glm::vec4 A; + glm::vec4 B(0); + Error += glm::all(glm::equal(A, B)) ? 0 : 1; + } +# endif//GLM_FORCE_NO_CTOR_INIT + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::vec4 f; + glm::ivec4 i; + } A, B; + + A.f = glm::vec4(0); + Error += glm::all(glm::equal(A.i, glm::ivec4(0))) ? 0 : 1; + + B.f = glm::vec4(1); + Error += glm::all(glm::equal(B.i, glm::ivec4(1065353216))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat2x2_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat2x2 f; + glm::mat2x2 i; + } A, B; + + A.f = glm::mat2x2(0); + Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1; + + B.f = glm::mat2x2(1); + Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat2x3_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat2x3 f; + glm::mat2x3 i; + } A, B; + + A.f = glm::mat2x3(0); + Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1; + + B.f = glm::mat2x3(1); + Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat2x4_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat2x4 f; + glm::mat2x4 i; + } A, B; + + A.f = glm::mat2x4(0); + Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1; + + B.f = glm::mat2x4(1); + Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat3x2_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat3x2 f; + glm::mat3x2 i; + } A, B; + + A.f = glm::mat3x2(0); + Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1; + + B.f = glm::mat3x2(1); + Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat3x3_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat3x3 f; + glm::mat3x3 i; + } A, B; + + A.f = glm::mat3x3(0); + Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1; + + B.f = glm::mat3x3(1); + Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat3x4_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat3x4 f; + glm::mat3x4 i; + } A, B; + + A.f = glm::mat3x4(0); + Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1; + + B.f = glm::mat3x4(1); + Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat4x2_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat4x2 f; + glm::mat4x2 i; + } A, B; + + A.f = glm::mat4x2(0); + Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1; + + B.f = glm::mat4x2(1); + Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat4x3_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat4x3 f; + glm::mat4x3 i; + } A, B; + + A.f = glm::mat4x3(0); + Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1; + + B.f = glm::mat4x3(1); + Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_mat4x4_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS + { + union pack + { + glm::mat4 f; + glm::mat4 i; + } A, B; + + A.f = glm::mat4(0); + Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1; + + B.f = glm::mat4(1); + Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int test_quat_ctor() +{ + int Error = 0; + +# if GLM_HAS_DEFAULTED_FUNCTIONS && defined(GLM_FORCE_NO_CTOR_INIT) + { + union pack + { + glm::quat f; + glm::quat i; + } A, B; + + A.f = glm::quat(0, 0, 0, 0); + Error += glm::all(glm::equal(A.i, glm::quat(0, 0, 0, 0))) ? 0 : 1; + + B.f = glm::quat(1, 1, 1, 1); + Error += glm::all(glm::equal(B.i, glm::quat(1, 1, 1, 1))) ? 0 : 1; + } +# endif//GLM_HAS_DEFAULTED_FUNCTIONS + + return Error; +} + +int main() +{ + int Error = 0; + + Error += test_vec1_ctor(); + Error += test_vec2_ctor(); + Error += test_vec3_ctor(); + Error += test_vec4_ctor(); + Error += test_mat2x2_ctor(); + Error += test_mat2x3_ctor(); + Error += test_mat2x4_ctor(); + Error += test_mat3x2_ctor(); + Error += test_mat3x3_ctor(); + Error += test_mat3x4_ctor(); + Error += test_mat4x2_ctor(); + Error += test_mat4x3_ctor(); + Error += test_mat4x4_ctor(); + Error += test_quat_ctor(); + + return Error; +} diff --git a/test/core/core_type_mat2x2.cpp b/test/core/core_type_mat2x2.cpp index 93ce7186..ea5145ca 100644 --- a/test/core/core_type_mat2x2.cpp +++ b/test/core/core_type_mat2x2.cpp @@ -82,22 +82,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat2x2 f; - glm::mat2x2 i; - } A, B; - - A.f = glm::mat2x2(0); - Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1; - - B.f = glm::mat2x2(1); - Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if GLM_HAS_INITIALIZER_LISTS glm::mat2x2 m0( glm::vec2(0, 1), diff --git a/test/core/core_type_mat2x3.cpp b/test/core/core_type_mat2x3.cpp index a213e11f..8ec1cd30 100644 --- a/test/core/core_type_mat2x3.cpp +++ b/test/core/core_type_mat2x3.cpp @@ -56,22 +56,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat2x3 f; - glm::mat2x3 i; - } A, B; - - A.f = glm::mat2x3(0); - Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1; - - B.f = glm::mat2x3(1); - Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if GLM_HAS_INITIALIZER_LISTS glm::mat2x3 m0( glm::vec3(0, 1, 2), diff --git a/test/core/core_type_mat2x4.cpp b/test/core/core_type_mat2x4.cpp index a9f1b97f..4afe492a 100644 --- a/test/core/core_type_mat2x4.cpp +++ b/test/core/core_type_mat2x4.cpp @@ -56,22 +56,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat2x4 f; - glm::mat2x4 i; - } A, B; - - A.f = glm::mat2x4(0); - Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1; - - B.f = glm::mat2x4(1); - Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if(GLM_HAS_INITIALIZER_LISTS) glm::mat2x4 m0( glm::vec4(0, 1, 2, 3), diff --git a/test/core/core_type_mat3x2.cpp b/test/core/core_type_mat3x2.cpp index fdfab3c3..63d95c87 100644 --- a/test/core/core_type_mat3x2.cpp +++ b/test/core/core_type_mat3x2.cpp @@ -56,22 +56,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat3x2 f; - glm::mat3x2 i; - } A, B; - - A.f = glm::mat3x2(0); - Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1; - - B.f = glm::mat3x2(1); - Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if(GLM_HAS_INITIALIZER_LISTS) glm::mat3x2 m0( glm::vec2(0, 1), diff --git a/test/core/core_type_mat3x3.cpp b/test/core/core_type_mat3x3.cpp index 943c4364..e158563d 100644 --- a/test/core/core_type_mat3x3.cpp +++ b/test/core/core_type_mat3x3.cpp @@ -115,22 +115,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat3x3 f; - glm::mat3x3 i; - } A, B; - - A.f = glm::mat3x3(0); - Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1; - - B.f = glm::mat3x3(1); - Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if(GLM_HAS_INITIALIZER_LISTS) glm::mat3x3 m0( glm::vec3(0, 1, 2), diff --git a/test/core/core_type_mat3x4.cpp b/test/core/core_type_mat3x4.cpp index 3ec5c9f3..1f2bfd43 100644 --- a/test/core/core_type_mat3x4.cpp +++ b/test/core/core_type_mat3x4.cpp @@ -56,22 +56,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat3x4 f; - glm::mat3x4 i; - } A, B; - - A.f = glm::mat3x4(0); - Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1; - - B.f = glm::mat3x4(1); - Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if(GLM_HAS_INITIALIZER_LISTS) glm::mat3x4 m0( glm::vec4(0, 1, 2, 3), diff --git a/test/core/core_type_mat4x2.cpp b/test/core/core_type_mat4x2.cpp index ec71d179..13bea3f6 100644 --- a/test/core/core_type_mat4x2.cpp +++ b/test/core/core_type_mat4x2.cpp @@ -56,22 +56,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat4x2 f; - glm::mat4x2 i; - } A, B; - - A.f = glm::mat4x2(0); - Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1; - - B.f = glm::mat4x2(1); - Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if(GLM_HAS_INITIALIZER_LISTS) glm::mat4x2 m0( glm::vec2(0, 1), diff --git a/test/core/core_type_mat4x3.cpp b/test/core/core_type_mat4x3.cpp index 99e1f009..a91f7e25 100644 --- a/test/core/core_type_mat4x3.cpp +++ b/test/core/core_type_mat4x3.cpp @@ -56,22 +56,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat4x3 f; - glm::mat4x3 i; - } A, B; - - A.f = glm::mat4x3(0); - Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1; - - B.f = glm::mat4x3(1); - Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if(GLM_HAS_INITIALIZER_LISTS) glm::mat4x3 m0( glm::vec3(0, 1, 2), diff --git a/test/core/core_type_mat4x4.cpp b/test/core/core_type_mat4x4.cpp index f9264c4d..c37f2deb 100644 --- a/test/core/core_type_mat4x4.cpp +++ b/test/core/core_type_mat4x4.cpp @@ -203,22 +203,6 @@ int test_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::mat4 f; - glm::mat4 i; - } A, B; - - A.f = glm::mat4(0); - Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1; - - B.f = glm::mat4(1); - Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - #if GLM_HAS_TRIVIAL_QUERIES //Error += std::is_trivially_default_constructible::value ? 0 : 1; //Error += std::is_trivially_copy_assignable::value ? 0 : 1; diff --git a/test/core/core_type_vec1.cpp b/test/core/core_type_vec1.cpp index f648e9d2..67917844 100644 --- a/test/core/core_type_vec1.cpp +++ b/test/core/core_type_vec1.cpp @@ -69,22 +69,6 @@ int test_vec1_ctor() { int Error = 0; -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::vec1 f; - glm::ivec1 i; - } A, B; - - A.f = glm::vec1(0); - Error += glm::all(glm::equal(A.i, glm::ivec1(0))) ? 0 : 1; - - B.f = glm::vec1(1); - Error += glm::all(glm::equal(B.i, glm::ivec1(1065353216))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - # if GLM_HAS_TRIVIAL_QUERIES // Error += std::is_trivially_default_constructible::value ? 0 : 1; // Error += std::is_trivially_copy_assignable::value ? 0 : 1; diff --git a/test/core/core_type_vec2.cpp b/test/core/core_type_vec2.cpp index 2701d7a6..2b8f8575 100644 --- a/test/core/core_type_vec2.cpp +++ b/test/core/core_type_vec2.cpp @@ -229,22 +229,6 @@ int test_vec2_ctor() { int Error = 0; -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::vec2 f; - glm::ivec2 i; - } A, B; - - A.f = glm::vec2(0); - Error += glm::all(glm::equal(A.i, glm::ivec2(0))) ? 0 : 1; - - B.f = glm::vec2(1); - Error += glm::all(glm::equal(B.i, glm::ivec2(1065353216))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - # if GLM_HAS_TRIVIAL_QUERIES // Error += std::is_trivially_default_constructible::value ? 0 : 1; // Error += std::is_trivially_copy_assignable::value ? 0 : 1; diff --git a/test/core/core_type_vec3.cpp b/test/core/core_type_vec3.cpp index 025253d5..e2ce6ee1 100644 --- a/test/core/core_type_vec3.cpp +++ b/test/core/core_type_vec3.cpp @@ -45,22 +45,6 @@ int test_vec3_ctor() { int Error = 0; -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::vec3 f; - glm::ivec3 i; - } A, B; - - A.f = glm::vec3(0); - Error += glm::all(glm::equal(A.i, glm::ivec3(0))) ? 0 : 1; - - B.f = glm::vec3(1); - Error += glm::all(glm::equal(B.i, glm::ivec3(1065353216))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - # if GLM_HAS_TRIVIAL_QUERIES // Error += std::is_trivially_default_constructible::value ? 0 : 1; // Error += std::is_trivially_copy_assignable::value ? 0 : 1; diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 2a3adfd9..4c80f5ba 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -68,22 +68,6 @@ int test_vec4_ctor() { int Error = 0; -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::vec4 f; - glm::ivec4 i; - } A, B; - - A.f = glm::vec4(0); - Error += glm::all(glm::equal(A.i, glm::ivec4(0))) ? 0 : 1; - - B.f = glm::vec4(1); - Error += glm::all(glm::equal(B.i, glm::ivec4(1065353216))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - { glm::ivec4 A(1, 2, 3, 4); glm::ivec4 B(A); diff --git a/test/gtc/gtc_quaternion.cpp b/test/gtc/gtc_quaternion.cpp index 9406003d..6ee7eb5a 100644 --- a/test/gtc/gtc_quaternion.cpp +++ b/test/gtc/gtc_quaternion.cpp @@ -243,6 +243,7 @@ int test_quat_mul() glm::quat temp5 = glm::normalize(temp1 * temp2); glm::vec3 temp6 = temp5 * glm::vec3(0.0, 1.0, 0.0) * glm::inverse(temp5); +# ifndef GLM_FORCE_NO_CTOR_INIT { glm::quat temp7; @@ -251,6 +252,7 @@ int test_quat_mul() Error += temp7 != glm::quat(); } +# endif return Error; } @@ -296,22 +298,6 @@ int test_quat_ctr() { int Error(0); -# if GLM_HAS_DEFAULTED_FUNCTIONS - { - union pack - { - glm::quat f; - glm::quat i; - } A, B; - - A.f = glm::quat(0, 0, 0, 0); - Error += glm::all(glm::equal(A.i, glm::quat(0, 0, 0, 0))) ? 0 : 1; - - B.f = glm::quat(1, 1, 1, 1); - Error += glm::all(glm::equal(B.i, glm::quat(1, 1, 1, 1))) ? 0 : 1; - } -# endif//GLM_HAS_DEFAULTED_FUNCTIONS - # if GLM_HAS_TRIVIAL_QUERIES // Error += std::is_trivially_default_constructible::value ? 0 : 1; // Error += std::is_trivially_default_constructible::value ? 0 : 1;