diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index d6d81007..de561636 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -32,9 +32,6 @@ #include "../fwd.hpp" #include "type_vec4.hpp" #include "type_mat.hpp" -#if(GLM_HAS_INITIALIZER_LISTS) -# include -#endif //GLM_HAS_INITIALIZER_LISTS #include #include diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 02f0a06d..597b6d9c 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -38,9 +38,6 @@ # include "_swizzle_func.hpp" # endif #endif //GLM_SWIZZLE -#if(GLM_HAS_INITIALIZER_LISTS) -# include -#endif //GLM_HAS_INITIALIZER_LISTS #include namespace glm{ @@ -82,11 +79,6 @@ namespace detail template GLM_FUNC_DECL tvec1(tvec1 const & v); -#if(GLM_HAS_INITIALIZER_LISTS) - template - GLM_FUNC_DECL tvec1(std::initializer_list const & v); -#endif//GLM_HAS_INITIALIZER_LISTS - ////////////////////////////////////// // Explicit basic constructors diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index e315e956..c924bb95 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -71,16 +71,6 @@ namespace detail x(v.x) {} -#if(GLM_HAS_INITIALIZER_LISTS) - template - template - GLM_FUNC_QUALIFIER tvec1::tvec1(std::initializer_list const & v) : - x(static_cast(v.begin()[0])) - { - assert(v.size() == this->length()); - } -#endif//GLM_HAS_INITIALIZER_LISTS - ////////////////////////////////////// // Explicit basic constructors diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index f1de51d4..44cf183d 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -38,9 +38,6 @@ # include "_swizzle_func.hpp" # endif #endif //GLM_SWIZZLE -#if(GLM_HAS_INITIALIZER_LISTS) -# include -#endif //GLM_HAS_INITIALIZER_LISTS #include namespace glm{ diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 424ab978..a3640ed8 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -38,9 +38,6 @@ # include "_swizzle_func.hpp" # endif #endif //GLM_SWIZZLE -#if(GLM_HAS_INITIALIZER_LISTS) -# include -#endif //GLM_HAS_INITIALIZER_LISTS #include namespace glm{ diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index c9cc8097..91c71f20 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -39,9 +39,6 @@ # include "_swizzle_func.hpp" # endif #endif //GLM_SWIZZLE -#if(GLM_HAS_INITIALIZER_LISTS) -# include -#endif //GLM_HAS_INITIALIZER_LISTS #include namespace glm{ diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 7fad9216..44474573 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -71,20 +71,15 @@ namespace detail template GLM_FUNC_DECL explicit tquat( tquat const & q); - GLM_FUNC_DECL explicit tquat( + GLM_FUNC_DECL tquat( T const & s, tvec3 const & v); - GLM_FUNC_DECL explicit tquat( + GLM_FUNC_DECL tquat( T const & w, T const & x, T const & y, T const & z); -#if(GLM_HAS_INITIALIZER_LISTS) - template - GLM_FUNC_DECL tquat(std::initializer_list l); -#endif//GLM_HAS_INITIALIZER_LISTS - // Convertions /// Create a quaternion from two normalized axis diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index a37c7e3b..951b62c4 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -86,19 +86,6 @@ namespace detail w(w) {} -#if(GLM_HAS_INITIALIZER_LISTS) - template - template - GLM_FUNC_QUALIFIER tquat::tquat(std::initializer_list l) : - x(static_cast(l.begin()[0])), - y(static_cast(l.begin()[1])), - z(static_cast(l.begin()[2])), - w(static_cast(l.begin()[3])) - { - assert(l.size() >= this->length()); - } -#endif//GLM_HAS_INITIALIZER_LISTS - ////////////////////////////////////////////////////////////// // tquat conversions diff --git a/test/core/core_type_mat4x4.cpp b/test/core/core_type_mat4x4.cpp index 9f72363a..bc524f82 100644 --- a/test/core/core_type_mat4x4.cpp +++ b/test/core/core_type_mat4x4.cpp @@ -189,19 +189,6 @@ int test_ctr() { int Error(0); - { - glm::vec4 V{0, 1, 2, 3}; - - glm::mat4 M{ - {0, 1, 2, 3}, - {4, 5, 6, 7}, - {8, 9, 10, 11}, - {12, 13, 14, 15}}; - } - - glm::mat4 m4{ - {0, 1, 2, 3}}; - #if(GLM_HAS_INITIALIZER_LISTS) glm::mat4 m0( glm::vec4(0, 1, 2, 3), @@ -211,6 +198,8 @@ int test_ctr() assert(sizeof(m0) == 4 * 4 * 4); + glm::vec4 V{0, 1, 2, 3}; + glm::mat4 m1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; glm::mat4 m2{ @@ -231,19 +220,9 @@ int test_ctr() {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}}; -/* - std::initializer_list m3{ - {0, 1, 2, 3}, - {4, 5, 6, 7}, - {8, 9, 10, 11}, - {12, 13, 14, 15}}; -*/ - //glm::mat4 m4{m3}; - std::vector v1{ {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} - }; + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}}; std::vector v2{ { @@ -257,8 +236,7 @@ int test_ctr() { 4, 5, 6, 7 }, { 8, 9, 10, 11 }, { 12, 13, 14, 15 } - } - }; + }}; #endif//GLM_HAS_INITIALIZER_LISTS diff --git a/test/gtc/gtc_quaternion.cpp b/test/gtc/gtc_quaternion.cpp index 01dda9b6..4346e8fc 100644 --- a/test/gtc/gtc_quaternion.cpp +++ b/test/gtc/gtc_quaternion.cpp @@ -11,6 +11,7 @@ #include #include #include +#include int test_quat_angle() { @@ -246,10 +247,28 @@ int test_quat_type() return 0; } +int test_quat_ctr() +{ + int Error(0); + +# if(GLM_HAS_INITIALIZER_LISTS) + { + glm::quat A{0, 1, 2, 3}; + + std::vector B{ + {0, 1, 2, 3}, + {0, 1, 2, 3}}; + } +# endif//GLM_HAS_INITIALIZER_LISTS + + return Error; +} + int main() { int Error(0); + Error += test_quat_ctr(); Error += test_quat_two_axis_ctr(); Error += test_quat_mul(); Error += test_quat_precision();