diff options
Diffstat (limited to 'libprakpp/include/prakmatrix.hpp')
-rw-r--r-- | libprakpp/include/prakmatrix.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libprakpp/include/prakmatrix.hpp b/libprakpp/include/prakmatrix.hpp index 53d3b4b..f1ccddc 100644 --- a/libprakpp/include/prakmatrix.hpp +++ b/libprakpp/include/prakmatrix.hpp @@ -14,7 +14,7 @@ struct dimension_error : public std::logic_error { }; /// A class to represent a matrix. Works as an extension to std::vector, so all methods of std::vector are available on this class -/// BIG TODO: replave `throw` with `std::optional` return type +/// BIG TODO: replace `throw` with `std::optional` return type template <typename T> struct matrix : public std::vector<T> { size_t rows, cols; @@ -75,7 +75,7 @@ struct matrix : public std::vector<T> { } /// multiply matrix by a scalar template <typename Arg> - std::enable_if_t<std::is_arithmetic_v<Arg>, struct matrix<T>> + std::enable_if_t<std::is_arithmetic_v<Arg>, struct matrix<T>>::type operator*(const Arg other) const { struct matrix<T> ret(rows, cols); for (size_t i = 0; i < this->size(); ++i) |