From 2e9dda17d48787a526049fc9ad57031124c4c7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Mon, 1 Jun 2015 12:06:09 +0200 Subject: [PATCH] [cleanup] Use static_assert instead of BOOST_STATIC_ASSERT. --- dune/istl/multitypeblockmatrix.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dune/istl/multitypeblockmatrix.hh b/dune/istl/multitypeblockmatrix.hh index 2aafa4ea0..cf3f5e5cc 100644 --- a/dune/istl/multitypeblockmatrix.hh +++ b/dune/istl/multitypeblockmatrix.hh @@ -236,8 +236,8 @@ namespace Dune { */ template<typename X, typename Y> void mv (const X& x, Y& y) const { - BOOST_STATIC_ASSERT(mpl::size<X>::value == mpl::size<T1>::value); //make sure x's length matches row length - BOOST_STATIC_ASSERT(mpl::size<Y>::value == mpl::size<type>::value); //make sure y's length matches row count + static_assert(mpl::size<X>::value == mpl::size<T1>::value, "length of x does not match row length"); + static_assert(mpl::size<Y>::value == mpl::size<type>::value, "length of y does not match row count"); y = 0; //reset y (for mv uses umv) MultiTypeBlockMatrix_VectMul<0,mpl::size<type>::value,0,mpl::size<T1>::value,Y,type,X>::umv(y, *this, x); //iterate over all matrix elements @@ -248,8 +248,8 @@ namespace Dune { */ template<typename X, typename Y> void umv (const X& x, Y& y) const { - BOOST_STATIC_ASSERT(mpl::size<X>::value == mpl::size<T1>::value); //make sure x's length matches row length - BOOST_STATIC_ASSERT(mpl::size<Y>::value == mpl::size<type>::value); //make sure y's length matches row count + static_assert(mpl::size<X>::value == mpl::size<T1>::value, "length of x does not match row length"); + static_assert(mpl::size<Y>::value == mpl::size<type>::value, "length of y does not match row count"); MultiTypeBlockMatrix_VectMul<0,mpl::size<type>::value,0,mpl::size<T1>::value,Y,type,X>::umv(y, *this, x); //iterate over all matrix elements } @@ -259,8 +259,8 @@ namespace Dune { */ template<typename X, typename Y> void mmv (const X& x, Y& y) const { - BOOST_STATIC_ASSERT(mpl::size<X>::value == mpl::size<T1>::value); //make sure x's length matches row length - BOOST_STATIC_ASSERT(mpl::size<Y>::value == mpl::size<type>::value); //make sure y's length matches row count + static_assert(mpl::size<X>::value == mpl::size<T1>::value, "length of x does not match row length"); + static_assert(mpl::size<Y>::value == mpl::size<type>::value, "length of y does not match row count"); MultiTypeBlockMatrix_VectMul<0,mpl::size<type>::value,0,mpl::size<T1>::value,Y,type,X>::mmv(y, *this, x); //iterate over all matrix elements } @@ -268,8 +268,8 @@ namespace Dune { //! y += alpha A x template<typename AlphaType, typename X, typename Y> void usmv (const AlphaType& alpha, const X& x, Y& y) const { - BOOST_STATIC_ASSERT(mpl::size<X>::value == mpl::size<T1>::value); //make sure x's length matches row length - BOOST_STATIC_ASSERT(mpl::size<Y>::value == mpl::size<type>::value); //make sure y's length matches row count + static_assert(mpl::size<X>::value == mpl::size<T1>::value, "length of x does not match row length"); + static_assert(mpl::size<Y>::value == mpl::size<type>::value, "length of y does not match row count"); MultiTypeBlockMatrix_VectMul<0,mpl::size<type>::value,0,mpl::size<T1>::value,Y,type,X>::usmv(alpha,y, *this, x); //iterate over all matrix elements -- GitLab