diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index af667348..41a0d4a1 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -479,13 +479,21 @@ #define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL #define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE -#if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE +// Do not use CUDA function qualifiers on CUDA compiler when functions are made default +#if GLM_HAS_DEFAULTED_FUNCTIONS # define GLM_DEFAULTED_FUNC_DECL -# define GLM_DEFAULTED_FUNC_QUALIFIER +# define GLM_DEFAULTED_FUNC_QUALIFIER GLM_INLINE #else # define GLM_DEFAULTED_FUNC_DECL GLM_FUNC_DECL # define GLM_DEFAULTED_FUNC_QUALIFIER GLM_FUNC_QUALIFIER -#endif//GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE +#endif//GLM_HAS_DEFAULTED_FUNCTIONS +#if !defined(GLM_FORCE_CTOR_INIT) +# define GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_DEFAULTED_FUNC_DECL +# define GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_DEFAULTED_FUNC_QUALIFIER +#else +# define GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_FUNC_DECL +# define GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_FUNC_QUALIFIER +#endif//GLM_FORCE_CTOR_INIT /////////////////////////////////////////////////////////////////////////////////// // Swizzle operators diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index 723993d2..83bb189e 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -32,7 +32,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 2, T, P> const& m); diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index e0a976c8..7dea4b1b 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -6,7 +6,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0), col_type(0, 1)} # endif diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index fc39afcd..3a268fee 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -33,7 +33,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 3, T, P> const& m); diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index 6b935f01..c9398817 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -4,7 +4,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0), col_type(0, 1, 0)} # endif diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index b1375066..e998f614 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -33,7 +33,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 4, T, P> const& m); diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index 197bee44..0095611e 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -4,7 +4,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0)} # endif diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index 99cd4996..b8df84f3 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -33,7 +33,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 2, T, P> const& m); diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index f645e5dc..a37cce40 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -4,7 +4,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0), col_type(0, 1), col_type(0, 0)} # endif diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index 8237b3fd..de0924ae 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -32,7 +32,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 3, T, P> const& m); diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index 407468e3..6c9c0fd8 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -6,7 +6,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0), col_type(0, 1, 0), col_type(0, 0, 1)} # endif diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index 5347cd18..7995780a 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -33,7 +33,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 4, T, P> const& m); diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index 8fc6beef..2b5d04ff 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -4,7 +4,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0), col_type(0, 0, 1, 0)} # endif diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index f65423cf..9efc9ea1 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -33,7 +33,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 2, T, P> const& m); diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index 047f6876..7a340380 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -4,7 +4,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0), col_type(0, 1), col_type(0, 0), col_type(0, 0)} # endif diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index 170f15f8..b12ddd03 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -33,7 +33,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 3, T, P> const& m); diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index 51d68cff..003b45d7 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -4,7 +4,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0), col_type(0, 1, 0), col_type(0, 0, 1), col_type(0, 0, 0)} # endif diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index 04007e4d..4a2d1f5b 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -32,7 +32,7 @@ namespace glm // -- Constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR mat() GLM_DEFAULT_CTOR; template GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 4, T, P> const& m); diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index a1f04c9b..5f27abe9 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -6,7 +6,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat() # if GLM_CONFIG_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0), col_type(0, 0, 1, 0), col_type(0, 0, 0, 1)} # endif diff --git a/glm/detail/type_quat.hpp b/glm/detail/type_quat.hpp index 8ce048fb..67a84742 100644 --- a/glm/detail/type_quat.hpp +++ b/glm/detail/type_quat.hpp @@ -80,7 +80,7 @@ namespace glm // -- Implicit basic constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR qua() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR qua() GLM_DEFAULT_CTOR; GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR qua(qua const& q) GLM_DEFAULT; template GLM_FUNC_DECL GLM_CONSTEXPR qua(qua const& q); diff --git a/glm/detail/type_quat.inl b/glm/detail/type_quat.inl index 88bbc84a..4b1e84d9 100644 --- a/glm/detail/type_quat.inl +++ b/glm/detail/type_quat.inl @@ -97,7 +97,7 @@ namespace detail # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR qua::qua() # if GLM_CONFIG_CTOR_INIT != GLM_CTOR_INIT_DISABLE # ifdef GLM_FORCE_QUAT_DATA_XYZW : x(0), y(0), z(0), w(1) diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index ea916b0d..91232f9c 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -92,7 +92,7 @@ namespace glm // -- Implicit basic constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR; GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT; template GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, T, P> const& v); diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 9c9bdcb8..18411e7f 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -8,7 +8,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec() # if GLM_CONFIG_CTOR_INIT != GLM_CTOR_INIT_DISABLE : x(0) # endif diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index d4ccc039..424868f5 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -94,7 +94,7 @@ namespace glm // -- Implicit basic constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR; GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT; template GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, T, P> const& v); diff --git a/glm/detail/type_vec2.inl b/glm/detail/type_vec2.inl index d5b9deb9..24850965 100644 --- a/glm/detail/type_vec2.inl +++ b/glm/detail/type_vec2.inl @@ -8,7 +8,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec() # if GLM_CONFIG_CTOR_INIT != GLM_CTOR_INIT_DISABLE : x(0), y(0) # endif diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 4a636044..67104800 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -98,7 +98,7 @@ namespace glm // -- Implicit basic constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR; GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT; template GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, T, P> const& v); diff --git a/glm/detail/type_vec3.inl b/glm/detail/type_vec3.inl index 9d25eb21..5a258d1f 100644 --- a/glm/detail/type_vec3.inl +++ b/glm/detail/type_vec3.inl @@ -8,7 +8,7 @@ namespace glm # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec() # if GLM_CONFIG_CTOR_INIT != GLM_CTOR_INIT_DISABLE : x(0), y(0), z(0) # endif diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index d1b713ce..601256c3 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -97,7 +97,7 @@ namespace glm // -- Implicit basic constructors -- - GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR; + GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR; GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, Q> const& v) GLM_DEFAULT; template GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, P> const& v); diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index bd7cd4a4..440de5fc 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -131,7 +131,7 @@ namespace detail # if GLM_CONFIG_DEFAULTED_DEFAULT_CTOR == GLM_DISABLE template - GLM_DEFAULTED_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec() + GLM_DEFAULTED_DEFAULT_CTOR_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec() # if GLM_CONFIG_CTOR_INIT != GLM_CTOR_INIT_DISABLE : x(0), y(0), z(0), w(0) # endif