matrix: remove static_assert size testing

accessing the static size data via a class instance is unwiedly, but we
should have identical protections due to the template parameters
This commit is contained in:
Danny Robson 2016-08-15 20:52:51 +10:00
parent 28cd180c44
commit 7b4ece207b

View File

@ -115,11 +115,6 @@ util::operator OP ( \
const util::matrix<S,T> &a, \ const util::matrix<S,T> &a, \
const util::matrix<S,T> &b) \ const util::matrix<S,T> &b) \
{ \ { \
static_assert ( \
a.rows == b.rows && a.cols == b.cols, \
"matrix dimensions must match for elementwise operations" \
); \
\
util::matrix<S,T> res {}; \ util::matrix<S,T> res {}; \
\ \
for (size_t i = 0; i < a.rows; ++i) \ for (size_t i = 0; i < a.rows; ++i) \
@ -194,11 +189,6 @@ constexpr
bool bool
util::operator== (const matrix<S,T> &a, const matrix<S,T> &b) util::operator== (const matrix<S,T> &a, const matrix<S,T> &b)
{ {
static_assert (
a.rows == b.rows && a.cols == b.cols,
"elementwise operations must be the same dimension"
);
return std::equal (std::cbegin (a), std::cend (a), std::cbegin (b)); return std::equal (std::cbegin (a), std::cend (a), std::cbegin (b));
} }