Browse Source

Merge branch 'trivial' into bitfield

Christophe Riccio 11 years ago
parent
commit
2df3bf71cc

+ 1 - 1
glm/detail/func_integer.inl

@@ -44,7 +44,7 @@ namespace detail
 {
 	GLM_FUNC_QUALIFIER int mask(int Bits)
 	{
-		return ~((~0) << Bits);
+		return Bits >= 32 ? 0xffffffff : (static_cast<int>(1) << Bits) - static_cast<int>(1);
 	}
 
 	template <bool EXEC = false>

+ 4 - 0
glm/detail/setup.hpp

@@ -527,6 +527,10 @@
 	((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
 	__has_feature(cxx_range_for))
 
+#define GLM_HAS_ASSIGNABLE ( \
+	(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
+	((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49)))
+
 // OpenMP
 #ifdef _OPENMP 
 #	if GLM_COMPILER & GLM_COMPILER_GCC

+ 0 - 2
glm/detail/type_mat2x2.hpp

@@ -66,7 +66,6 @@ namespace glm
 		//////////////////////////////////////
 		// Constructors
 		GLM_FUNC_DECL tmat2x2();
-		GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> 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<T, P> & operator=(tmat2x2<T, P> const & m);
 		template <typename U> 
 		GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
 		template <typename U> 

+ 0 - 16
glm/detail/type_mat2x2.inl

@@ -89,13 +89,6 @@ namespace detail
 #		endif
 	}
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, P> const & m)
-	{
-		this->value[0] = m.value[0];
-		this->value[1] = m.value[1];
-	}
-
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, Q> 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 <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<T, P> const & m)
-	{
-		this->value[0] = m[0];
-		this->value[1] = m[1];
-		return *this;
-	}
-
 	template <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<U, P> const & m)

+ 0 - 2
glm/detail/type_mat2x3.hpp

@@ -61,7 +61,6 @@ namespace glm
 	public:
 		// Constructors
 		GLM_FUNC_DECL tmat2x3();
-		GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> 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<T, P> & operator=  (tmat2x3<T, P> const & m);
 		template <typename U> 
 		GLM_FUNC_DECL tmat2x3<T, P> & operator=  (tmat2x3<U, P> const & m);
 		template <typename U> 

+ 14 - 29
glm/detail/type_mat2x3.inl

@@ -71,13 +71,6 @@ namespace glm
 #		endif
 	}
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, P> const & m)
-	{
-		this->value[0] = m.value[0];
-		this->value[1] = m.value[1];
-	}
-
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, Q> const & m)
@@ -210,15 +203,7 @@ namespace glm
 	// Unary updatable operators
 
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<T, P> const & m)
-	{
-		this->value[0] = m[0];
-		this->value[1] = m[1];
-		return *this;
-	}
-
-	template <typename T, precision P> 
-	template <typename U> 
+	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<U, P> const & m)
 	{
 		this->value[0] = m[0];
@@ -226,8 +211,8 @@ namespace glm
 		return *this;
 	}
 
-	template <typename T, precision P> 
-	template <typename U> 
+	template <typename T, precision P>
+	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator+=(U s)
 	{
 		this->value[0] += s;
@@ -235,8 +220,8 @@ namespace glm
 		return *this;
 	}
 
-	template <typename T, precision P> 
-	template <typename U> 
+	template <typename T, precision P>
+	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator+=(tmat2x3<U, P> const & m)
 	{
 		this->value[0] += m[0];
@@ -244,8 +229,8 @@ namespace glm
 		return *this;
 	}
 
-	template <typename T, precision P> 
-	template <typename U> 
+	template <typename T, precision P>
+	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-=(U s)
 	{
 		this->value[0] -= s;
@@ -253,8 +238,8 @@ namespace glm
 		return *this;
 	}
 
-	template <typename T, precision P> 
-	template <typename U> 
+	template <typename T, precision P>
+	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-=(tmat2x3<U, P> const & m)
 	{
 		this->value[0] -= m[0];
@@ -262,8 +247,8 @@ namespace glm
 		return *this;
 	}
 
-	template <typename T, precision P> 
-	template <typename U> 
+	template <typename T, precision P>
+	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator*=(U s)
 	{
 		this->value[0] *= s;
@@ -272,7 +257,7 @@ namespace glm
 	}
 
 	template <typename T, precision P>
-	template <typename U> 
+	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator/=(U s)
 	{
 		this->value[0] /= s;
@@ -280,7 +265,7 @@ namespace glm
 		return *this;
 	}
 
-	template <typename T, precision P> 
+	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator++()
 	{
 		++this->value[0];
@@ -288,7 +273,7 @@ namespace glm
 		return *this;
 	}
 
-	template <typename T, precision P> 
+	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator--()
 	{
 		--this->value[0];

+ 0 - 2
glm/detail/type_mat2x4.hpp

@@ -61,7 +61,6 @@ namespace glm
 	public:
 		// Constructors
 		GLM_FUNC_DECL tmat2x4();
-		GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> 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<T, P>& operator=  (tmat2x4<T, P> const & m);
 		template <typename U> 
 		GLM_FUNC_DECL tmat2x4<T, P>& operator=  (tmat2x4<U, P> const & m);
 		template <typename U> 

+ 0 - 15
glm/detail/type_mat2x4.inl

@@ -71,13 +71,6 @@ namespace glm
 #		endif
 	}
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, P> const & m)
-	{
-		this->value[0] = m.value[0];
-		this->value[1] = m.value[1];
-	}
-
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, Q> const & m)
@@ -210,14 +203,6 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<T, P> const & m)
-	{
-		this->value[0] = m[0];
-		this->value[1] = m[1];
-		return *this;
-	}
-
 	template <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<U, P> const & m)

+ 0 - 2
glm/detail/type_mat3x2.hpp

@@ -61,7 +61,6 @@ namespace glm
 	public:
 		// Constructors
 		GLM_FUNC_DECL tmat3x2();
-		GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> 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<T, P> & operator=  (tmat3x2<T, P> const & m);
 		template <typename U> 
 		GLM_FUNC_DECL tmat3x2<T, P> & operator=  (tmat3x2<U, P> const & m);
 		template <typename U> 

+ 0 - 17
glm/detail/type_mat3x2.inl

@@ -72,14 +72,6 @@ namespace glm
 #		endif
 	}
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, P> const & m)
-	{
-		this->value[0] = m.value[0];
-		this->value[1] = m.value[1];
-		this->value[2] = m.value[2];
-	}
-
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, Q> const & m)
@@ -239,15 +231,6 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<T, P> const & m)
-	{
-		this->value[0] = m[0];
-		this->value[1] = m[1];
-		this->value[2] = m[2];
-		return *this;
-	}
-
 	template <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<U, P> const & m)

+ 0 - 2
glm/detail/type_mat3x3.hpp

@@ -65,7 +65,6 @@ namespace glm
 	public:
 		// Constructors
 		GLM_FUNC_DECL tmat3x3();
-		GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> 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<T, P>& operator=  (tmat3x3<T, P> const & m);
 		template <typename U>
 		GLM_FUNC_DECL tmat3x3<T, P>& operator=  (tmat3x3<U, P> const & m);
 		template <typename U>

+ 0 - 17
glm/detail/type_mat3x3.inl

@@ -96,14 +96,6 @@ namespace detail
 #		endif
 	}
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, P> const & m)
-	{
-		this->value[0] = m.value[0];
-		this->value[1] = m.value[1];
-		this->value[2] = m.value[2];
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor)
 	{}
@@ -263,15 +255,6 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	// Operators
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<T, P> const & m)
-	{
-		this->value[0] = m[0];
-		this->value[1] = m[1];
-		this->value[2] = m[2];
-		return *this;
-	}
-
 	template <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<U, P> const & m)

+ 0 - 2
glm/detail/type_mat3x4.hpp

@@ -61,7 +61,6 @@ namespace glm
 	public:
 		// Constructors
 		GLM_FUNC_DECL tmat3x4();
-		GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> 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<T, P> & operator=(tmat3x4<T, P> const & m);
 		template <typename U> 
 		GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
 		template <typename U> 

+ 0 - 17
glm/detail/type_mat3x4.inl

@@ -72,14 +72,6 @@ namespace glm
 #		endif
 	}
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, P> const & m)
-	{
-		this->value[0] = m.value[0];
-		this->value[1] = m.value[1];
-		this->value[2] = m.value[2];
-	}
-
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, Q> const & m)
@@ -238,15 +230,6 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<T, P> const & m)
-	{
-		this->value[0] = m[0];
-		this->value[1] = m[1];
-		this->value[2] = m[2];
-		return *this;
-	}
-
 	template <typename T, precision P> 
 	template <typename U> 
 	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<U, P> const & m)

+ 0 - 2
glm/detail/type_mat4x2.hpp

@@ -61,7 +61,6 @@ namespace glm
 	public:
 		// Constructors
 		GLM_FUNC_DECL tmat4x2();
-		GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> 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<T, P>& operator=(tmat4x2<T, P> const & m);
 		template <typename U> 
 		GLM_FUNC_DECL tmat4x2<T, P>& operator=(tmat4x2<U, P> const & m);
 		template <typename U> 

+ 0 - 19
glm/detail/type_mat4x2.inl

@@ -73,15 +73,6 @@ namespace glm
 #		endif
 	}
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, P> 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 <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, Q> const & m)
@@ -262,16 +253,6 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<T, P> 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 <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<U, P> const & m)

+ 0 - 2
glm/detail/type_mat4x3.hpp

@@ -60,7 +60,6 @@ namespace glm
 	public:
 		// Constructors
 		GLM_FUNC_DECL tmat4x3();
-		GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> 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<T, P> & operator=(tmat4x3<T, P> const & m);
 		template <typename U>
 		GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
 		template <typename U>

+ 0 - 19
glm/detail/type_mat4x3.inl

@@ -73,15 +73,6 @@ namespace glm
 #		endif
 	}
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, P> 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 <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, Q> const & m)
@@ -262,16 +253,6 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<T, P> 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 <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<U, P> const & m)

+ 2 - 2
glm/detail/type_mat4x4.hpp

@@ -65,7 +65,7 @@ namespace glm
 	public:
 		// Constructors
 		GLM_FUNC_DECL tmat4x4();
-		GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);
+		//GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);
 		template <precision Q>
 		GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> 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<T, P> & operator=(tmat4x4<T, P> const & m);
+		//GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m);
 		template <typename U>
 		GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);
 		template <typename U>

+ 0 - 21
glm/detail/type_mat4x4.inl

@@ -132,15 +132,6 @@ namespace detail
 			this->value[3] = col_type(0, 0, 0, 1);
 #		endif
 	}
-	
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, P> const & m)
-	{
-		this->value[0] = m[0];
-		this->value[1] = m[1];
-		this->value[2] = m[2];
-		this->value[3] = m[3];
-	}
 
 	template <typename T, precision P>
 	template <precision Q>
@@ -348,18 +339,6 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	// Operators
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<T, P> 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 <typename T, precision P> 
 	template <typename U> 
 	GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<U, P> const & m)

+ 0 - 3
glm/detail/type_vec1.hpp

@@ -102,7 +102,6 @@ namespace glm
 		// Implicit basic constructors
 
 		GLM_FUNC_DECL tvec1();
-		GLM_FUNC_DECL tvec1(tvec1<T, P> const & v);
 		template <precision Q>
 		GLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);
 
@@ -142,8 +141,6 @@ namespace glm
 		//////////////////////////////////////
 		// Unary arithmetic operators
 
-		GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<T, P> const & v);
-
 		template <typename U> 
 		GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<U, P> const & v);
 		template <typename U> 

+ 0 - 12
glm/detail/type_vec1.inl

@@ -69,11 +69,6 @@ namespace glm
 #		endif
 	{}
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, P> const & v)
-		: x(v.x)
-	{}
-
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, Q> const & v)
@@ -122,13 +117,6 @@ namespace glm
 	//////////////////////////////////////
 	// Unary arithmetic operators
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=(tvec1<T, P> const & v)
-	{
-		this->x = v.x;
-		return *this;
-	}
-
 	template <typename T, precision P>
 	template <typename U> 
 	GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=(tvec1<U, P> const & v)

+ 0 - 3
glm/detail/type_vec2.hpp

@@ -104,7 +104,6 @@ namespace glm
 		// Implicit basic constructors
 
 		GLM_FUNC_DECL tvec2();
-		GLM_FUNC_DECL tvec2(tvec2<T, P> const & v);
 		template <precision Q>
 		GLM_FUNC_DECL tvec2(tvec2<T, Q> const & v);
 
@@ -151,8 +150,6 @@ namespace glm
 		//////////////////////////////////////
 		// Unary arithmetic operators
 
-		GLM_FUNC_DECL tvec2<T, P> & operator=(tvec2<T, P> const & v);
-
 		template <typename U>
 		GLM_FUNC_DECL tvec2<T, P> & operator=(tvec2<U, P> const & v);
 		template <typename U>

+ 1 - 14
glm/detail/type_vec2.inl

@@ -64,16 +64,11 @@ namespace glm
 
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2()
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
+#		ifndef GLM_FORCE_NO_CTOR_INIT
 			: x(0), y(0) 
 #		endif
 	{}
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, P> const & v)
-		: x(v.x), y(v.y)
-	{}
-
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, Q> const & v)
@@ -141,14 +136,6 @@ namespace glm
 	//////////////////////////////////////
 	// Unary arithmetic operators
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=(tvec2<T, P> const & v)
-	{
-		this->x = v.x;
-		this->y = v.y;
-		return *this;
-	}
-
 	template <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=(tvec2<U, P> const & v)

+ 0 - 3
glm/detail/type_vec3.hpp

@@ -105,7 +105,6 @@ namespace glm
 		// Implicit basic constructors
 
 		GLM_FUNC_DECL tvec3();
-		GLM_FUNC_DECL tvec3(tvec3<T, P> const & v);
 		template <precision Q>
 		GLM_FUNC_DECL tvec3(tvec3<T, Q> const & v);
 
@@ -173,8 +172,6 @@ namespace glm
 		//////////////////////////////////////
 		// Unary arithmetic operators
 
-		GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<T, P> const & v);
-
 		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<U, P> const & v);
 		template <typename U>

+ 0 - 14
glm/detail/type_vec3.inl

@@ -69,11 +69,6 @@ namespace glm
 #		endif
 	{}
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, P> const & v)
-		: x(v.x), y(v.y), z(v.z)
-	{}
-
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, Q> const & v)
@@ -170,15 +165,6 @@ namespace glm
 	//////////////////////////////////////
 	// Unary arithmetic operators
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator=(tvec3<T, P> const & v)
-	{
-		this->x = v.x;
-		this->y = v.y;
-		this->z = v.z;
-		return *this;
-	}
-
 	template <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator=(tvec3<U, P> const & v)

+ 2 - 4
glm/detail/type_vec4.hpp

@@ -67,7 +67,7 @@ namespace detail
 }//namespace detail
 
 	template <typename T, precision P = defaultp>
-	GLM_ALIGNED_STRUCT(16) tvec4
+	struct tvec4
 	{
 		//////////////////////////////////////
 		// Implementation detail
@@ -148,7 +148,6 @@ namespace detail
 		// Implicit basic constructors
 
 		GLM_FUNC_DECL tvec4();
-		GLM_FUNC_DECL tvec4(tvec4<T, P> const & v);
 		template <precision Q>
 		GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
 
@@ -158,6 +157,7 @@ namespace detail
 		GLM_FUNC_DECL explicit tvec4(ctor);
 		GLM_FUNC_DECL explicit tvec4(T const & s);
 		GLM_FUNC_DECL tvec4(T const & s0, T const & s1, T const & s2, T const & s3);
+		GLM_FUNC_DECL ~tvec4(){}
 
 		//////////////////////////////////////
 		// Conversion scalar constructors
@@ -258,8 +258,6 @@ namespace detail
 		//////////////////////////////////////
 		// Unary arithmetic operators
 
-		GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<T, P> const & v);
-
 		template <typename U>
 		GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v);
 		template <typename U>

+ 4 - 4
glm/detail/type_vec4.inl

@@ -84,7 +84,7 @@ namespace glm
 #		endif
 	{}
 #endif
-	
+/*
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v)
 		: x(v.x), y(v.y), z(v.z), w(v.w)
@@ -101,7 +101,7 @@ namespace glm
 		: data(v.data)
 	{}
 #endif
-
+*/
 	template <typename T, precision P>
 	template <precision Q>
 	GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v)
@@ -283,7 +283,7 @@ namespace glm
 
 	//////////////////////////////////////
 	// Unary arithmetic operators
-
+/*
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<T, P> const & v)
 	{
@@ -309,7 +309,7 @@ namespace glm
 		return *this;
 	}
 #endif
-
+*/
 	template <typename T, precision P>
 	template <typename U>
 	GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<U, P> const & v)

+ 3 - 3
test/core/core_func_common.cpp

@@ -866,7 +866,7 @@ namespace sign
 	{
 		int Error = 0;
 
-		std::size_t const Count = 1000000000;
+		std::size_t const Count = 10000000;
 		std::vector<glm::int32> Input, Output;
 		Input.resize(Count);
 		Output.resize(Count);
@@ -913,7 +913,7 @@ namespace sign
 	{
 		int Error = 0;
 
-		std::size_t const Count = 1000000000;
+		std::size_t const Count = 10000000;
 		std::vector<glm::int32> Input, Output;
 		Input.resize(Count);
 		Output.resize(Count);
@@ -960,7 +960,7 @@ namespace sign
 	{
 		int Error = 0;
 
-		glm::uint32 const Count = 1000000000;
+		glm::uint32 const Count = 10000000;
 
 		std::clock_t Timestamp0 = std::clock();
 		glm::int32 Sum = 0;

+ 6 - 5
test/core/core_func_integer.cpp

@@ -37,11 +37,12 @@ namespace bitfieldInsert
 
 	typeU32 const Data32[] =
 	{
+		{0x00000000, 0xffffffff,  0, 31, 0x7fffffff},
+		{0x00000000, 0xffffffff,  0, 32, 0xffffffff},
+		{0x00000000, 0xffffffff,  0,  0, 0x00000000},
 		{0xff000000, 0x0000ff00,  8,  8, 0xff00ff00},
 		{0xffff0000, 0x0000ffff, 16, 16, 0x00000000},
-		{0x0000ffff, 0xffff0000, 16, 16, 0xffffffff},
-		{0x00000000, 0xffffffff,  0, 32, 0xffffffff},
-		{0x00000000, 0xffffffff,  0,  0, 0x00000000}
+		{0x0000ffff, 0xffff0000, 16, 16, 0xffffffff}
 	};
 
 	int test()
@@ -664,7 +665,7 @@ namespace findMSB
 
 		std::clock_t Timestamps1 = std::clock();
 
-		for(std::size_t k = 0; k < 10000000; ++k)
+		for(std::size_t k = 0; k < 1000000; ++k)
 		for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
 		{
 			int Result = findMSB_095(Data[i].Value);
@@ -723,7 +724,7 @@ namespace findMSB
 
 		std::clock_t Timestamps1 = std::clock();
 
-		for(std::size_t k = 0; k < 10000000; ++k)
+		for(std::size_t k = 0; k < 1000000; ++k)
 		for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
 		{
 			int Result = findMSB_nlz1(Data[i].Value);

+ 8 - 0
test/core/core_type_mat4x4.cpp

@@ -188,6 +188,14 @@ int test_ctr()
 {
 	int Error(0);
 
+#if (GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)
+	//Error += std::is_trivially_default_constructible<glm::mat4>::value ? 0 : 1;
+	//Error += std::is_trivially_copy_assignable<glm::mat4>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::mat4>::value ? 0 : 1;
+	//Error += std::is_copy_constructible<glm::mat4>::value ? 0 : 1;
+	//Error += std::has_trivial_copy_constructor<glm::mat4>::value ? 0 : 1;
+#endif
+
 #if(GLM_HAS_INITIALIZER_LISTS)
 	glm::mat4 m0(
 		glm::vec4(0, 1, 2, 3), 

+ 12 - 0
test/core/core_type_vec1.cpp

@@ -44,6 +44,18 @@ int test_vec1_ctor()
 {
 	int Error = 0;
 
+#if (GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)
+//	Error += std::is_trivially_default_constructible<glm::vec1>::value ? 0 : 1;
+//	Error += std::is_trivially_copy_assignable<glm::vec1>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::vec1>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::dvec1>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::ivec1>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::uvec1>::value ? 0 : 1;
+
+	Error += std::has_trivial_copy_constructor<glm::vec1>::value ? 0 : 1;
+	Error += std::is_copy_constructible<glm::vec1>::value ? 0 : 1;
+#endif
+
 /*
 #if GLM_HAS_INITIALIZER_LISTS
 	{

+ 12 - 0
test/core/core_type_vec2.cpp

@@ -201,6 +201,18 @@ int test_vec2_ctor()
 {
 	int Error = 0;
 
+#if (GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)
+//	Error += std::is_trivially_default_constructible<glm::vec2>::value ? 0 : 1;
+//	Error += std::is_trivially_copy_assignable<glm::vec2>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::vec2>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::dvec2>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::ivec2>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::uvec2>::value ? 0 : 1;
+
+	Error += std::has_trivial_copy_constructor<glm::vec2>::value ? 0 : 1;
+	Error += std::is_copy_constructible<glm::vec2>::value ? 0 : 1;
+#endif
+
 #if GLM_HAS_INITIALIZER_LISTS
 	{
 		glm::vec2 a{ 0, 1 };

+ 14 - 2
test/core/core_type_vec3.cpp

@@ -19,8 +19,20 @@
 int test_vec3_ctor()
 {
 	int Error = 0;
-	
-#if(GLM_HAS_INITIALIZER_LISTS)
+
+#if (GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)
+//	Error += std::is_trivially_default_constructible<glm::vec3>::value ? 0 : 1;
+//	Error += std::is_trivially_copy_assignable<glm::vec3>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::vec3>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::dvec3>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::ivec3>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::uvec3>::value ? 0 : 1;
+
+	Error += std::has_trivial_copy_constructor<glm::vec3>::value ? 0 : 1;
+	Error += std::is_copy_constructible<glm::vec3>::value ? 0 : 1;
+#endif
+
+#if (GLM_HAS_INITIALIZER_LISTS)
 	{
 		glm::vec3 a{ 0, 1, 2 };
 		std::vector<glm::vec3> v = {

+ 17 - 1
test/core/core_type_vec4.cpp

@@ -42,7 +42,23 @@ enum comp
 int test_vec4_ctor()
 {
 	int Error = 0;
-	
+
+	glm::ivec4 A(1, 2, 3, 4);
+	glm::ivec4 B(A);
+	Error += glm::all(glm::equal(A, B)) ? 0 : 1;
+
+#if (GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)
+//	Error += std::is_trivially_default_constructible<glm::vec4>::value ? 0 : 1;
+//	Error += std::is_trivially_copy_assignable<glm::vec4>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::vec4>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::dvec4>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::ivec4>::value ? 0 : 1;
+	Error += std::is_trivially_copyable<glm::uvec4>::value ? 0 : 1;
+
+	Error += std::has_trivial_copy_constructor<glm::vec4>::value ? 0 : 1;
+	Error += std::is_copy_constructible<glm::vec4>::value ? 0 : 1;
+#endif
+
 #if GLM_HAS_INITIALIZER_LISTS
 	{
 		glm::vec4 a{ 0, 1, 2, 3 };

+ 12 - 8
test/gtc/gtc_bitfield.cpp

@@ -103,10 +103,12 @@ namespace mask
 	{
 		type<glm::uint> const Data[] =
 		{
-			{0, 0x00000000},
-			{1, 0x00000001},
-			{2, 0x00000003},
-			{3, 0x00000007}
+			{ 0, 0x00000000},
+			{ 1, 0x00000001},
+			{ 2, 0x00000003},
+			{ 3, 0x00000007},
+			{31, 0x7fffffff},
+			{32, 0xffffffff}
 		};
 
 		int Error(0);
@@ -142,10 +144,12 @@ namespace mask
 	{
 		type<glm::ivec4> const Data[] =
 		{
-			{glm::ivec4(0), glm::ivec4(0x00000000)},
-			{glm::ivec4(1), glm::ivec4(0x00000001)},
-			{glm::ivec4(2), glm::ivec4(0x00000003)},
-			{glm::ivec4(3), glm::ivec4(0x00000007)}
+			{glm::ivec4( 0), glm::ivec4(0x00000000)},
+			{glm::ivec4( 1), glm::ivec4(0x00000001)},
+			{glm::ivec4( 2), glm::ivec4(0x00000003)},
+			{glm::ivec4( 3), glm::ivec4(0x00000007)},
+			{glm::ivec4(31), glm::ivec4(0x7fffffff)},
+			{glm::ivec4(32), glm::ivec4(0xffffffff)}
 		};
 
 		int Error(0);