Fixed initializer list ambiguity (#159, #160)

This commit is contained in:
Christophe Riccio 2014-02-08 12:40:34 +01:00
parent 638d49b549
commit 1d981dd344
26 changed files with 59 additions and 384 deletions

View File

@ -72,29 +72,22 @@ namespace detail
ctor Null);
GLM_FUNC_DECL explicit tmat2x2(
T const & x);
GLM_FUNC_DECL explicit tmat2x2(
GLM_FUNC_DECL tmat2x2(
T const & x1, T const & y1,
T const & x2, T const & y2);
GLM_FUNC_DECL explicit tmat2x2(
GLM_FUNC_DECL tmat2x2(
col_type const & v1,
col_type const & v2);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat2x2(std::initializer_list<U> m);
GLM_FUNC_DECL tmat2x2(std::initializer_list<tvec2<T, P> > m);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
template <typename U, typename V, typename M, typename N>
GLM_FUNC_DECL explicit tmat2x2(
GLM_FUNC_DECL tmat2x2(
U const & x1, V const & y1,
M const & x2, N const & y2);
template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x2(
GLM_FUNC_DECL tmat2x2(
tvec2<U, P> const & v1,
tvec2<V, P> const & v2);

View File

@ -129,29 +129,6 @@ namespace detail
this->value[1] = v1;
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec2<T, P>(*(p + 0), *(p + 1));
this->value[1] = tvec2<T, P>(*(p + 2), *(p + 3));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(std::initializer_list<tvec2<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversion constructors
template <typename T, precision P>

View File

@ -66,29 +66,22 @@ namespace detail
ctor);
GLM_FUNC_DECL explicit tmat2x3(
T const & s);
GLM_FUNC_DECL explicit tmat2x3(
GLM_FUNC_DECL tmat2x3(
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1);
GLM_FUNC_DECL explicit tmat2x3(
GLM_FUNC_DECL tmat2x3(
col_type const & v0,
col_type const & v1);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat2x3(std::initializer_list<U> m);
GLM_FUNC_DECL tmat2x3(std::initializer_list<tvec3<T, P> > m);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
GLM_FUNC_DECL explicit tmat2x3(
GLM_FUNC_DECL tmat2x3(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2);
template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x3(
GLM_FUNC_DECL tmat2x3(
tvec3<U, P> const & v1,
tvec3<V, P> const & v2);

View File

@ -128,29 +128,6 @@ namespace detail
this->value[1] = v1;
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec3<T, P>(*(p + 0), *(p + 1), *(p + 2));
this->value[1] = tvec3<T, P>(*(p + 3), *(p + 4), *(p + 5));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(std::initializer_list<tvec3<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversion constructors
template <typename T, precision P>

View File

@ -66,31 +66,24 @@ namespace detail
ctor);
GLM_FUNC_DECL explicit tmat2x4(
T const & s);
GLM_FUNC_DECL explicit tmat2x4(
GLM_FUNC_DECL tmat2x4(
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1);
GLM_FUNC_DECL explicit tmat2x4(
GLM_FUNC_DECL tmat2x4(
col_type const & v0,
col_type const & v1);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat2x4(std::initializer_list<U> m);
GLM_FUNC_DECL tmat2x4(std::initializer_list<tvec4<T, P> > m);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
template <
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_DECL explicit tmat2x4(
GLM_FUNC_DECL tmat2x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x4(
GLM_FUNC_DECL tmat2x4(
tvec4<U, P> const & v1,
tvec4<V, P> const & v2);

View File

@ -131,29 +131,6 @@ namespace detail
this->value[1] = v1;
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec4<T, P>(*(p + 0), *(p + 1), *(p + 2), *(p + 3));
this->value[1] = tvec4<T, P>(*(p + 4), *(p + 5), *(p + 6), *(p + 7));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(std::initializer_list<tvec4<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversion constructors
template <typename T, precision P>

View File

@ -66,35 +66,28 @@ namespace detail
ctor);
GLM_FUNC_DECL explicit tmat3x2(
T const & s);
GLM_FUNC_DECL explicit tmat3x2(
GLM_FUNC_DECL tmat3x2(
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2);
GLM_FUNC_DECL explicit tmat3x2(
GLM_FUNC_DECL tmat3x2(
col_type const & v0,
col_type const & v1,
col_type const & v2);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat3x2(std::initializer_list<U> l);
GLM_FUNC_DECL tmat3x2(std::initializer_list<tvec2<T, P> > l);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
template<
typename X1, typename Y1,
typename X2, typename Y2,
typename X3, typename Y3>
GLM_FUNC_DECL explicit tmat3x2(
GLM_FUNC_DECL tmat3x2(
X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x2(
GLM_FUNC_DECL tmat3x2(
tvec2<V1, P> const & v1,
tvec2<V2, P> const & v2,
tvec2<V3, P> const & v3);

View File

@ -136,31 +136,6 @@ namespace detail
this->value[2] = v2;
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec2<T, P>(*(p + 0), *(p + 1));
this->value[1] = tvec2<T, P>(*(p + 2), *(p + 3));
this->value[2] = tvec2<T, P>(*(p + 4), *(p + 5));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(std::initializer_list<tvec2<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
this->value[2] = l.begin()[2];
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversion constructors
template <typename T, precision P>

View File

@ -71,35 +71,28 @@ namespace detail
ctor Null);
GLM_FUNC_DECL explicit tmat3x3(
T const & s);
GLM_FUNC_DECL explicit tmat3x3(
GLM_FUNC_DECL tmat3x3(
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1,
T const & x2, T const & y2, T const & z2);
GLM_FUNC_DECL explicit tmat3x3(
GLM_FUNC_DECL tmat3x3(
col_type const & v0,
col_type const & v1,
col_type const & v2);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat3x3(std::initializer_list<U> m);
GLM_FUNC_DECL tmat3x3(std::initializer_list<tvec3<T, P> > m);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
template<
typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3>
GLM_FUNC_DECL explicit tmat3x3(
GLM_FUNC_DECL tmat3x3(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x3(
GLM_FUNC_DECL tmat3x3(
tvec3<V1, P> const & v1,
tvec3<V2, P> const & v2,
tvec3<V3, P> const & v3);

View File

@ -139,31 +139,6 @@ namespace detail
this->value[2] = v2;
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec3<T, P>(*(p + 0), *(p + 1), *(p + 2));
this->value[1] = tvec3<T, P>(*(p + 3), *(p + 4), *(p + 5));
this->value[2] = tvec3<T, P>(*(p + 6), *(p + 7), *(p + 8));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(std::initializer_list<tvec3<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
this->value[2] = l.begin()[2];
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversion constructors
template <typename T, precision P>

View File

@ -66,35 +66,28 @@ namespace detail
ctor Null);
GLM_FUNC_DECL explicit tmat3x4(
T const & s);
GLM_FUNC_DECL explicit tmat3x4(
GLM_FUNC_DECL tmat3x4(
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1,
T const & x2, T const & y2, T const & z2, T const & w2);
GLM_FUNC_DECL explicit tmat3x4(
GLM_FUNC_DECL tmat3x4(
col_type const & v0,
col_type const & v1,
col_type const & v2);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat3x4(std::initializer_list<U> m);
GLM_FUNC_DECL tmat3x4(std::initializer_list<tvec4<T, P> > m);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
template<
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3>
GLM_FUNC_DECL explicit tmat3x4(
GLM_FUNC_DECL tmat3x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x4(
GLM_FUNC_DECL tmat3x4(
tvec4<V1, P> const & v1,
tvec4<V2, P> const & v2,
tvec4<V3, P> const & v3);

View File

@ -169,31 +169,6 @@ namespace detail
this->value[1] = col_type(v2);
this->value[2] = col_type(v3);
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec4<T, P>(*(p + 0), *(p + 1), *(p + 2), *(p + 3));
this->value[1] = tvec4<T, P>(*(p + 4), *(p + 5), *(p + 6), *(p + 7));
this->value[2] = tvec4<T, P>(*(p + 8), *(p + 9), *(p + 10), *(p + 11));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(std::initializer_list<tvec4<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
this->value[2] = l.begin()[2];
}
#endif//GLM_HAS_INITIALIZER_LISTS
// Conversion
template <typename T, precision P>

View File

@ -66,24 +66,17 @@ namespace detail
ctor Null);
GLM_FUNC_DECL explicit tmat4x2(
T const & x);
GLM_FUNC_DECL explicit tmat4x2(
GLM_FUNC_DECL tmat4x2(
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2,
T const & x3, T const & y3);
GLM_FUNC_DECL explicit tmat4x2(
GLM_FUNC_DECL tmat4x2(
col_type const & v0,
col_type const & v1,
col_type const & v2,
col_type const & v3);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat4x2(std::initializer_list<U> m);
GLM_FUNC_DECL tmat4x2(std::initializer_list<tvec2<T, P> > m);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
@ -92,14 +85,14 @@ namespace detail
typename X2, typename Y2,
typename X3, typename Y3,
typename X4, typename Y4>
GLM_FUNC_DECL explicit tmat4x2(
GLM_FUNC_DECL tmat4x2(
X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3,
X4 const & x4, Y4 const & y4);
template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x2(
GLM_FUNC_DECL tmat4x2(
tvec2<V1, P> const & v1,
tvec2<V2, P> const & v2,
tvec2<V3, P> const & v3,

View File

@ -181,33 +181,6 @@ namespace detail
this->value[3] = col_type(v4);
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec2<T, P>(*(p + 0), *(p + 1));
this->value[1] = tvec2<T, P>(*(p + 2), *(p + 3));
this->value[2] = tvec2<T, P>(*(p + 4), *(p + 5));
this->value[3] = tvec2<T, P>(*(p + 6), *(p + 7));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(std::initializer_list<tvec2<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
this->value[2] = l.begin()[2];
this->value[3] = l.begin()[3];
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversion
template <typename T, precision P>

View File

@ -66,24 +66,17 @@ namespace detail
ctor Null);
GLM_FUNC_DECL explicit tmat4x3(
T const & x);
GLM_FUNC_DECL explicit tmat4x3(
GLM_FUNC_DECL tmat4x3(
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1,
T const & x2, T const & y2, T const & z2,
T const & x3, T const & y3, T const & z3);
GLM_FUNC_DECL explicit tmat4x3(
GLM_FUNC_DECL tmat4x3(
col_type const & v0,
col_type const & v1,
col_type const & v2,
col_type const & v3);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat4x3(std::initializer_list<U> m);
GLM_FUNC_DECL tmat4x3(std::initializer_list<tvec3<T, P> > m);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
@ -92,14 +85,14 @@ namespace detail
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3,
typename X4, typename Y4, typename Z4>
GLM_FUNC_DECL explicit tmat4x3(
GLM_FUNC_DECL tmat4x3(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3,
X4 const & x4, Y4 const & y4, Z4 const & z4);
template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x3(
GLM_FUNC_DECL tmat4x3(
tvec3<V1, P> const & v1,
tvec3<V2, P> const & v2,
tvec3<V3, P> const & v3,

View File

@ -140,33 +140,6 @@ namespace detail
this->value[3] = v3;
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec3<T, P>(*(p + 0), *(p + 1), *(p + 2));
this->value[1] = tvec3<T, P>(*(p + 3), *(p + 4), *(p + 5));
this->value[2] = tvec3<T, P>(*(p + 6), *(p + 7), *(p + 8));
this->value[3] = tvec3<T, P>(*(p + 9), *(p + 10), *(p + 11));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(std::initializer_list<tvec3<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
this->value[2] = l.begin()[2];
this->value[3] = l.begin()[3];
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversion constructors

View File

@ -74,24 +74,17 @@ namespace detail
ctor Null);
GLM_FUNC_DECL explicit tmat4x4(
T const & x);
GLM_FUNC_DECL explicit tmat4x4(
GLM_FUNC_DECL tmat4x4(
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1,
T const & x2, T const & y2, T const & z2, T const & w2,
T const & x3, T const & y3, T const & z3, T const & w3);
GLM_FUNC_DECL explicit tmat4x4(
GLM_FUNC_DECL tmat4x4(
col_type const & v0,
col_type const & v1,
col_type const & v2,
col_type const & v3);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tmat4x4(std::initializer_list<U> m);
GLM_FUNC_DECL tmat4x4(std::initializer_list<tvec4<T, P> > m);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversions
@ -100,14 +93,14 @@ namespace detail
typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3,
typename X4, typename Y4, typename Z4, typename W4>
GLM_FUNC_DECL explicit tmat4x4(
GLM_FUNC_DECL tmat4x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x4(
GLM_FUNC_DECL tmat4x4(
tvec4<V1, P> const & v1,
tvec4<V2, P> const & v2,
tvec4<V3, P> const & v3,

View File

@ -162,33 +162,6 @@ namespace detail
this->value[3] = col_type(m[3]);
}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(std::initializer_list<U> l)
{
assert(l.size() == this->length() * this->value[0].length());
typename std::initializer_list<U>::iterator p = l.begin();
this->value[0] = tvec4<T, P>(*(p + 0), *(p + 1), *(p + 2), *(p + 3));
this->value[1] = tvec4<T, P>(*(p + 4), *(p + 5), *(p + 6), *(p + 7));
this->value[2] = tvec4<T, P>(*(p + 8), *(p + 9), *(p + 10), *(p + 11));
this->value[3] = tvec4<T, P>(*(p + 12), *(p + 13), *(p + 14), *(p + 15));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(std::initializer_list<tvec4<T, P> > l)
{
assert(l.size() == this->length());
this->value[0] = l.begin()[0];
this->value[1] = l.begin()[1];
this->value[2] = l.begin()[2];
this->value[3] = l.begin()[3];
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Conversion constructors
template <typename T, precision P>

View File

@ -107,11 +107,6 @@ namespace detail
template <precision Q>
GLM_FUNC_DECL tvec2(tvec2<T, Q> const & v);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tvec2(std::initializer_list<U> const & v);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Explicit basic constructors
@ -119,7 +114,7 @@ namespace detail
ctor);
GLM_FUNC_DECL explicit tvec2(
T const & s);
GLM_FUNC_DECL explicit tvec2(
GLM_FUNC_DECL tvec2(
T const & s1,
T const & s2);
@ -139,7 +134,7 @@ namespace detail
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, typename V>
GLM_FUNC_DECL explicit tvec2(
GLM_FUNC_DECL tvec2(
U const & x,
V const & y);
@ -148,7 +143,7 @@ namespace detail
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec2(tvec2<U, Q> const & v);
GLM_FUNC_DECL tvec2(tvec2<U, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v);

View File

@ -74,17 +74,6 @@ namespace detail
y(v.y)
{}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(std::initializer_list<U> const & v) :
x(static_cast<T>(v.begin()[0])),
y(static_cast<T>(v.begin()[1]))
{
assert(v.size() == this->length());
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Explicit basic constructors

View File

@ -108,11 +108,6 @@ namespace detail
template <precision Q>
GLM_FUNC_DECL tvec3(tvec3<T, Q> const & v);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tvec3(std::initializer_list<U> const & v);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Explicit basic constructors
@ -120,7 +115,7 @@ namespace detail
ctor);
GLM_FUNC_DECL explicit tvec3(
T const & s);
GLM_FUNC_DECL explicit tvec3(
GLM_FUNC_DECL tvec3(
T const & s1,
T const & s2,
T const & s3);
@ -130,7 +125,7 @@ namespace detail
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, typename V, typename W>
GLM_FUNC_DECL explicit tvec3(
GLM_FUNC_DECL tvec3(
U const & x,
V const & y,
W const & z);

View File

@ -77,18 +77,6 @@ namespace detail
z(v.z)
{}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(std::initializer_list<U> const & v) :
x(static_cast<T>(v.begin()[0])),
y(static_cast<T>(v.begin()[1])),
z(static_cast<T>(v.begin()[2]))
{
assert(v.size() == this->length());
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Explicit basic constructors

View File

@ -110,11 +110,6 @@ namespace detail
template <precision Q>
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename U>
GLM_FUNC_DECL tvec4(std::initializer_list<U> l);
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Explicit basic constructors
@ -122,7 +117,7 @@ namespace detail
ctor);
GLM_FUNC_DECL explicit tvec4(
T const & s);
GLM_FUNC_DECL explicit tvec4(
GLM_FUNC_DECL tvec4(
T const & s0,
T const & s1,
T const & s2,
@ -133,7 +128,7 @@ namespace detail
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C, typename D>
GLM_FUNC_DECL explicit tvec4(
GLM_FUNC_DECL tvec4(
A const & x,
B const & y,
C const & z,

View File

@ -80,19 +80,6 @@ namespace detail
w(v.w)
{}
#if(GLM_HAS_INITIALIZER_LISTS)
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(std::initializer_list<U> v) :
x(static_cast<T>(v.begin()[0])),
y(static_cast<T>(v.begin()[1])),
z(static_cast<T>(v.begin()[2])),
w(static_cast<T>(v.begin()[3]))
{
assert(v.size() == this->length());
}
#endif//GLM_HAS_INITIALIZER_LISTS
//////////////////////////////////////
// Explicit basic constructors

View File

@ -37,8 +37,9 @@ More informations in GLM manual:
http://glm.g-truc.net/glm.pdf
================================================================================
GLM 0.9.5.2: 2014-0X-XX
GLM 0.9.5.2: 2014-02-08
--------------------------------------------------------------------------------
- Fixed initializer list ambiguity (#159, #160)
- Fixed warnings with the Android NDK 9c
- Fixed non power of two matrix products
- Fixed mix function link error

View File

@ -189,6 +189,19 @@ 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),