diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index c17fdc9c..b4cb89d5 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -66,7 +66,6 @@ namespace glm ////////////////////////////////////// // Constructors GLM_FUNC_DECL tmat2x2(); - GLM_FUNC_DECL tmat2x2(tmat2x2 const & m); template GLM_FUNC_DECL tmat2x2(tmat2x2 const & m); @@ -111,7 +110,6 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); template GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); template diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index df56aac6..95c88c9e 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -89,13 +89,6 @@ namespace detail # endif } - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x2 const & m) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - } - template template GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x2 const & m) @@ -225,15 +218,6 @@ namespace detail ////////////////////////////////////////////////////////////// // mat2x2 operators - // This function shouldn't required but it seems that VC7.1 have an optimisation bug if this operator wasn't declared - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator=(tmat2x2 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - template template GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator=(tmat2x2 const & m) diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index f60282d3..53c5fa4a 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -61,7 +61,6 @@ namespace glm public: // Constructors GLM_FUNC_DECL tmat2x3(); - GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); template GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); @@ -104,7 +103,6 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); template GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); template diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index 1ed527b5..64813c15 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -71,13 +71,6 @@ namespace glm # endif } - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x3 const & m) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - } - template template GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x3 const & m) @@ -210,15 +203,7 @@ namespace glm // Unary updatable operators template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator=(tmat2x3 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - - template - template + template GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator=(tmat2x3 const & m) { this->value[0] = m[0]; @@ -226,8 +211,8 @@ namespace glm return *this; } - template - template + template + template GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator+=(U s) { this->value[0] += s; @@ -235,8 +220,8 @@ namespace glm return *this; } - template - template + template + template GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator+=(tmat2x3 const & m) { this->value[0] += m[0]; @@ -244,8 +229,8 @@ namespace glm return *this; } - template - template + template + template GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-=(U s) { this->value[0] -= s; @@ -253,8 +238,8 @@ namespace glm return *this; } - template - template + template + template GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-=(tmat2x3 const & m) { this->value[0] -= m[0]; @@ -262,8 +247,8 @@ namespace glm return *this; } - template - template + template + template GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator*=(U s) { this->value[0] *= s; @@ -272,7 +257,7 @@ namespace glm } template - template + template GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator/=(U s) { this->value[0] /= s; @@ -280,7 +265,7 @@ namespace glm return *this; } - template + template GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator++() { ++this->value[0]; @@ -288,7 +273,7 @@ namespace glm return *this; } - template + template GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator--() { --this->value[0]; diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index 28066c04..a30929da 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -61,7 +61,6 @@ namespace glm public: // Constructors GLM_FUNC_DECL tmat2x4(); - GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); template GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); @@ -106,7 +105,6 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); template GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); template diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index e45ffc0d..94b46140 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -71,13 +71,6 @@ namespace glm # endif } - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x4 const & m) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - } - template template GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x4 const & m) @@ -210,14 +203,6 @@ namespace glm ////////////////////////////////////////////////////////////// // Unary updatable operators - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator=(tmat2x4 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - template template GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator=(tmat2x4 const & m) diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index a09dca98..762158bc 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -61,7 +61,6 @@ namespace glm public: // Constructors GLM_FUNC_DECL tmat3x2(); - GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); template GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); @@ -110,7 +109,6 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); template GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); template diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 026261dd..956bc866 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -72,14 +72,6 @@ namespace glm # endif } - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x2 const & m) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - } - template template GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x2 const & m) @@ -239,15 +231,6 @@ namespace glm ////////////////////////////////////////////////////////////// // Unary updatable operators - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator=(tmat3x2 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - template template GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator=(tmat3x2 const & m) diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index d85ea5aa..a7d1409f 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -65,7 +65,6 @@ namespace glm public: // Constructors GLM_FUNC_DECL tmat3x3(); - GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); template GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); @@ -114,7 +113,6 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); template GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); template diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index f39baa7d..5fd41d0f 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -96,14 +96,6 @@ namespace detail # endif } - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x3 const & m) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - } - template GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(ctor) {} @@ -263,15 +255,6 @@ namespace detail ////////////////////////////////////////////////////////////// // Operators - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator=(tmat3x3 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - template template GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator=(tmat3x3 const & m) diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index c7017704..6c4c7cd5 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -61,7 +61,6 @@ namespace glm public: // Constructors GLM_FUNC_DECL tmat3x4(); - GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); template GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); @@ -110,7 +109,6 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat3x4 & operator=(tmat3x4 const & m); template GLM_FUNC_DECL tmat3x4 & operator=(tmat3x4 const & m); template diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index cb3fdd39..a8ff77d8 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -72,14 +72,6 @@ namespace glm # endif } - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x4 const & m) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - } - template template GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x4 const & m) @@ -238,15 +230,6 @@ namespace glm ////////////////////////////////////////////////////////////// // Unary updatable operators - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator=(tmat3x4 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - template template GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator=(tmat3x4 const & m) diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index 27097298..a84c83f2 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -61,7 +61,6 @@ namespace glm public: // Constructors GLM_FUNC_DECL tmat4x2(); - GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); template GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); @@ -116,7 +115,6 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat4x2& operator=(tmat4x2 const & m); template GLM_FUNC_DECL tmat4x2& operator=(tmat4x2 const & m); template diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index 3090a8bd..b81bd747 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -73,15 +73,6 @@ namespace glm # endif } - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x2 const & m) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - this->value[3] = m.value[3]; - } - template template GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x2 const & m) @@ -262,16 +253,6 @@ namespace glm ////////////////////////////////////////////////////////////// // Unary updatable operators - template - GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator=(tmat4x2 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - template template GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator=(tmat4x2 const & m) diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index ad7f015f..f108052b 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -60,7 +60,6 @@ namespace glm public: // Constructors GLM_FUNC_DECL tmat4x3(); - GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); template GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); @@ -115,7 +114,6 @@ namespace glm GLM_FUNC_DECL col_type & operator[](size_type i); GLM_FUNC_DECL col_type const & operator[](size_type i) const; - GLM_FUNC_DECL tmat4x3 & operator=(tmat4x3 const & m); template GLM_FUNC_DECL tmat4x3 & operator=(tmat4x3 const & m); template diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index 8ac1a3c6..dd49c231 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -73,15 +73,6 @@ namespace glm # endif } - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x3 const & m) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - this->value[3] = m.value[3]; - } - template template GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x3 const & m) @@ -262,16 +253,6 @@ namespace glm ////////////////////////////////////////////////////////////// // Unary updatable operators - template - GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator=(tmat4x3 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - template template GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator=(tmat4x3 const & m) diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index cdbfd3d4..61e4e7bb 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -65,7 +65,7 @@ namespace glm public: // Constructors GLM_FUNC_DECL tmat4x4(); - GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); + //GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); template GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); @@ -120,7 +120,7 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat4x4 & operator=(tmat4x4 const & m); + //GLM_FUNC_DECL tmat4x4 & operator=(tmat4x4 const & m); template GLM_FUNC_DECL tmat4x4 & operator=(tmat4x4 const & m); template diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index 3b488eff..6a1a0cd2 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -132,15 +132,6 @@ namespace detail this->value[3] = col_type(0, 0, 0, 1); # endif } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x4 const & m) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - } template template @@ -348,18 +339,6 @@ namespace detail ////////////////////////////////////////////////////////////// // Operators - template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator=(tmat4x4 const & m) - { - //memcpy could be faster - //memcpy(&this->value, &m.value, 16 * sizeof(valType)); - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - template template GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator=(tmat4x4 const & m) diff --git a/test/core/core_type_mat4x4.cpp b/test/core/core_type_mat4x4.cpp index a7a94ed7..68ea98de 100644 --- a/test/core/core_type_mat4x4.cpp +++ b/test/core/core_type_mat4x4.cpp @@ -188,7 +188,11 @@ int test_ctr() { int Error(0); - Error += std::is_copy_constructible::value ? 0 : 1; + //Error += std::is_trivially_default_constructible::value ? 0 : 1; + //Error += std::is_trivially_copy_assignable::value ? 0 : 1; + Error += std::is_trivially_copyable::value ? 0 : 1; + //Error += std::is_copy_constructible::value ? 0 : 1; + //Error += std::has_trivial_copy_constructor::value ? 0 : 1; #if(GLM_HAS_INITIALIZER_LISTS) glm::mat4 m0( diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 17813ce7..1ceb7a04 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -47,11 +47,11 @@ int test_vec4_ctor() glm::ivec4 B(A); Error += glm::all(glm::equal(A, B)) ? 0 : 1; - Error += std::is_trivially_default_constructible::value ? 0 : 1; - Error += std::is_trivially_copy_assignable::value ? 0 : 1; +// Error += std::is_trivially_default_constructible::value ? 0 : 1; +// Error += std::is_trivially_copy_assignable::value ? 0 : 1; Error += std::is_trivially_copyable::value ? 0 : 1; - Error += std::is_trivially_copy_assignable::value ? 0 : 1; - Error += std::is_trivially_copyable::value ? 0 : 1; +// Error += std::is_trivially_copy_assignable::value ? 0 : 1; +// Error += std::is_trivially_copyable::value ? 0 : 1; Error += std::has_trivial_copy_constructor::value ? 0 : 1; Error += std::is_copy_constructible::value ? 0 : 1;