X-Git-Url: http://git.tdb.fi/?p=libs%2Fmath.git;a=blobdiff_plain;f=source%2Flinal%2Fvector.h;h=610ac2103a21ab83e0b58f88905e6d07c6962d2d;hp=31597d4282410e2606590eaea2faa6d3c22c2cd9;hb=291c11cf66e7083dc21fffea1afbdeaaad96077d;hpb=0202ce51b7a16a4b8cbc9d3257f46ade114eba34 diff --git a/source/linal/vector.h b/source/linal/vector.h index 31597d4..610ac21 100644 --- a/source/linal/vector.h +++ b/source/linal/vector.h @@ -84,14 +84,9 @@ public: use by Matrix row accessor. */ Vector(const T *, unsigned); -#if __cplusplus >= 201103L template Vector(T, Args...); -#else - Vector(T, T); - Vector(T, T, T); - Vector(T, T, T, T); -#endif + template Vector(const Vector &); @@ -131,7 +126,6 @@ inline Vector::Vector(const T *d, unsigned stride) (*this)[i] = d[i*stride]; } -#if __cplusplus >= 201103L template template inline Vector::Vector(T x_, Args... v) @@ -142,33 +136,6 @@ inline Vector::Vector(T x_, Args... v) for(auto c: std::initializer_list { static_cast(v)... }) (*this)[i++] = c; } -#else -/* The compiler won't instantiate these unless they are used. Trying to use -them on the wrong class results in an error. */ -template -inline Vector::Vector(T x_, T y_) -{ - this->VectorComponents::x = x_; - this->VectorComponents::y = y_; -} - -template -inline Vector::Vector(T x_, T y_, T z_) -{ - this->VectorComponents::x = x_; - this->VectorComponents::y = y_; - this->VectorComponents::z = z_; -} - -template -inline Vector::Vector(T x_, T y_, T z_, T w_) -{ - this->VectorComponents::x = x_; - this->VectorComponents::y = y_; - this->VectorComponents::z = z_; - this->VectorComponents::w = w_; -} -#endif template template