Browse Source

Added support of defaulted functions to GLM types, to use them in unions #366

Christophe Riccio 10 years ago
parent
commit
a56a40e1f2

+ 5 - 5
glm/detail/type_mat2x2.hpp

@@ -62,15 +62,14 @@ namespace glm
 #		endif//GLM_META_PROG_HELPERS
 #		endif//GLM_META_PROG_HELPERS
 
 
 	private:
 	private:
-		/// @cond DETAIL
 		col_type value[2];
 		col_type value[2];
-		/// @endcond
 
 
 	public:
 	public:
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat2x2();
-		GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m);
+
+		GLM_FUNC_DECL tmat2x2() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
 		GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
 
 
@@ -85,6 +84,7 @@ namespace glm
 
 
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Conversions
 		// Conversions
+
 		template <typename U, typename V, typename M, typename N>
 		template <typename U, typename V, typename M, typename N>
 		GLM_FUNC_DECL tmat2x2(
 		GLM_FUNC_DECL tmat2x2(
 			U const & x1, V const & y1,
 			U const & x1, V const & y1,
@@ -130,7 +130,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v);
+		GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v) GLM_DEFAULT;;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
 		GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);

+ 26 - 21
glm/detail/type_mat2x2.inl

@@ -53,21 +53,23 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0);
-			this->value[1] = col_type(0, 1);
-#		endif
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0);
+				this->value[1] = col_type(0, 1);
+#			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>
+		GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, P> const & m)
+		{
+			this->value[0] = m.value[0];
+			this->value[1] = m.value[1];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -108,6 +110,7 @@ namespace detail
 
 
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Conversion constructors
 	// Conversion constructors
+
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename X1, typename Y1, typename X2, typename Y2>
 	template <typename X1, typename Y1, typename X2, typename Y2>
 	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
 	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
@@ -243,13 +246,15 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 	// Unary updatable operators
 
 
-	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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 3 - 5
glm/detail/type_mat2x3.hpp

@@ -58,14 +58,12 @@ namespace glm
 #		endif//GLM_META_PROG_HELPERS
 #		endif//GLM_META_PROG_HELPERS
 
 
 	private:
 	private:
-		/// @cond DETAIL
 		col_type value[2];
 		col_type value[2];
-		/// @endcond
 
 
 	public:
 	public:
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat2x3();
-		GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m);
+		GLM_FUNC_DECL tmat2x3() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
 		GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
 
 
@@ -126,7 +124,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m);
+		GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<U, P> const & m);
 		GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<U, P> const & m);

+ 26 - 21
glm/detail/type_mat2x3.inl

@@ -35,21 +35,23 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0, 0);
-			this->value[1] = col_type(0, 1, 0);
-#		endif
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P> 
+		GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0, 0);
+				this->value[1] = col_type(0, 1, 0);
+#			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>
+		GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, P> const & m)
+		{
+			this->value[0] = m.value[0];
+			this->value[1] = m.value[1];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -90,6 +92,7 @@ namespace glm
 
 
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Conversion constructors
 	// Conversion constructors
+
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <
 	template <
 		typename X1, typename Y1, typename Z1,
 		typename X1, typename Y1, typename Z1,
@@ -227,13 +230,15 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 	// 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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 3 - 3
glm/detail/type_mat2x4.hpp

@@ -64,8 +64,8 @@ namespace glm
 
 
 	public:
 	public:
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat2x4();
-		GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);
+		GLM_FUNC_DECL tmat2x4() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
 		GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
 
 
@@ -127,7 +127,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m);
+		GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);
 		GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);

+ 26 - 21
glm/detail/type_mat2x4.inl

@@ -35,21 +35,23 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0, 0, 0);
-			this->value[1] = col_type(0, 1, 0, 0);
-#		endif
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0, 0, 0);
+				this->value[1] = col_type(0, 1, 0, 0);
+#			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>
+		GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, P> const & m)
+		{
+			this->value[0] = m.value[0];
+			this->value[1] = m.value[1];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -91,6 +93,7 @@ namespace glm
 
 
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Conversion constructors
 	// Conversion constructors
+
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <
 	template <
 		typename X1, typename Y1, typename Z1, typename W1,
 		typename X1, typename Y1, typename Z1, typename W1,
@@ -228,13 +231,15 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 	// 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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 4 - 3
glm/detail/type_mat3x2.hpp

@@ -64,8 +64,9 @@ namespace glm
 
 
 	public:
 	public:
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat3x2();
-		GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m);
+
+		GLM_FUNC_DECL tmat3x2() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
 		GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
 
 
@@ -133,7 +134,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m);
+		GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<U, P> const & m);
 		GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<U, P> const & m);

+ 29 - 24
glm/detail/type_mat3x2.inl

@@ -35,23 +35,25 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0);
-			this->value[1] = col_type(0, 1);
-			this->value[2] = col_type(0, 0);
-#		endif
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P> 
+		GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0);
+				this->value[1] = col_type(0, 1);
+				this->value[2] = col_type(0, 0);
+#			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>
+		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];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -102,6 +104,7 @@ namespace glm
 
 
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Conversion constructors
 	// Conversion constructors
+
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <
 	template <
 		typename X1, typename Y1,
 		typename X1, typename Y1,
@@ -257,14 +260,16 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 	// 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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 4 - 3
glm/detail/type_mat3x3.hpp

@@ -68,8 +68,9 @@ namespace glm
 
 
 	public:
 	public:
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat3x3();
-		GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);
+
+		GLM_FUNC_DECL tmat3x3() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
 		GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
 
 
@@ -137,7 +138,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m);
+		GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<U, P> const & m);
 		GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<U, P> const & m);

+ 32 - 28
glm/detail/type_mat3x3.inl

@@ -59,27 +59,25 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0, 0);
-			this->value[1] = col_type(0, 1, 0);
-			this->value[2] = col_type(0, 0, 1);
-#		endif
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor)
-	{}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0, 0);
+				this->value[1] = col_type(0, 1, 0);
+				this->value[2] = col_type(0, 0, 1);
+#			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(tmat3x3<T, P> const & m)
+		{
+			this->value[0] = m.value[0];
+			this->value[1] = m.value[1];
+			this->value[2] = m.value[2];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -90,6 +88,10 @@ namespace detail
 		this->value[2] = m.value[2];
 		this->value[2] = m.value[2];
 	}
 	}
 
 
+	template <typename T, precision P>
+	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor)
+	{}
+
 	template <typename T, precision P>
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(T const & s)
 	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(T const & s)
 	{
 	{
@@ -281,14 +283,16 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Operators
 	// 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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 4 - 3
glm/detail/type_mat3x4.hpp

@@ -64,8 +64,9 @@ namespace glm
 
 
 	public:
 	public:
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat3x4();
-		GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m);
+
+		GLM_FUNC_DECL tmat3x4() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
 		GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
 
 
@@ -132,7 +133,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m);
+		GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
 		GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);

+ 29 - 24
glm/detail/type_mat3x4.inl

@@ -35,23 +35,25 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0, 0, 0);
-			this->value[1] = col_type(0, 1, 0, 0);
-			this->value[2] = col_type(0, 0, 1, 0);
-#		endif
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0, 0, 0);
+				this->value[1] = col_type(0, 1, 0, 0);
+				this->value[2] = col_type(0, 0, 1, 0);
+#			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>
+		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];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -103,6 +105,7 @@ namespace glm
 
 
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Conversion constructors
 	// Conversion constructors
+
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <
 	template <
 		typename X1, typename Y1, typename Z1, typename W1,
 		typename X1, typename Y1, typename Z1, typename W1,
@@ -256,14 +259,16 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 	// 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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
 	template <typename U> 
 	template <typename U> 

+ 4 - 3
glm/detail/type_mat4x2.hpp

@@ -64,8 +64,9 @@ namespace glm
 
 
 	public:
 	public:
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat4x2();
-		GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m);
+
+		GLM_FUNC_DECL tmat4x2() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
 		GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
 
 
@@ -138,7 +139,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m);
+		GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<U, P> const & m);
 		GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<U, P> const & m);

+ 32 - 27
glm/detail/type_mat4x2.inl

@@ -35,25 +35,27 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0);
-			this->value[1] = col_type(0, 1);
-			this->value[2] = col_type(0, 0);
-			this->value[3] = col_type(0, 0);
-#		endif
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P> 
+		GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0);
+				this->value[1] = col_type(0, 1);
+				this->value[2] = col_type(0, 0);
+				this->value[3] = col_type(0, 0);
+#			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>
+		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];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -150,6 +152,7 @@ namespace glm
 
 
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Conversion
 	// Conversion
+
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
 	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<U, Q> const & m)
 	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<U, Q> const & m)
@@ -280,15 +283,17 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 	// 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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 4 - 4
glm/detail/type_mat4x3.hpp

@@ -58,13 +58,13 @@ namespace glm
 #		endif//GLM_META_PROG_HELPERS
 #		endif//GLM_META_PROG_HELPERS
 
 
 	private:
 	private:
-		// Data
 		col_type value[4];
 		col_type value[4];
 
 
 	public:
 	public:
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat4x3();
-		GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);
+
+		GLM_FUNC_DECL tmat4x3() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
 		GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
 
 
@@ -137,7 +137,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m);
+		GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
 		GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);

+ 31 - 27
glm/detail/type_mat4x3.inl

@@ -35,25 +35,27 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0, 0);
-			this->value[1] = col_type(0, 1, 0);
-			this->value[2] = col_type(0, 0, 1);
-			this->value[3] = col_type(0, 0, 0);
-#		endif
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P> 
+		GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0, 0);
+				this->value[1] = col_type(0, 1, 0);
+				this->value[2] = col_type(0, 0, 1);
+				this->value[3] = col_type(0, 0, 0);
+#			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>
+		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];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -280,15 +282,17 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Unary updatable operators
 	// 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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 3 - 5
glm/detail/type_mat4x4.hpp

@@ -62,14 +62,12 @@ namespace glm
 		friend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);
 		friend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);
 
 
 	private:
 	private:
-		/// @cond DETAIL
 		col_type value[4];
 		col_type value[4];
-		/// @endcond
 
 
 	public:
 	public:
 		// Constructors
 		// Constructors
-		GLM_FUNC_DECL tmat4x4();
-		GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);
+		GLM_FUNC_DECL tmat4x4() GLM_DEFAULT;
+		GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
 		GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
 
 
@@ -142,7 +140,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Unary arithmetic operators
 		// Unary arithmetic operators
 
 
-		GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m);
+		GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);
 		GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);

+ 34 - 29
glm/detail/type_mat4x4.inl

@@ -95,25 +95,27 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Constructors
 	// Constructors
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()
-	{
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			this->value[0] = col_type(1, 0, 0, 0);
-			this->value[1] = col_type(0, 1, 0, 0);
-			this->value[2] = col_type(0, 0, 1, 0);
-			this->value[3] = col_type(0, 0, 0, 1);
-#		endif
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()
+		{
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				this->value[0] = col_type(1, 0, 0, 0);
+				this->value[1] = col_type(0, 1, 0, 0);
+				this->value[2] = col_type(0, 0, 1, 0);
+				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>
+		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];
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -246,6 +248,7 @@ namespace detail
 
 
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Matrix convertion constructors
 	// Matrix convertion constructors
+
 	template <typename T, precision P>
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x2<T, P> const & m)
 	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x2<T, P> const & m)
 	{
 	{
@@ -366,17 +369,19 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// Operators
 	// 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;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		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;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
 	template <typename U> 
 	template <typename U> 

+ 3 - 3
glm/gtc/quaternion.hpp

@@ -95,8 +95,8 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Implicit basic constructors
 		// Implicit basic constructors
 
 
-		GLM_FUNC_DECL tquat();
-		GLM_FUNC_DECL tquat(tquat<T, P> const & q);
+		GLM_FUNC_DECL tquat() GLM_DEFAULT;
+		GLM_FUNC_DECL tquat(tquat<T, P> const & q) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tquat(tquat<T, Q> const & q);
 		GLM_FUNC_DECL tquat(tquat<T, Q> const & q);
 
 
@@ -135,7 +135,7 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Operators
 		// Operators
 
 
-		GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const & m);
+		GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tquat<T, P> & operator=(tquat<U, P> const & m);
 		GLM_FUNC_DECL tquat<T, P> & operator=(tquat<U, P> const & m);

+ 23 - 19
glm/gtc/quaternion.inl

@@ -97,17 +97,19 @@ namespace detail
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Implicit basic constructors
 	// Implicit basic constructors
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tquat<T, P>::tquat()
-#		ifndef GLM_FORCE_NO_CTOR_INIT
-			: x(0), y(0), z(0), w(1)
-#		endif
-	{}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tquat<T, P>::tquat()
+#			ifndef GLM_FORCE_NO_CTOR_INIT
+				: x(0), y(0), z(0), w(1)
+#			endif
+		{}
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, P> const & q)
-		: x(q.x), y(q.y), z(q.z), w(q.w)
-	{}
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, P> const & q)
+			: x(q.x), y(q.y), z(q.z), w(q.w)
+		{}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -225,15 +227,17 @@ namespace detail
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// tquat<valType> operators
 	// tquat<valType> operators
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<T, P> const & q)
-	{
-		this->w = q.w;
-		this->x = q.x;
-		this->y = q.y;
-		this->z = q.z;
-		return *this;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<T, P> const & q)
+		{
+			this->w = q.w;
+			this->x = q.x;
+			this->y = q.y;
+			this->z = q.z;
+			return *this;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 3 - 3
glm/gtx/dual_quaternion.hpp

@@ -94,8 +94,8 @@ namespace glm
 		//////////////////////////////////////
 		//////////////////////////////////////
 		// Implicit basic constructors
 		// Implicit basic constructors
 
 
-		GLM_FUNC_DECL tdualquat();
-		GLM_FUNC_DECL tdualquat(tdualquat<T, P> const & d);
+		GLM_FUNC_DECL tdualquat() GLM_DEFAULT;
+		GLM_FUNC_DECL tdualquat(tdualquat<T, P> const & d) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tdualquat(tdualquat<T, Q> const & d);
 		GLM_FUNC_DECL tdualquat(tdualquat<T, Q> const & d);
 
 
@@ -117,7 +117,7 @@ namespace glm
 		GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat);
 		GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat);
 
 
 		// Operators
 		// Operators
-		GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<T, P> const & m);
+		GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
 		GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<U, P> const & m);
 		GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<U, P> const & m);

+ 23 - 19
glm/gtx/dual_quaternion.inl

@@ -83,19 +83,21 @@ namespace glm
 	//////////////////////////////////////
 	//////////////////////////////////////
 	// Implicit basic constructors
 	// Implicit basic constructors
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat()
-#		ifndef GLM_FORCE_NO_CTOR_INIT 
-			: real(tquat<T, P>())
-			, dual(tquat<T, P>(0, 0, 0, 0))
-#		endif
-	{}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat()
+#			ifndef GLM_FORCE_NO_CTOR_INIT 
+				: real(tquat<T, P>())
+				, dual(tquat<T, P>(0, 0, 0, 0))
+#			endif
+		{}
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, P> const & d)
-		: real(d.real)
-		, dual(d.dual)
-	{}
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, P> const & d)
+			: real(d.real)
+			, dual(d.dual)
+		{}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
@@ -155,13 +157,15 @@ namespace glm
 	//////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////
 	// tdualquat operators
 	// tdualquat operators
 
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator=(tdualquat<T, P> const & q)
-	{
-		this->real = q.real;
-		this->dual = q.dual;
-		return *this;
-	}
+#	if !GLM_HAS_DEFAULTED_FUNCTIONS
+		template <typename T, precision P>
+		GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator=(tdualquat<T, P> const & q)
+		{
+			this->real = q.real;
+			this->dual = q.dual;
+			return *this;
+		}
+#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>

+ 1 - 0
readme.md

@@ -60,6 +60,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
 - Added <glm/gtx/wrap.hpp> for texcoord wrapping
 - Added <glm/gtx/wrap.hpp> for texcoord wrapping
 - Added static components and precision members to all vector and quat types #350
 - Added static components and precision members to all vector and quat types #350
 - Added .gitignore #349
 - Added .gitignore #349
+- Added support of defaulted functions to GLM types, to use them in unions #366
 
 
 ##### Improvements:
 ##### Improvements:
 - Changed usage of __has_include to support Intel compiler #307
 - Changed usage of __has_include to support Intel compiler #307

+ 16 - 0
test/core/core_type_mat2x2.cpp

@@ -82,6 +82,22 @@ int test_ctr()
 {
 {
 	int Error(0);
 	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
 #if GLM_HAS_INITIALIZER_LISTS
 	glm::mat2x2 m0(
 	glm::mat2x2 m0(
 		glm::vec2(0, 1), 
 		glm::vec2(0, 1), 

+ 17 - 1
test/core/core_type_mat2x3.cpp

@@ -55,7 +55,23 @@ static int test_operators()
 int test_ctr()
 int test_ctr()
 {
 {
 	int Error(0);
 	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
 #if GLM_HAS_INITIALIZER_LISTS
 	glm::mat2x3 m0(
 	glm::mat2x3 m0(
 		glm::vec3(0, 1, 2),
 		glm::vec3(0, 1, 2),

+ 17 - 1
test/core/core_type_mat2x4.cpp

@@ -55,7 +55,23 @@ static int test_operators()
 int test_ctr()
 int test_ctr()
 {
 {
 	int Error(0);
 	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)
 #if(GLM_HAS_INITIALIZER_LISTS)
 	glm::mat2x4 m0(
 	glm::mat2x4 m0(
 		glm::vec4(0, 1, 2, 3),
 		glm::vec4(0, 1, 2, 3),

+ 17 - 1
test/core/core_type_mat3x2.cpp

@@ -55,7 +55,23 @@ static bool test_operators()
 int test_ctr()
 int test_ctr()
 {
 {
 	int Error(0);
 	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)
 #if(GLM_HAS_INITIALIZER_LISTS)
 	glm::mat3x2 m0(
 	glm::mat3x2 m0(
 		glm::vec2(0, 1),
 		glm::vec2(0, 1),

+ 17 - 1
test/core/core_type_mat3x3.cpp

@@ -114,7 +114,23 @@ int test_inverse()
 int test_ctr()
 int test_ctr()
 {
 {
 	int Error(0);
 	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)
 #if(GLM_HAS_INITIALIZER_LISTS)
 	glm::mat3x3 m0(
 	glm::mat3x3 m0(
 		glm::vec3(0, 1, 2),
 		glm::vec3(0, 1, 2),

+ 17 - 1
test/core/core_type_mat3x4.cpp

@@ -55,7 +55,23 @@ static bool test_operators()
 int test_ctr()
 int test_ctr()
 {
 {
 	int Error(0);
 	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)
 #if(GLM_HAS_INITIALIZER_LISTS)
 	glm::mat3x4 m0(
 	glm::mat3x4 m0(
 		glm::vec4(0, 1, 2, 3),
 		glm::vec4(0, 1, 2, 3),

+ 16 - 0
test/core/core_type_mat4x2.cpp

@@ -56,6 +56,22 @@ int test_ctr()
 {
 {
 	int Error(0);
 	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)
 #if(GLM_HAS_INITIALIZER_LISTS)
 	glm::mat4x2 m0(
 	glm::mat4x2 m0(
 		glm::vec2(0, 1), 
 		glm::vec2(0, 1), 

+ 16 - 0
test/core/core_type_mat4x3.cpp

@@ -56,6 +56,22 @@ int test_ctr()
 {
 {
 	int Error(0);
 	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)
 #if(GLM_HAS_INITIALIZER_LISTS)
 	glm::mat4x3 m0(
 	glm::mat4x3 m0(
 		glm::vec3(0, 1, 2), 
 		glm::vec3(0, 1, 2), 

+ 16 - 0
test/core/core_type_mat4x4.cpp

@@ -203,6 +203,22 @@ int test_ctr()
 {
 {
 	int Error(0);
 	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
 #if GLM_HAS_TRIVIAL_QUERIES
 	//Error += std::is_trivially_default_constructible<glm::mat4>::value ? 0 : 1;
 	//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_copy_assignable<glm::mat4>::value ? 0 : 1;

+ 16 - 0
test/gtc/gtc_quaternion.cpp

@@ -296,6 +296,22 @@ int test_quat_ctr()
 {
 {
 	int Error(0);
 	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
 #	if GLM_HAS_TRIVIAL_QUERIES
 	//	Error += std::is_trivially_default_constructible<glm::quat>::value ? 0 : 1;
 	//	Error += std::is_trivially_default_constructible<glm::quat>::value ? 0 : 1;
 	//	Error += std::is_trivially_default_constructible<glm::dquat>::value ? 0 : 1;
 	//	Error += std::is_trivially_default_constructible<glm::dquat>::value ? 0 : 1;