more vector ctors

This commit is contained in:
BlackMATov
2020-11-21 22:14:28 +07:00
parent c256523102
commit 4edfa973d2
4 changed files with 65 additions and 21 deletions

View File

@@ -171,17 +171,17 @@ namespace vmath_hpp
}
constexpr value_type& at(size_type index) {
if ( index < Size ) {
return rows[index];
if ( index >= Size ) {
throw std::out_of_range("mat::at");
}
throw std::out_of_range("mat::at");
return rows[index];
}
constexpr const value_type& at(size_type index) const {
if ( index < Size ) {
return rows[index];
if ( index >= Size ) {
throw std::out_of_range("mat::at");
}
throw std::out_of_range("mat::at");
return rows[index];
}
};