From 291c11cf66e7083dc21fffea1afbdeaaad96077d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 13 Mar 2022 21:30:11 +0200 Subject: [PATCH] Require C++11 for building --- Build | 5 +++++ source/linal/vector.h | 35 +---------------------------------- 2 files changed, 6 insertions(+), 34 deletions(-) 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 -- 2.43.0