From 8c095fed5b55a183c4c474c13144c31bde8dfd9f Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Wed, 20 Dec 2023 15:55:15 +0100 Subject: [PATCH] Remove use of boost.static_assert --- CMakeLists.txt | 1 - examples/my_vector.cpp | 2 +- .../numeric/odeint/algebra/detail/macros.hpp | 7 ----- .../numeric/odeint/algebra/fusion_algebra.hpp | 26 +++++++++---------- .../odeint/stepper/adams_bashforth.hpp | 3 +-- .../stepper/adams_bashforth_moulton.hpp | 3 +-- .../odeint/stepper/extrapolation_stepper.hpp | 2 +- test/algebra_dispatcher.cpp | 12 ++++----- test/generation.cpp | 2 +- test/is_pair.cpp | 12 ++++----- test/std_array.cpp | 9 +++---- test/symplectic_steppers.cpp | 24 ++++++++--------- test_external/eigen/is_resizeable.cpp | 4 +-- test_external/nt2/is_resizeable.cpp | 2 +- 14 files changed, 49 insertions(+), 60 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d04c7d90..1c9440a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,6 @@ target_link_libraries(boost_numeric_odeint Boost::numeric_ublas Boost::preprocessor Boost::range - Boost::static_assert Boost::throw_exception Boost::type_traits Boost::units diff --git a/examples/my_vector.cpp b/examples/my_vector.cpp index 746dfaad..4d862227 100644 --- a/examples/my_vector.cpp +++ b/examples/my_vector.cpp @@ -104,7 +104,7 @@ int main() x[0] = 5.0 ; x[1] = 10.0 ; x[2] = 10.0; // make sure resizing is ON - BOOST_STATIC_ASSERT( is_resizeable::value == true ); + static_assert( is_resizeable::value == true, "Resizing must be on" ); // my_vector works with range_algebra as it implements // the required parts of a container interface diff --git a/include/boost/numeric/odeint/algebra/detail/macros.hpp b/include/boost/numeric/odeint/algebra/detail/macros.hpp index 12c4d21d..9badf223 100644 --- a/include/boost/numeric/odeint/algebra/detail/macros.hpp +++ b/include/boost/numeric/odeint/algebra/detail/macros.hpp @@ -32,11 +32,4 @@ #endif // __CUDACC__ - - -/* -#define BOOST_ODEINT_CHECK_OPERATION_ARITY( Operation , Arity ) \ - BOOST_STATIC_ASSERT(( boost::function_traits< Operation >::arity == Arity )) - */ - #endif // BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_MACROS_HPP_INCLUDED diff --git a/include/boost/numeric/odeint/algebra/fusion_algebra.hpp b/include/boost/numeric/odeint/algebra/fusion_algebra.hpp index 0055e5d4..69f4a39b 100644 --- a/include/boost/numeric/odeint/algebra/fusion_algebra.hpp +++ b/include/boost/numeric/odeint/algebra/fusion_algebra.hpp @@ -122,7 +122,7 @@ struct fusion_algebra template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class Op > static void for_each8( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , Op op ) { - BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 8 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); + static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 8 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& > Sequences; Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 ); boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) ); @@ -131,7 +131,7 @@ struct fusion_algebra template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class Op > static void for_each9( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , Op op ) { - BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 9 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); + static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 9 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& > Sequences; Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 ); boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) ); @@ -140,7 +140,7 @@ struct fusion_algebra template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class Op > static void for_each10( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , Op op ) { - BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 10 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); + static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 10 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& > Sequences; Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 ); boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) ); @@ -149,8 +149,8 @@ struct fusion_algebra template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class Op > static void for_each11( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , Op op ) { - BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 11 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); - BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 11 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); + static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 11 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); + static_assert( BOOST_RESULT_OF_NUM_ARGS >= 11 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& > Sequences; Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 ); boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) ); @@ -159,8 +159,8 @@ struct fusion_algebra template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class S12 , class Op > static void for_each12( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , S12 &s12 , Op op ) { - BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 12 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); - BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 12 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); + static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 12 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); + static_assert( BOOST_RESULT_OF_NUM_ARGS >= 12 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& , S12& > Sequences; Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 , s12 ); boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) ); @@ -169,8 +169,8 @@ struct fusion_algebra template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class S12 , class S13 , class Op > static void for_each13( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , S12 &s12 , S13 &s13 , Op op ) { - BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 13 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); - BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 13 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); + static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 13 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); + static_assert( BOOST_RESULT_OF_NUM_ARGS >= 13 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& , S12& , S13& > Sequences; Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 , s12 , s13 ); boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) ); @@ -179,8 +179,8 @@ struct fusion_algebra template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class S12 , class S13 , class S14 , class Op > static void for_each14( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , S12 &s12 , S13 &s13 , S14 &s14 , Op op ) { - BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 14 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); - BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 14 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); + static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 14 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); + static_assert( BOOST_RESULT_OF_NUM_ARGS >= 14 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& , S12& , S13& , S14& > Sequences; Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 , s12 , s13 , s14 ); boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) ); @@ -189,8 +189,8 @@ struct fusion_algebra template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class S12 , class S13 , class S14 , class S15 , class Op > static void for_each15( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , S12 &s12 , S13 &s13 , S14 &s14 , S15 &s15 , Op op ) { - BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 15 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); - BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 15 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); + static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 15 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" ); + static_assert( BOOST_RESULT_OF_NUM_ARGS >= 15 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" ); typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& , S12& , S13& , S14& , S15& > Sequences; Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 , s12 , s13 , s14 , s15 ); boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) ); diff --git a/include/boost/numeric/odeint/stepper/adams_bashforth.hpp b/include/boost/numeric/odeint/stepper/adams_bashforth.hpp index 5ff1e835..6190dc75 100644 --- a/include/boost/numeric/odeint/stepper/adams_bashforth.hpp +++ b/include/boost/numeric/odeint/stepper/adams_bashforth.hpp @@ -85,8 +85,7 @@ class adams_bashforth : public algebra_stepper_base< Algebra , Operations > { #ifndef DOXYGEN_SKIP - BOOST_STATIC_ASSERT(( Steps > 0 )); - BOOST_STATIC_ASSERT(( Steps < 9 )); + static_assert(( Steps > 0 && Steps < 9 ), "Must have between 1 and 8 steps inclusive"); #endif public : diff --git a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp index f3edce19..d3d89aec 100644 --- a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp +++ b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp @@ -56,8 +56,7 @@ class adams_bashforth_moulton { #ifndef DOXYGEN_SKIP - BOOST_STATIC_ASSERT(( Steps > 0 )); - BOOST_STATIC_ASSERT(( Steps < 9 )); + static_assert(( Steps > 0 && Steps < 9 ), "Must have between 1 and 8 steps inclusive"); #endif public : diff --git a/include/boost/numeric/odeint/stepper/extrapolation_stepper.hpp b/include/boost/numeric/odeint/stepper/extrapolation_stepper.hpp index 3b688e95..e78d38d0 100644 --- a/include/boost/numeric/odeint/stepper/extrapolation_stepper.hpp +++ b/include/boost/numeric/odeint/stepper/extrapolation_stepper.hpp @@ -67,7 +67,7 @@ class extrapolation_stepper : public explicit_error_stepper_base private: // check for Order being odd - BOOST_STATIC_ASSERT_MSG( + static_assert( ( ( Order % 2 ) == 0 ) && ( Order > 2 ), "extrapolation_stepper requires even Order larger than 2" ); diff --git a/test/algebra_dispatcher.cpp b/test/algebra_dispatcher.cpp index 428faa8d..12a676db 100644 --- a/test/algebra_dispatcher.cpp +++ b/test/algebra_dispatcher.cpp @@ -43,38 +43,38 @@ BOOST_AUTO_TEST_SUITE( algebra_dispatcher_test ) BOOST_AUTO_TEST_CASE( range_algebra_with_vector ) { typedef runge_kutta4< std::vector< double > > stepper_type; - BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , range_algebra >::value )); + static_assert(( boost::is_same< stepper_type::algebra_type , range_algebra >::value ), "Not range algebra"); } BOOST_AUTO_TEST_CASE( array_algebra_with_array ) { typedef runge_kutta4< std::array< double , 2 > > stepper_type; - BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , array_algebra >::value )); + static_assert(( boost::is_same< stepper_type::algebra_type , array_algebra >::value ), "Not array algebra"); } BOOST_AUTO_TEST_CASE( range_algebra_with_array ) { typedef runge_kutta4< std::array< double , 2 > , double , std::array< double , 2 > , double , range_algebra > stepper_type; - BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , range_algebra >::value )); + static_assert(( boost::is_same< stepper_type::algebra_type , range_algebra >::value ), "Not range algebra"); } BOOST_AUTO_TEST_CASE( fusion_algebra_with_fusion_vector ) { typedef runge_kutta4< boost::fusion::vector< double > > stepper_type; - BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , fusion_algebra >::value )); + static_assert(( boost::is_same< stepper_type::algebra_type , fusion_algebra >::value ), "Not fusion algebra"); } BOOST_AUTO_TEST_CASE( fusion_algebra_with_fusion_vector2 ) { typedef runge_kutta_fehlberg78< boost::fusion::vector< double > > stepper_type; - BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , fusion_algebra >::value )); + static_assert(( boost::is_same< stepper_type::algebra_type , fusion_algebra >::value ), "Not fusion algebra"); } typedef boost::mpl::list< float , double , long double , std::complex< double > , std::complex< float > > fp_types; BOOST_AUTO_TEST_CASE_TEMPLATE( vector_space_algebra_with_floating_point , T , fp_types ) { typedef runge_kutta_fehlberg78< T > stepper_type; - BOOST_STATIC_ASSERT(( boost::is_same< typename stepper_type::algebra_type , vector_space_algebra >::value )); + static_assert(( boost::is_same< typename stepper_type::algebra_type , vector_space_algebra >::value ), "Not vector space algebra"); } diff --git a/test/generation.cpp b/test/generation.cpp index 6432692d..faf00d48 100644 --- a/test/generation.cpp +++ b/test/generation.cpp @@ -31,7 +31,7 @@ using namespace boost::numeric::odeint; template< class Stepper1 , class Stepper2 > void check_stepper_type( const Stepper1 &s1 , const Stepper2 &s2 ) { - BOOST_STATIC_ASSERT(( boost::is_same< Stepper1 , Stepper2 >::value )); + static_assert(( boost::is_same< Stepper1 , Stepper2 >::value ), "Stepper1 and Stepper2 must be the same type"); } BOOST_AUTO_TEST_SUITE( generation_test ) diff --git a/test/is_pair.cpp b/test/is_pair.cpp index bf3bc35b..07c913c0 100644 --- a/test/is_pair.cpp +++ b/test/is_pair.cpp @@ -38,12 +38,12 @@ BOOST_AUTO_TEST_CASE( test_is_pair ) typedef std::pair< const int , int > type5; typedef std::pair< const int& , int > type6; - BOOST_STATIC_ASSERT(( is_pair< type1 >::value )); - BOOST_STATIC_ASSERT(( is_pair< type2 >::value )); - BOOST_STATIC_ASSERT(( is_pair< type3 >::value )); - BOOST_STATIC_ASSERT(( is_pair< type4 >::value )); - BOOST_STATIC_ASSERT(( is_pair< type5 >::value )); - BOOST_STATIC_ASSERT(( is_pair< type6 >::value )); + static_assert(( is_pair< type1 >::value ), "Not a pair"); + static_assert(( is_pair< type2 >::value ), "Not a pair"); + static_assert(( is_pair< type3 >::value ), "Not a pair"); + static_assert(( is_pair< type4 >::value ), "Not a pair"); + static_assert(( is_pair< type5 >::value ), "Not a pair"); + static_assert(( is_pair< type6 >::value ), "Not a pair"); } BOOST_AUTO_TEST_SUITE_END() diff --git a/test/std_array.cpp b/test/std_array.cpp index 350a387a..1ad17117 100644 --- a/test/std_array.cpp +++ b/test/std_array.cpp @@ -38,11 +38,10 @@ BOOST_AUTO_TEST_CASE( test_case ) state_type x = {0.0, 0.0, 0.0}; typedef boost::numeric::odeint::runge_kutta4 stepper_type; -// check if array algebra is selected, but only if odeint detects c++11 -#ifdef BOOST_NUMERIC_ODEINT_CXX11 - BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , - boost::numeric::odeint::array_algebra >::value )); -#endif + + static_assert(( boost::is_same< stepper_type::algebra_type , + boost::numeric::odeint::array_algebra >::value ), "Not array algebra"); + stepper_type stepper1; stepper1.do_step(rhs, x, 0.0, 0.1); diff --git a/test/symplectic_steppers.cpp b/test/symplectic_steppers.cpp index 265c8528..5f4b8f99 100644 --- a/test/symplectic_steppers.cpp +++ b/test/symplectic_steppers.cpp @@ -128,33 +128,33 @@ BOOST_AUTO_TEST_SUITE( symplectic_steppers_test ) BOOST_AUTO_TEST_CASE_TEMPLATE( test_assoc_types , Stepper , vector_steppers< initially_resizer > ) { - BOOST_STATIC_ASSERT_MSG( + static_assert( ( boost::is_same< typename Stepper::coor_type , diagnostic_state_type >::value ) , "Coordinate type" ); - BOOST_STATIC_ASSERT_MSG( + static_assert( ( boost::is_same< typename Stepper::momentum_type , diagnostic_state_type2 >::value ) , "Momentum type" ); - BOOST_STATIC_ASSERT_MSG( + static_assert( ( boost::is_same< typename Stepper::coor_deriv_type , diagnostic_deriv_type >::value ) , "Coordinate deriv type" ); - BOOST_STATIC_ASSERT_MSG( + static_assert( ( boost::is_same< typename Stepper::momentum_deriv_type , diagnostic_deriv_type2 >::value ) , "Momentum deriv type" ); - BOOST_STATIC_ASSERT_MSG( + static_assert( ( boost::is_same< typename Stepper::state_type , std::pair< diagnostic_state_type , diagnostic_state_type2 > >::value ) , "State type" ); - BOOST_STATIC_ASSERT_MSG( + static_assert( ( boost::is_same< typename Stepper::deriv_type , std::pair< diagnostic_deriv_type , diagnostic_deriv_type2 > >::value ) , "Deriv type" ); - BOOST_STATIC_ASSERT_MSG( ( boost::is_same< typename Stepper::value_type , double >::value ) , "Value type" ); - BOOST_STATIC_ASSERT_MSG( ( boost::is_same< typename Stepper::time_type , double >::value ) , "Time type" ); - BOOST_STATIC_ASSERT_MSG( ( boost::is_same< typename Stepper::algebra_type , custom_range_algebra >::value ) , "Algebra type" ); - BOOST_STATIC_ASSERT_MSG( ( boost::is_same< typename Stepper::operations_type , custom_default_operations >::value ) , "Operations type" ); + static_assert( ( boost::is_same< typename Stepper::value_type , double >::value ) , "Value type" ); + static_assert( ( boost::is_same< typename Stepper::time_type , double >::value ) , "Time type" ); + static_assert( ( boost::is_same< typename Stepper::algebra_type , custom_range_algebra >::value ) , "Algebra type" ); + static_assert( ( boost::is_same< typename Stepper::operations_type , custom_default_operations >::value ) , "Operations type" ); - BOOST_STATIC_ASSERT_MSG( ( boost::is_same< typename Stepper::resizer_type , initially_resizer >::value ) , "Resizer type" ); - BOOST_STATIC_ASSERT_MSG( ( boost::is_same< typename Stepper::stepper_category , stepper_tag >::value ) , "Stepper category" ); + static_assert( ( boost::is_same< typename Stepper::resizer_type , initially_resizer >::value ) , "Resizer type" ); + static_assert( ( boost::is_same< typename Stepper::stepper_category , stepper_tag >::value ) , "Stepper category" ); } diff --git a/test_external/eigen/is_resizeable.cpp b/test_external/eigen/is_resizeable.cpp index 5f29ee53..3640e25f 100644 --- a/test_external/eigen/is_resizeable.cpp +++ b/test_external/eigen/is_resizeable.cpp @@ -34,13 +34,13 @@ BOOST_AUTO_TEST_SUITE( is_resizeable ) BOOST_AUTO_TEST_CASE( test_compile_time_matrix ) { typedef Eigen::Matrix< double , 1 , 1 > matrix_type; - BOOST_STATIC_ASSERT(( boost::numeric::odeint::is_resizeable< matrix_type >::value )); + static_assert(( boost::numeric::odeint::is_resizeable< matrix_type >::value ), "Matrix is not resizeable"); } BOOST_AUTO_TEST_CASE( test_compile_time_array ) { typedef Eigen::Array< double , 1 , 1 > array_type; - BOOST_STATIC_ASSERT(( boost::numeric::odeint::is_resizeable< array_type >::value )); + static_assert(( boost::numeric::odeint::is_resizeable< array_type >::value ), "Array is not resizeable"); } diff --git a/test_external/nt2/is_resizeable.cpp b/test_external/nt2/is_resizeable.cpp index 10ecdbb5..638f3332 100644 --- a/test_external/nt2/is_resizeable.cpp +++ b/test_external/nt2/is_resizeable.cpp @@ -30,7 +30,7 @@ BOOST_AUTO_TEST_SUITE( nt2_is_resizeable ) BOOST_AUTO_TEST_CASE_TEMPLATE( is_resizeable, T, fp_types ) { - BOOST_STATIC_ASSERT(( boost::numeric::odeint::is_resizeable< nt2::table >::value )); + static_assert(( boost::numeric::odeint::is_resizeable< nt2::table >::value ), "Table is not resizeable"); } BOOST_AUTO_TEST_SUITE_END()