Skip to content
Snippets Groups Projects
Commit 9e31cd76 authored by Sven Kaulmann's avatar Sven Kaulmann
Browse files

Replaced CompileTimeChecker by dune_static_assert

parent f3f6cd4d
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define STUFF_MATRIX_HH #define STUFF_MATRIX_HH
#include <dune/fem/operator/matrix/spmatrix.hh> #include <dune/fem/operator/matrix/spmatrix.hh>
#include <dune/stuff/static_assert.hh>
namespace Dune { namespace Dune {
//! obsolete,dysfunctional Matrixoperator //! obsolete,dysfunctional Matrixoperator
...@@ -56,7 +57,9 @@ class MatrixDiagonal : public FieldVector<typename FieldMatrixType::field_type, ...@@ -56,7 +57,9 @@ class MatrixDiagonal : public FieldVector<typename FieldMatrixType::field_type,
public: public:
MatrixDiagonal(const FieldMatrixType& matrix) MatrixDiagonal(const FieldMatrixType& matrix)
{ {
CompileTimeChecker<FieldMatrixType::rows == FieldMatrixType::cols> matrix_must_be_square; dune_static_assert(FieldMatrixType::rows == FieldMatrixType::cols, "Matrix must be square!");
// CompileTimeChecker< FieldMatrixType::rows == FieldMatrixType::cols > matrix_must_be_square;
for (size_t i = 0; i < FieldMatrixType::rows; i++) for (size_t i = 0; i < FieldMatrixType::rows; i++)
(*this)[i] = matrix[i][i]; (*this)[i] = matrix[i][i];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment