aboutsummaryrefslogtreecommitdiffstats
path: root/libprakpp/include/prakmatrix.hpp
diff options
context:
space:
mode:
authorjustanothercatgirl <sotov2070@gmail.com>2025-04-15 00:51:40 +0300
committerjustanothercatgirl <sotov2070@gmail.com>2025-04-15 00:51:40 +0300
commit45f12ba19761024d335407793ffb8d4823b28149 (patch)
treeda44d238c8db4e8b90cd8e0edcb23cf779d22e1a /libprakpp/include/prakmatrix.hpp
parent5ee716791bf7a8ca74c1670a6887a53ab92141f6 (diff)
Started doing 207
Diffstat (limited to 'libprakpp/include/prakmatrix.hpp')
-rw-r--r--libprakpp/include/prakmatrix.hpp4
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)