Commit 0ef5f46a authored by Praetorius, Simon's avatar Praetorius, Simon

Merge branch 'issue/fieldmatvec_enum_compare' into 'develop'

Fixed enum comparison

See merge request !84
parents 9fd34292 808865a7
Pipeline #1741 passed with stage
in 31 minutes and 39 seconds
...@@ -50,7 +50,7 @@ namespace MatVec { ...@@ -50,7 +50,7 @@ namespace MatVec {
std::enable_if_t<IsMatrix<Mat>::value && IsVector<Vec>::value, int>> std::enable_if_t<IsMatrix<Mat>::value && IsVector<Vec>::value, int>>
auto multiplies(Mat const& mat, Vec const& vec) auto multiplies(Mat const& mat, Vec const& vec)
{ {
static_assert(Mat::cols == Vec::dimension, ""); static_assert(int(Mat::cols) == int(Vec::dimension), "");
using T = std::common_type_t<typename FieldTraits<Vec>::field_type, typename FieldTraits<Mat>::field_type>; using T = std::common_type_t<typename FieldTraits<Vec>::field_type, typename FieldTraits<Mat>::field_type>;
FieldVector<T,Mat::rows> y; FieldVector<T,Mat::rows> y;
mat.mv(vec, y); mat.mv(vec, y);
...@@ -62,7 +62,7 @@ namespace MatVec { ...@@ -62,7 +62,7 @@ namespace MatVec {
std::enable_if_t<IsVector<Vec>::value && IsMatrix<Mat>::value, int>> std::enable_if_t<IsVector<Vec>::value && IsMatrix<Mat>::value, int>>
auto multiplies(Vec const& vec, Mat const& mat) auto multiplies(Vec const& vec, Mat const& mat)
{ {
static_assert(Mat::rows == Vec::dimension, ""); static_assert(int(Mat::rows) == int(Vec::dimension), "");
using T = std::common_type_t<typename FieldTraits<Vec>::field_type, typename FieldTraits<Mat>::field_type>; using T = std::common_type_t<typename FieldTraits<Vec>::field_type, typename FieldTraits<Mat>::field_type>;
FieldVector<T,Mat::cols> y; FieldVector<T,Mat::cols> y;
mat.mtv(vec, y); mat.mtv(vec, y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment