From: Mikko Rasa Date: Sun, 13 Mar 2022 19:30:11 +0000 (+0200) Subject: Require C++11 for building X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;ds=sidebyside;h=291c11cf66e7083dc21fffea1afbdeaaad96077d;hp=0202ce51b7a16a4b8cbc9d3257f46ade114eba34;p=libs%2Fmath.git Require C++11 for building --- diff --git a/Build b/Build index f183ff5..7fa961c 100644 --- a/Build +++ b/Build @@ -4,6 +4,11 @@ package "mspmath" require "mspdatafile"; + build_info + { + standard CXX "c++11"; + }; + library "mspmath" { source "source/interpolate"; 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