]> git.tdb.fi Git - libs/math.git/blobdiff - source/linal/vector.h
Require C++11 for building
[libs/math.git] / source / linal / vector.h
index 31597d4282410e2606590eaea2faa6d3c22c2cd9..610ac2103a21ab83e0b58f88905e6d07c6962d2d 100644 (file)
@@ -84,14 +84,9 @@ public:
        use by Matrix row accessor. */
        Vector(const T *, unsigned);
 
-#if __cplusplus >= 201103L
        template<typename... Args>
        Vector(T, Args...);
-#else
-       Vector(T, T);
-       Vector(T, T, T);
-       Vector(T, T, T, T);
-#endif
+
        template<typename U>
        Vector(const Vector<U, N> &);
 
@@ -131,7 +126,6 @@ inline Vector<T, N>::Vector(const T *d, unsigned stride)
                (*this)[i] = d[i*stride];
 }
 
-#if __cplusplus >= 201103L
 template<typename T, unsigned N>
 template<typename... Args>
 inline Vector<T, N>::Vector(T x_, Args... v)
@@ -142,33 +136,6 @@ inline Vector<T, N>::Vector(T x_, Args... v)
        for(auto c: std::initializer_list<T> { static_cast<T>(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<typename T, unsigned N>
-inline Vector<T, N>::Vector(T x_, T y_)
-{
-       this->VectorComponents<T, 2>::x = x_;
-       this->VectorComponents<T, 2>::y = y_;
-}
-
-template<typename T, unsigned N>
-inline Vector<T, N>::Vector(T x_, T y_, T z_)
-{
-       this->VectorComponents<T, 3>::x = x_;
-       this->VectorComponents<T, 3>::y = y_;
-       this->VectorComponents<T, 3>::z = z_;
-}
-
-template<typename T, unsigned N>
-inline Vector<T, N>::Vector(T x_, T y_, T z_, T w_)
-{
-       this->VectorComponents<T, 4>::x = x_;
-       this->VectorComponents<T, 4>::y = y_;
-       this->VectorComponents<T, 4>::z = z_;
-       this->VectorComponents<T, 4>::w = w_;
-}
-#endif
 
 template<typename T, unsigned N>
 template<typename U>