Why does compiling Basic Linear Algebra library by Tom Stewart give me so many errors ?

The syntax used by the library is invalid. You should remove the template arguments in the constructors.

For example, HorizontalConcat<LeftType, RightType>(const LeftType &l, const RightType &r) : left(l), right(r) {} should be HorizontalConcat(const LeftType &l, const RightType &r) : left(l), right(r) {}.

In older versions of C++, you were allowed to include the explicit template instantiation in constructor names (but doing so was entirely pointless), since C++20, this is no longer valid.

See the syntax rules on Constructors and member initializer lists - cppreference.com.

1 Like