From adaf19cf32db84c297122798d5e37d1c22dac301 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 11:15:13 +0100 Subject: [PATCH 01/35] Surpress reorder-ctor --- .../numeric/odeint/stepper/bulirsch_stoer.hpp | 19 ++++++++++++++++++ .../stepper/bulirsch_stoer_dense_out.hpp | 20 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp b/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp index 02c37492b..286f636f9 100644 --- a/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp +++ b/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp @@ -88,6 +88,18 @@ class bulirsch_stoer { #endif //DOXYGEN_SKIP const static size_t m_k_max = 8; +// Claims m_error_checker will be init after m_max_dt +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreorder-ctor" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wreorder-ctor" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5038) +#endif + bulirsch_stoer( value_type eps_abs = 1E-6 , value_type eps_rel = 1E-6 , value_type factor_x = 1.0 , value_type factor_dxdt = 1.0 , @@ -123,6 +135,13 @@ class bulirsch_stoer { reset(); } +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif /* * Version 1 : try_step( sys , x , t , dt ) diff --git a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp index 22eb373bb..a856e331f 100644 --- a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp +++ b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp @@ -95,6 +95,17 @@ class bulirsch_stoer_dense_out { const static size_t m_k_max = 8; +// Claims m_error_checker will be init after m_max_dt +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreorder-ctor" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wreorder-ctor" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5038) +#endif bulirsch_stoer_dense_out( value_type eps_abs = 1E-6 , value_type eps_rel = 1E-6 , @@ -155,6 +166,15 @@ class bulirsch_stoer_dense_out { } } +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif + + template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut > controlled_step_result try_step( System system , const StateIn &in , const DerivIn &dxdt , time_type &t , StateOut &out , DerivOut &dxdt_new , time_type &dt ) { From 175a5ce059a379a0c604ba2b0b9e6561db8216ff Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 11:15:29 +0100 Subject: [PATCH 02/35] Enable testing for -Wextra -Werror --- test/Jamfile.v2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 33caa4c58..85fc31de2 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -27,6 +27,10 @@ project static clang:-Wno-unused-variable # -D_SCL_SECURE_NO_WARNINGS + extra + msvc:on + clang:on + gcc:on [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ; From 09b0c612576f6157de71a6c4d41e5c74fbba3b65 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 11:15:52 +0100 Subject: [PATCH 03/35] Ignore warning propagating from boost.uBlas --- .../stepper/adams_bashforth_moulton.hpp | 19 +++++++++++++++++- .../numeric/odeint/stepper/rosenbrock4.hpp | 20 +++++++++++++++++++ .../numeric/odeint/util/ublas_wrapper.hpp | 18 +++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp index f3edce198..7acb68e19 100644 --- a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp +++ b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp @@ -19,6 +19,17 @@ #ifndef BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED #define BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED +// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif #include @@ -309,6 +320,12 @@ public : } // numeric } // boost - +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif #endif // BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED diff --git a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp index 86136989d..c3cbccad6 100644 --- a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp +++ b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp @@ -20,6 +20,17 @@ #ifndef BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED #define BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED +// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif #include #include @@ -343,4 +354,13 @@ class rosenbrock4 } // namespace numeric } // namespace boost +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif + + #endif // BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED diff --git a/include/boost/numeric/odeint/util/ublas_wrapper.hpp b/include/boost/numeric/odeint/util/ublas_wrapper.hpp index c8facfc46..4da36191d 100644 --- a/include/boost/numeric/odeint/util/ublas_wrapper.hpp +++ b/include/boost/numeric/odeint/util/ublas_wrapper.hpp @@ -18,6 +18,17 @@ #ifndef BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED #define BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED +// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif #include #include @@ -293,5 +304,12 @@ struct state_wrapper< boost::numeric::ublas::permutation_matrix< T , A > > // wi } } } +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif #endif // BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED From 3dd53fea793ef51b213528d7e7b5ac52a98465bd Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 11:16:05 +0100 Subject: [PATCH 04/35] Fix unused parameter warning --- .../generation_controlled_adams_bashforth_moulton.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/odeint/stepper/generation/generation_controlled_adams_bashforth_moulton.hpp b/include/boost/numeric/odeint/stepper/generation/generation_controlled_adams_bashforth_moulton.hpp index ca95a1f55..e4eafc679 100644 --- a/include/boost/numeric/odeint/stepper/generation/generation_controlled_adams_bashforth_moulton.hpp +++ b/include/boost/numeric/odeint/stepper/generation/generation_controlled_adams_bashforth_moulton.hpp @@ -40,13 +40,13 @@ struct controller_factory< Stepper , controlled_adams_bashforth_moulton< Stepper typedef typename stepper_type::value_type value_type; typedef typename stepper_type::value_type time_type; - controller_type operator()( value_type abs_error , value_type rel_error , const stepper_type &stepper ) + controller_type operator()( value_type abs_error , value_type rel_error , const stepper_type &/*stepper*/ ) { return controller_type(step_adjuster_type(abs_error, rel_error)); } controller_type operator()( value_type abs_error , value_type rel_error , - time_type max_dt, const stepper_type &stepper ) + time_type max_dt, const stepper_type &/*stepper*/ ) { return controller_type( step_adjuster_type(abs_error, rel_error, max_dt)); } From 291acb4ca040ebe55f4cbe20e3584b44b596ffde Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 11:16:19 +0100 Subject: [PATCH 05/35] Various warning fixes --- test/adams_bashforth.cpp | 2 +- test/adams_bashforth_moulton.cpp | 2 +- test/adams_moulton.cpp | 2 +- test/bulirsch_stoer.cpp | 6 +++--- test/controlled_adams_bashforth_moulton.cpp | 2 +- test/default_operations.cpp | 2 +- test/dummy_odes.hpp | 20 +++++++++--------- test/euler_stepper.cpp | 2 +- test/generic_error_stepper.cpp | 5 +---- test/generic_stepper.cpp | 5 +---- test/implicit_euler.cpp | 4 ++-- test/integrate.cpp | 2 +- test/integrate_implicit.cpp | 6 +++--- test/integrate_times.cpp | 2 +- test/is_resizeable.cpp | 23 +++++++++++++++++++-- test/range_algebra.cpp | 2 +- test/resize.cpp | 1 - test/resizing.cpp | 5 +++-- test/resizing_test_state_type.hpp | 4 ++-- test/rosenbrock4.cpp | 18 ++++------------ test/rosenbrock4_mp.cpp | 14 +++---------- test/runge_kutta_controlled_concepts.cpp | 3 ++- test/stepper_copying.cpp | 4 ++-- test/stepper_with_ranges.cpp | 12 +++++------ 24 files changed, 72 insertions(+), 76 deletions(-) diff --git a/test/adams_bashforth.cpp b/test/adams_bashforth.cpp index 7574346c2..43a33dfaf 100644 --- a/test/adams_bashforth.cpp +++ b/test/adams_bashforth.cpp @@ -46,7 +46,7 @@ typedef double value_type; struct lorenz { template< class State , class Deriv , class Value > - void operator()( const State &_x , Deriv &_dxdt , const Value &dt ) const + void operator()( const State &_x , Deriv &_dxdt , const Value &/*dt*/ ) const { const value_type sigma = 10.0; const value_type R = 28.0; diff --git a/test/adams_bashforth_moulton.cpp b/test/adams_bashforth_moulton.cpp index 8e7688bb4..21f7acc5e 100644 --- a/test/adams_bashforth_moulton.cpp +++ b/test/adams_bashforth_moulton.cpp @@ -34,7 +34,7 @@ typedef double value_type; struct lorenz { template< class State , class Deriv , class Value > - void operator()( const State &_x , Deriv &_dxdt , const Value &dt ) const + void operator()( const State &_x , Deriv &_dxdt , const Value &/*dt*/ ) const { const value_type sigma = 10.0; const value_type R = 28.0; diff --git a/test/adams_moulton.cpp b/test/adams_moulton.cpp index faccdda5b..05e65fbf4 100644 --- a/test/adams_moulton.cpp +++ b/test/adams_moulton.cpp @@ -40,7 +40,7 @@ typedef double value_type; struct lorenz { template< class State , class Deriv , class Value > - void operator()( const State &_x , Deriv &_dxdt , const Value &dt ) const + void operator()( const State &_x , Deriv &_dxdt , const Value &/*dt*/ ) const { const value_type sigma = 10.0; const value_type R = 28.0; diff --git a/test/bulirsch_stoer.cpp b/test/bulirsch_stoer.cpp index 2c6a0c95a..0fbd7ba4d 100644 --- a/test/bulirsch_stoer.cpp +++ b/test/bulirsch_stoer.cpp @@ -48,7 +48,7 @@ const double b = 8.0 / 3.0; struct lorenz { template< class State , class Deriv > - void operator()( const State &x , Deriv &dxdt , double t ) const + void operator()( const State &x , Deriv &dxdt , double /*t*/ ) const { dxdt[0] = sigma * ( x[1] - x[0] ); dxdt[1] = R * x[0] - x[1] - x[0] * x[2]; @@ -59,7 +59,7 @@ struct lorenz struct const_system { template< class State , class Deriv > - void operator()( const State &x , Deriv &dxdt , double t ) const + void operator()( const State &/*x*/ , Deriv &dxdt , double /*t*/ ) const { dxdt[0] = 1.0; dxdt[1] = 1.0; @@ -70,7 +70,7 @@ struct const_system struct sin_system { template< class State , class Deriv > - void operator()( const State &x , Deriv &dxdt , double t ) const + void operator()( const State &x , Deriv &dxdt , double /*t*/ ) const { dxdt[0] = sin( x[0] ); dxdt[1] = cos( x[1] ); diff --git a/test/controlled_adams_bashforth_moulton.cpp b/test/controlled_adams_bashforth_moulton.cpp index 40d657209..d10c4443f 100644 --- a/test/controlled_adams_bashforth_moulton.cpp +++ b/test/controlled_adams_bashforth_moulton.cpp @@ -16,7 +16,7 @@ using namespace boost::numeric::odeint; struct const_sys { template< class State , class Deriv , class Value > - void operator()( const State &x , Deriv &dxdt , const Value &dt ) const + void operator()( const State &/*x*/ , Deriv &dxdt , const Value &/*dt*/ ) const { dxdt[0] = 1; } diff --git a/test/default_operations.cpp b/test/default_operations.cpp index a2634b7fe..6bf5b4eee 100644 --- a/test/default_operations.cpp +++ b/test/default_operations.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/test/dummy_odes.hpp b/test/dummy_odes.hpp index 7a92363f6..e19efe715 100644 --- a/test/dummy_odes.hpp +++ b/test/dummy_odes.hpp @@ -31,7 +31,7 @@ struct constant_system_functor_standard { template< class State , class Deriv , class Time > - void operator()( const State &x , Deriv &dxdt , const Time t ) const + void operator()( const State &/*x*/ , Deriv &dxdt , const Time /*t*/ ) const { dxdt[0] = 1.0; } @@ -40,7 +40,7 @@ struct constant_system_functor_standard struct constant_system_functor_vector_space { template< class State , class Deriv , class Time > - void operator()( const State &x , Deriv &dxdt , const Time t ) const + void operator()( const State &/*x*/ , Deriv &dxdt , const Time /*t*/ ) const { dxdt = 1.0; } @@ -49,7 +49,7 @@ struct constant_system_functor_vector_space struct constant_system_functor_fusion { template< class State , class Deriv , class Time > - void operator()( const State &x , Deriv &dxdt , const Time t ) const + void operator()( const State &x , Deriv &dxdt , const Time /*t*/ ) const { boost::fusion::at_c< 0 >( dxdt ) = boost::fusion::at_c< 0 >( x ) / Time( 1.0 ); } @@ -58,7 +58,7 @@ struct constant_system_functor_fusion struct lorenz { template< typename State , typename Deriv , typename Time > - void operator()( const State& x , Deriv& dxdt , const Time& t ) const + void operator()( const State& x , Deriv& dxdt , const Time& /*t*/ ) const { const Time sigma = 10.0; const Time R = 28.0; @@ -70,19 +70,19 @@ struct lorenz }; template< class State , class Deriv , class Time > -void constant_system_standard( const State &x , Deriv &dxdt , const Time t ) +void constant_system_standard( const State &/*x*/ , Deriv &dxdt , const Time /*t*/ ) { dxdt[0] = 1.0; } template< class State , class Deriv , class Time > -void constant_system_vector_space( const State &x , Deriv &dxdt , const Time t ) +void constant_system_vector_space( const State &/*x*/ , Deriv &dxdt , const Time /*t*/ ) { dxdt = 1.0; } template< class State , class Deriv , class Time > -void constant_system_fusion( const State &x , Deriv &dxdt , const Time t ) +void constant_system_fusion( const State &x , Deriv &dxdt , const Time /*t*/ ) { boost::fusion::at_c< 0 >( dxdt ) = boost::fusion::at_c< 0 >( x ) / Time( 1.0 ); } @@ -96,7 +96,7 @@ void constant_system_fusion( const State &x , Deriv &dxdt , const Time t ) struct constant_mom_func { template< class StateIn , class StateOut > - void operator()( const StateIn &q , StateOut &dp ) const + void operator()( const StateIn &/*q*/ , StateOut &dp ) const { dp[0] = 1.0; } @@ -116,7 +116,7 @@ struct default_coor_func struct constant_mom_func_vector_space_1d { template< class T > - void operator()( const T &q , T &dp ) const + void operator()( const T &/*q*/ , T &dp ) const { dp = 1.0; } @@ -140,7 +140,7 @@ struct default_coor_func_vector_space_1d struct empty_system { template - void operator()( const State &x , State &dxdt , double t ) const + void operator()( const State &/*x*/ , State &/*dxdt*/ , double /*t*/ ) const { } }; diff --git a/test/euler_stepper.cpp b/test/euler_stepper.cpp index a274de4b2..8b9cad1f0 100644 --- a/test/euler_stepper.cpp +++ b/test/euler_stepper.cpp @@ -68,7 +68,7 @@ typedef my_vec state_type; /* use functors, because functions don't work with msvc 10, I guess this is a bug */ struct sys { - void operator()( const state_type &x , state_type &dxdt , const value_type t ) const + void operator()( const state_type &x , state_type &dxdt , const value_type ) const { std::cout << "sys start " << dxdt.size() << std::endl; dxdt[0] = x[0] + 2 * x[1]; diff --git a/test/generic_error_stepper.cpp b/test/generic_error_stepper.cpp index 0b18da89b..d71295263 100644 --- a/test/generic_error_stepper.cpp +++ b/test/generic_error_stepper.cpp @@ -42,7 +42,7 @@ namespace fusion = boost::fusion; typedef double value_type; typedef boost::array< value_type , 2 > state_type; -void sys( const state_type &x , state_type &dxdt , const value_type &t ) +void sys( const state_type &x , state_type &dxdt , const value_type &/*t*/ ) { dxdt[ 0 ] = x[ 0 ] + 2 * x[ 1 ]; dxdt[ 1 ] = x[ 1 ]; @@ -81,9 +81,6 @@ BOOST_AUTO_TEST_CASE( test_generic_error_stepper ) rk54_ck_type rk54_ck = rk54_ck_; typedef error_rk_generic_type::state_type state_type; - typedef error_rk_generic_type::value_type stepper_value_type; - typedef error_rk_generic_type::deriv_type deriv_type; - typedef error_rk_generic_type::time_type time_type; state_type x = {{ 0.0 , 1.0 }}; state_type y = x; diff --git a/test/generic_stepper.cpp b/test/generic_stepper.cpp index e2c18272f..f1e4731c1 100644 --- a/test/generic_stepper.cpp +++ b/test/generic_stepper.cpp @@ -41,7 +41,7 @@ namespace fusion = boost::fusion; typedef double value_type; typedef boost::array< value_type , 2 > state_type; -void sys( const state_type &x , state_type &dxdt , const value_type &t ) +void sys( const state_type &x , state_type &dxdt , const value_type &/*t*/ ) { dxdt[ 0 ] = x[ 0 ] + 2 * x[ 1 ]; dxdt[ 1 ] = x[ 1 ]; @@ -77,9 +77,6 @@ BOOST_AUTO_TEST_CASE( test_generic_stepper ) rk4_type rk4 = rk4_; typedef rk_generic_type::state_type state_type; - typedef rk_generic_type::value_type stepper_value_type; - typedef rk_generic_type::deriv_type deriv_type; - typedef rk_generic_type::time_type time_type; state_type x = {{ 0.0 , 1.0 }}; state_type y = x; diff --git a/test/implicit_euler.cpp b/test/implicit_euler.cpp index 575c896a8..f088a958d 100644 --- a/test/implicit_euler.cpp +++ b/test/implicit_euler.cpp @@ -44,7 +44,7 @@ typedef boost::numeric::ublas::matrix< value_type > matrix_type; /* use functors, because functions don't work with msvc 10, I guess this is a bug */ struct sys { - void operator()( const state_type &x , state_type &dxdt , const value_type t ) const + void operator()( const state_type &x , state_type &dxdt , const value_type /*t*/ ) const { dxdt( 0 ) = x( 0 ) + 2 * x( 1 ); dxdt( 1 ) = x( 1 ); @@ -53,7 +53,7 @@ struct sys struct jacobi { - void operator()( const state_type &x , matrix_type &jacobi , const value_type t ) const + void operator()( const state_type &/*x*/ , matrix_type &jacobi , const value_type /*t*/ ) const { jacobi( 0 , 0 ) = 1; jacobi( 0 , 1 ) = 2; diff --git a/test/integrate.cpp b/test/integrate.cpp index 07d4617fa..de8024349 100644 --- a/test/integrate.cpp +++ b/test/integrate.cpp @@ -69,7 +69,7 @@ namespace mpl = boost::mpl; typedef double value_type; typedef std::vector< value_type > state_type; -void lorenz( const state_type &x , state_type &dxdt , const value_type t ) +void lorenz( const state_type &x , state_type &dxdt , const value_type /*t*/ ) { //const value_type sigma( 10.0 ); const value_type R( 28.0 ); diff --git a/test/integrate_implicit.cpp b/test/integrate_implicit.cpp index 4bff200ae..dd8814c24 100644 --- a/test/integrate_implicit.cpp +++ b/test/integrate_implicit.cpp @@ -59,7 +59,7 @@ typedef boost::numeric::ublas::matrix< value_type > matrix_type; struct sys { - void operator()( const state_type &x , state_type &dxdt , const value_type &t ) const + void operator()( const state_type &x , state_type &dxdt , const value_type &/*t*/ ) const { dxdt( 0 ) = x( 0 ) + 2 * x( 1 ); dxdt( 1 ) = x( 1 ); @@ -68,7 +68,7 @@ struct sys struct jacobi { - void operator()( const state_type &x , matrix_type &jacobi , const value_type &t , state_type &dfdt ) const + void operator()( const state_type &/*x*/ , matrix_type &jacobi , const value_type &/*t*/ , state_type &dfdt ) const { jacobi( 0 , 0 ) = 1; jacobi( 0 , 1 ) = 2; @@ -86,7 +86,7 @@ struct push_back_time push_back_time( std::vector< double > × ) : m_times( times ) { } - void operator()( const state_type &x , double t ) + void operator()( const state_type &/*x*/ , double t ) { m_times.push_back( t ); } diff --git a/test/integrate_times.cpp b/test/integrate_times.cpp index 2837f09e3..ab6d68b01 100644 --- a/test/integrate_times.cpp +++ b/test/integrate_times.cpp @@ -67,7 +67,7 @@ struct push_back_time push_back_time( std::vector< double > × ) : m_times( times ) { } - void operator()( const state_type &x , double t ) + void operator()( const state_type &/*x*/ , double t ) { m_times.push_back( t ); } diff --git a/test/is_resizeable.cpp b/test/is_resizeable.cpp index cb8e9c1c7..39116038c 100644 --- a/test/is_resizeable.cpp +++ b/test/is_resizeable.cpp @@ -20,6 +20,18 @@ #pragma warning(disable:4996) #endif +// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif + #define BOOST_TEST_MODULE odeint_is_resizeable #include @@ -97,7 +109,6 @@ BOOST_AUTO_TEST_CASE( test_fusion_quantity_sequence ) namespace si = boost::units::si; typedef double value_type; - typedef units::quantity< si::time , value_type > time_type; typedef units::quantity< si::length , value_type > length_type; typedef units::quantity< si::velocity , value_type > velocity_type; typedef boost::fusion::vector< length_type , velocity_type > state_type; @@ -113,4 +124,12 @@ BOOST_AUTO_TEST_CASE( test_my_seq1 ) BOOST_AUTO_TEST_CASE( test_my_seq2 ) { BOOST_CHECK( is_resizeable< my_seq2< double > >::value ); -} \ No newline at end of file +} + +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif diff --git a/test/range_algebra.cpp b/test/range_algebra.cpp index d80e9519d..4d66cc933 100644 --- a/test/range_algebra.cpp +++ b/test/range_algebra.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/test/resize.cpp b/test/resize.cpp index db40f4bfe..96d8ba88d 100644 --- a/test/resize.cpp +++ b/test/resize.cpp @@ -88,7 +88,6 @@ BOOST_AUTO_TEST_CASE( test_fusion_quantity_sequence ) namespace si = boost::units::si; typedef double value_type; - typedef units::quantity< si::time , value_type > time_type; typedef units::quantity< si::length , value_type > length_type; typedef units::quantity< si::velocity , value_type > velocity_type; typedef boost::fusion::vector< length_type , velocity_type > state_type; diff --git a/test/resizing.cpp b/test/resizing.cpp index 751795195..5428749ff 100644 --- a/test/resizing.cpp +++ b/test/resizing.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -48,6 +48,7 @@ using namespace boost::unit_test; using namespace boost::numeric::odeint; +using namespace boost::placeholders; namespace mpl = boost::mpl; @@ -56,7 +57,7 @@ namespace mpl = boost::mpl; -void constant_system( const test_array_type &x , test_array_type &dxdt , double t ) { dxdt[0] = 1.0; } +void constant_system( const test_array_type & , test_array_type &dxdt , double ) { dxdt[0] = 1.0; } BOOST_AUTO_TEST_SUITE( check_resize_test ) diff --git a/test/resizing_test_state_type.hpp b/test/resizing_test_state_type.hpp index af55937ad..749145b77 100644 --- a/test/resizing_test_state_type.hpp +++ b/test/resizing_test_state_type.hpp @@ -46,7 +46,7 @@ namespace odeint { template<> struct same_size_impl< test_array_type , test_array_type > { - static bool same_size( const test_array_type &x1 , const test_array_type &x2 ) + static bool same_size( const test_array_type &/*x1*/ , const test_array_type & /*x2*/ ) { return false; } @@ -55,7 +55,7 @@ namespace odeint { template<> struct resize_impl< test_array_type , test_array_type > { - static void resize( test_array_type &x1 , const test_array_type &x2 ) + static void resize( test_array_type & /*x1*/, const test_array_type & /*x2*/) { adjust_size_count++; } diff --git a/test/rosenbrock4.cpp b/test/rosenbrock4.cpp index 0b7bea4ba..39611f5b5 100644 --- a/test/rosenbrock4.cpp +++ b/test/rosenbrock4.cpp @@ -44,7 +44,7 @@ typedef boost::numeric::ublas::matrix< value_type > matrix_type; struct sys { - void operator()( const state_type &x , state_type &dxdt , const value_type &t ) const + void operator()( const state_type &x , state_type &dxdt , const value_type &/*t*/ ) const { dxdt( 0 ) = x( 0 ) + 2 * x( 1 ); dxdt( 1 ) = x( 1 ); @@ -53,7 +53,7 @@ struct sys struct jacobi { - void operator()( const state_type &x , matrix_type &jacobi , const value_type &t , state_type &dfdt ) const + void operator()( const state_type &/*x*/ , matrix_type &jacobi , const value_type &/*t*/ , state_type &dfdt ) const { jacobi( 0 , 0 ) = 1; jacobi( 0 , 1 ) = 2; @@ -72,9 +72,6 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_stepper ) stepper_type stepper; typedef stepper_type::state_type state_type; - typedef stepper_type::value_type stepper_value_type; - typedef stepper_type::deriv_type deriv_type; - typedef stepper_type::time_type time_type; state_type x( 2 ) , xerr( 2 ); x(0) = 0.0; x(1) = 1.0; @@ -98,9 +95,6 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_controller ) stepper_type stepper; typedef stepper_type::state_type state_type; - typedef stepper_type::value_type stepper_value_type; - typedef stepper_type::deriv_type deriv_type; - typedef stepper_type::time_type time_type; state_type x( 2 ); x( 0 ) = 0.0 ; x(1) = 1.0; @@ -117,9 +111,7 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_dense_output ) stepper_type stepper( c_stepper ); typedef stepper_type::state_type state_type; - typedef stepper_type::value_type stepper_value_type; - typedef stepper_type::deriv_type deriv_type; - typedef stepper_type::time_type time_type; + state_type x( 2 ); x( 0 ) = 0.0 ; x(1) = 1.0; stepper.initialize( x , 0.0 , 0.1 ); @@ -143,9 +135,7 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_dense_output_ref ) stepper_type stepper( boost::ref( c_stepper ) ); typedef stepper_type::state_type state_type; - typedef stepper_type::value_type stepper_value_type; - typedef stepper_type::deriv_type deriv_type; - typedef stepper_type::time_type time_type; + state_type x( 2 ); x( 0 ) = 0.0 ; x(1) = 1.0; stepper.initialize( x , 0.0 , 0.1 ); diff --git a/test/rosenbrock4_mp.cpp b/test/rosenbrock4_mp.cpp index dc295c473..10c0e9370 100644 --- a/test/rosenbrock4_mp.cpp +++ b/test/rosenbrock4_mp.cpp @@ -45,7 +45,7 @@ typedef boost::numeric::ublas::matrix< value_type > matrix_type; struct sys { - void operator()( const state_type &x , state_type &dxdt , const value_type &t ) const + void operator()( const state_type &x , state_type &dxdt , const value_type &/*t*/ ) const { dxdt( 0 ) = x( 0 ) + 2 * x( 1 ); dxdt( 1 ) = x( 1 ); @@ -54,7 +54,7 @@ struct sys struct jacobi { - void operator()( const state_type &x , matrix_type &jacobi , const value_type &t , state_type &dfdt ) const + void operator()( const state_type &/*x*/ , matrix_type &jacobi , const value_type &/*t*/ , state_type &dfdt ) const { jacobi( 0 , 0 ) = 1; jacobi( 0 , 1 ) = 2; @@ -73,9 +73,6 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_stepper ) stepper_type stepper; typedef stepper_type::state_type state_type; - typedef stepper_type::value_type stepper_value_type; - typedef stepper_type::deriv_type deriv_type; - typedef stepper_type::time_type time_type; state_type x( 2 ) , xerr( 2 ); x(0) = 0.0; x(1) = 1.0; @@ -101,9 +98,6 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_controller ) stepper_type stepper; typedef stepper_type::state_type state_type; - typedef stepper_type::value_type stepper_value_type; - typedef stepper_type::deriv_type deriv_type; - typedef stepper_type::time_type time_type; state_type x( 2 ); x( 0 ) = 0.0 ; x(1) = 1.0; @@ -120,9 +114,7 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_dense_output ) stepper_type stepper( c_stepper ); typedef stepper_type::state_type state_type; - typedef stepper_type::value_type stepper_value_type; - typedef stepper_type::deriv_type deriv_type; - typedef stepper_type::time_type time_type; + state_type x( 2 ); x( 0 ) = 0.0 ; x(1) = 1.0; stepper.initialize( x , 0.0 , 0.1 ); diff --git a/test/runge_kutta_controlled_concepts.cpp b/test/runge_kutta_controlled_concepts.cpp index 7f70cc533..03ad59ac8 100644 --- a/test/runge_kutta_controlled_concepts.cpp +++ b/test/runge_kutta_controlled_concepts.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include @@ -60,6 +60,7 @@ using std::vector; using namespace boost::unit_test; using namespace boost::numeric::odeint; +using namespace boost::placeholders; namespace mpl = boost::mpl; const double result = 2.2; // two steps diff --git a/test/stepper_copying.cpp b/test/stepper_copying.cpp index c29e4de19..25752d921 100644 --- a/test/stepper_copying.cpp +++ b/test/stepper_copying.cpp @@ -148,7 +148,7 @@ namespace boost { namespace numeric { namespace odeint { copy_count++; } - state_wrapper_type& operator=( const state_wrapper_type &x ) + state_wrapper_type& operator=( const state_wrapper_type & /*x*/ ) { copy_count++; return *this; @@ -187,7 +187,7 @@ namespace boost { namespace numeric { namespace odeint { copy2_count++; } - state_wrapper_type& operator=( const state_wrapper_type &x ) + state_wrapper_type& operator=( const state_wrapper_type & /*x*/ ) { copy2_count++; return *this; diff --git a/test/stepper_with_ranges.cpp b/test/stepper_with_ranges.cpp index 59f007f2d..3a5a330b9 100644 --- a/test/stepper_with_ranges.cpp +++ b/test/stepper_with_ranges.cpp @@ -61,7 +61,7 @@ struct algebra_dispatcher< state_type2 > struct system1 { template< class State , class Deriv > - void operator()( const State &x_ , Deriv &dxdt_ , double t ) + void operator()( const State &x_ , Deriv &dxdt_ , double /*t*/ ) { typename boost::range_iterator< const State >::type x = boost::begin( x_ ); typename boost::range_iterator< Deriv >::type dxdt = boost::begin( dxdt_ ); @@ -72,7 +72,7 @@ struct system1 } template< class State , class Deriv > - void operator()( const State &x_ , const Deriv &dxdt_ , double t ) + void operator()( const State &x_ , const Deriv &dxdt_ , double /*t*/ ) { typename boost::range_iterator< const State >::type x = boost::begin( x_ ); typename boost::range_iterator< Deriv >::type dxdt = boost::begin( dxdt_ ); @@ -89,7 +89,7 @@ struct system1 struct system2 { template< class State , class Deriv > - void operator()( const State &x_ , Deriv &dxdt_ , double t ) + void operator()( const State &/*x_*/ , Deriv &dxdt_ , double /*t*/ ) { typename boost::range_iterator< Deriv >::type dxdt = boost::begin( dxdt_ ); @@ -99,7 +99,7 @@ struct system2 } template< class State , class Deriv > - void operator()( const State &x_ , const Deriv &dxdt_ , double t ) + void operator()( const State &/*x_*/ , const Deriv &dxdt_ , double /*t*/ ) { typename boost::range_iterator< Deriv >::type dxdt = boost::begin( dxdt_ ); @@ -116,7 +116,7 @@ struct system2 struct ham_sys { template< class State , class Deriv > - void operator()( const State &x_ , Deriv &dxdt_ ) + void operator()( const State &/*x_*/ , Deriv &dxdt_ ) { typename boost::range_iterator< Deriv >::type dxdt = boost::begin( dxdt_ ); dxdt[0] = 1.0; @@ -125,7 +125,7 @@ struct ham_sys } template< class State , class Deriv > - void operator()( const State &x_ , const Deriv &dxdt_ ) + void operator()( const State &/*x_*/ , const Deriv &dxdt_ ) { typename boost::range_iterator< Deriv >::type dxdt = boost::begin( dxdt_ ); dxdt[0] = 1.0; From 414698a567757a899606662eb90f25b34391abda Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 11:58:58 +0100 Subject: [PATCH 06/35] Ignore boost.ublas deprecated copy message --- .../odeint/algebra/multi_array_algebra.hpp | 17 +++++++++++++++++ .../odeint/stepper/adams_bashforth_moulton.hpp | 2 +- .../numeric/odeint/stepper/bulirsch_stoer.hpp | 2 +- .../odeint/stepper/bulirsch_stoer_dense_out.hpp | 2 +- .../numeric/odeint/stepper/rosenbrock4.hpp | 2 +- .../boost/numeric/odeint/util/ublas_wrapper.hpp | 2 +- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp index f0ae30e4f..93e581cb0 100644 --- a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp +++ b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp @@ -18,6 +18,16 @@ #ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED #define BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif #include @@ -142,5 +152,12 @@ struct algebra_dispatcher< boost::multi_array< T , N > > } // namespace numeric } // namespace boost +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif #endif // BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED diff --git a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp index 7acb68e19..077a3c483 100644 --- a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp +++ b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp @@ -25,7 +25,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__GNUC__) #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) diff --git a/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp b/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp index 286f636f9..367bfec88 100644 --- a/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp +++ b/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp @@ -94,7 +94,7 @@ class bulirsch_stoer { #pragma clang diagnostic ignored "-Wreorder-ctor" #elif defined(__GNUC__) #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wreorder-ctor" +#pragma GCC diagnostic ignored "-Wreorder" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5038) diff --git a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp index a856e331f..a388facf1 100644 --- a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp +++ b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp @@ -101,7 +101,7 @@ class bulirsch_stoer_dense_out { #pragma clang diagnostic ignored "-Wreorder-ctor" #elif defined(__GNUC__) #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wreorder-ctor" +#pragma GCC diagnostic ignored "-Wreorder" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5038) diff --git a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp index c3cbccad6..33c178db4 100644 --- a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp +++ b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp @@ -26,7 +26,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__GNUC__) #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) diff --git a/include/boost/numeric/odeint/util/ublas_wrapper.hpp b/include/boost/numeric/odeint/util/ublas_wrapper.hpp index 4da36191d..f0e2c7b4d 100644 --- a/include/boost/numeric/odeint/util/ublas_wrapper.hpp +++ b/include/boost/numeric/odeint/util/ublas_wrapper.hpp @@ -24,7 +24,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__GNUC__) #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) From 04c7a9b707d93ad0efa870aec13403fe42f88719 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 11:59:10 +0100 Subject: [PATCH 07/35] Collected warning fixes --- test/adaptive_iterator.cpp | 2 +- test/adaptive_time_iterator.cpp | 2 +- test/const_step_iterator.cpp | 2 +- test/const_step_time_iterator.cpp | 2 +- test/diagnostic_state_type.hpp | 10 ++++---- test/dummy_observers.hpp | 2 +- test/dummy_steppers.hpp | 6 ++--- test/generation.cpp | 2 +- test/integrate_implicit.cpp | 21 ++++++++++++++++ test/integrate_overflow.cpp | 4 +-- test/integrate_stepper_refs.cpp | 10 ++++---- test/is_resizeable.cpp | 2 +- test/multi_array.cpp | 2 +- test/n_step_iterator.cpp | 2 +- test/numeric/abm_time_dependent.cpp | 2 +- test/numeric/adams_bashforth.cpp | 2 +- test/numeric/adams_bashforth_moulton.cpp | 2 +- .../adaptive_adams_bashforth_moulton.cpp | 2 +- test/numeric/order_quadrature_formula.cpp | 23 ++++++++++++++--- test/numeric/rosenbrock.cpp | 4 +-- test/numeric/runge_kutta.cpp | 4 +-- test/numeric/velocity_verlet.cpp | 4 +-- test/regression/regression_147.cpp | 2 +- test/regression/regression_149.cpp | 2 +- test/regression/regression_168.cpp | 2 +- test/runge_kutta_concepts.cpp | 25 ++++++++++++++++--- test/runge_kutta_controlled_concepts.cpp | 2 +- test/runge_kutta_error_concepts.cpp | 5 ++-- test/std_array.cpp | 2 +- test/step_size_limitation.cpp | 8 +++--- test/trivial_state.cpp | 2 +- test/unwrap_boost_reference.cpp | 3 +-- test/unwrap_reference.cpp | 3 +-- test/velocity_verlet.cpp | 4 +-- 34 files changed, 113 insertions(+), 59 deletions(-) diff --git a/test/adaptive_iterator.cpp b/test/adaptive_iterator.cpp index 8f3cfa74a..a092388f4 100644 --- a/test/adaptive_iterator.cpp +++ b/test/adaptive_iterator.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "dummy_steppers.hpp" diff --git a/test/adaptive_time_iterator.cpp b/test/adaptive_time_iterator.cpp index 406a71c65..6a8247f87 100644 --- a/test/adaptive_time_iterator.cpp +++ b/test/adaptive_time_iterator.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "dummy_steppers.hpp" diff --git a/test/const_step_iterator.cpp b/test/const_step_iterator.cpp index 2d0ac9dbe..907127b3e 100644 --- a/test/const_step_iterator.cpp +++ b/test/const_step_iterator.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "dummy_steppers.hpp" diff --git a/test/const_step_time_iterator.cpp b/test/const_step_time_iterator.cpp index 9227f5c04..e1d2d729b 100644 --- a/test/const_step_time_iterator.cpp +++ b/test/const_step_time_iterator.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "dummy_steppers.hpp" diff --git a/test/diagnostic_state_type.hpp b/test/diagnostic_state_type.hpp index 0c21013ea..0ead8824f 100644 --- a/test/diagnostic_state_type.hpp +++ b/test/diagnostic_state_type.hpp @@ -91,7 +91,7 @@ namespace odeint { template< size_t N , size_t M > struct same_size_impl< diagnostic_type< N > , diagnostic_type< M > > { - static bool same_size( const diagnostic_type< N > &x1 , const diagnostic_type< M > &x2 ) + static bool same_size( const diagnostic_type< N > &/*x1*/ , const diagnostic_type< M > &/*x2*/ ) { return false; } @@ -100,7 +100,7 @@ namespace odeint { template< size_t N , class State1 > struct same_size_impl< diagnostic_type< N > , State1 > { - static bool same_size( const diagnostic_type< N > &x1 , const State1 &x2 ) + static bool same_size( const diagnostic_type< N > &/*x1*/ , const State1 &/*x2*/ ) { return false; } @@ -109,7 +109,7 @@ namespace odeint { template< class State1 , size_t N > struct same_size_impl< State1 , diagnostic_type< N > > { - static bool same_size( const State1 &x1 , const diagnostic_type< N > &x2 ) + static bool same_size( const State1 &/*x1*/ , const diagnostic_type< N > &/*x2*/ ) { return false; } @@ -120,7 +120,7 @@ namespace odeint { template< size_t N , class StateIn > struct resize_impl< diagnostic_type< N > , StateIn > { - static void resize( diagnostic_type< N > &x1 , const StateIn &x2 ) + static void resize( diagnostic_type< N > &/*x1*/ , const StateIn &/*x2*/ ) { counter< N >::adjust_size_count()++; } @@ -152,7 +152,7 @@ namespace odeint { counter< N >::copy_count()++; } - state_wrapper_type& operator=( const state_wrapper_type &x ) + state_wrapper_type& operator=( const state_wrapper_type &/*x*/ ) { counter< N >::copy_count()++; return *this; diff --git a/test/dummy_observers.hpp b/test/dummy_observers.hpp index 744c374f1..efef24013 100644 --- a/test/dummy_observers.hpp +++ b/test/dummy_observers.hpp @@ -27,7 +27,7 @@ namespace odeint { struct dummy_observer { template< class State > - void operator()( const State &s ) const + void operator()( const State &/*s*/ ) const { } }; diff --git a/test/dummy_steppers.hpp b/test/dummy_steppers.hpp index 5f8d749fd..d4107d658 100644 --- a/test/dummy_steppers.hpp +++ b/test/dummy_steppers.hpp @@ -38,7 +38,7 @@ struct dummy_stepper order_type order( void ) const { return 1; } template< class System > - void do_step( System sys , state_type &x , time_type t , time_type dt ) const + void do_step( System /*sys*/ , state_type &x , time_type /*t*/ , time_type /*dt*/ ) const { x[0] += 0.25; } @@ -60,7 +60,7 @@ struct dummy_dense_output_stepper } template< class System > - std::pair< time_type , time_type > do_step( System sys ) + std::pair< time_type , time_type > do_step( System /*sys*/ ) { m_x[0] += 0.25; m_t += m_dt; @@ -105,7 +105,7 @@ struct dummy_controlled_stepper typedef controlled_stepper_tag stepper_category; template< class Sys > - controlled_step_result try_step( Sys sys , state_type &x , time_type &t , time_type &dt ) const + controlled_step_result try_step( Sys /*sys*/ , state_type &x , time_type &t , time_type &dt ) const { x[0] += 0.25; t += dt; diff --git a/test/generation.cpp b/test/generation.cpp index 6432692d7..f39425306 100644 --- a/test/generation.cpp +++ b/test/generation.cpp @@ -29,7 +29,7 @@ using namespace boost::numeric::odeint; template< class Stepper1 , class Stepper2 > -void check_stepper_type( const Stepper1 &s1 , const Stepper2 &s2 ) +void check_stepper_type( const Stepper1 &/*s1*/ , const Stepper2 &/*s2*/ ) { BOOST_STATIC_ASSERT(( boost::is_same< Stepper1 , Stepper2 >::value )); } diff --git a/test/integrate_implicit.cpp b/test/integrate_implicit.cpp index dd8814c24..85d02c5ba 100644 --- a/test/integrate_implicit.cpp +++ b/test/integrate_implicit.cpp @@ -16,6 +16,18 @@ #define BOOST_TEST_MODULE odeint_integrate_functions_implicit +// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif + #include #include #include @@ -231,3 +243,12 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( integrate_n_steps_test_case , Stepper, simple_ste } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif + diff --git a/test/integrate_overflow.cpp b/test/integrate_overflow.cpp index 0dba4046a..332574250 100644 --- a/test/integrate_overflow.cpp +++ b/test/integrate_overflow.cpp @@ -39,7 +39,7 @@ typedef double value_type; typedef std::vector< value_type > state_type; // the famous lorenz system as usual -void lorenz( const state_type &x , state_type &dxdt , const value_type t ) +void lorenz( const state_type &x , state_type &dxdt , const value_type /*t*/ ) { //const value_type sigma( 10.0 ); const value_type R( 28.0 ); @@ -58,7 +58,7 @@ struct push_back_time push_back_time( std::vector< double > × ) : m_times( times ) { } - void operator()( const state_type &x , double t ) + void operator()( const state_type &/*x*/ , double t ) { m_times.push_back( t ); } diff --git a/test/integrate_stepper_refs.cpp b/test/integrate_stepper_refs.cpp index 5d6d34c94..96dc98617 100644 --- a/test/integrate_stepper_refs.cpp +++ b/test/integrate_stepper_refs.cpp @@ -58,7 +58,7 @@ public : typedef stepper_tag stepper_category; template< class System > - void do_step( System system , state_type &in , time_type t , time_type dt ) + void do_step( System /*system*/ , state_type &/*in*/ , time_type /*t*/ , time_type /*dt*/ ) { // empty @@ -80,7 +80,7 @@ public : typedef controlled_stepper_tag stepper_category; template< class System > - controlled_step_result try_step( System system , state_type &in , time_type &t , time_type &dt ) + controlled_step_result try_step( System /*system*/ , state_type &/*in*/ , time_type &t , time_type &dt ) { std::cout << "dense out stepper: " << t << " , " << dt << std::endl; t += dt; @@ -111,13 +111,13 @@ public : } template< class System > - void do_step( System system ) + void do_step( System /*system*/ ) { std::cout << "dense out stepper: " << m_t << " , " << m_dt << std::endl; m_t += m_dt; } - void calc_state( const time_type t_inter , state_type &x ) + void calc_state( const time_type /*t_inter*/ , state_type &x ) { x = m_x; } @@ -139,7 +139,7 @@ private : }; -void lorenz( const state_type &x , state_type &dxdt , const value_type t ) +void lorenz( const state_type &x , state_type &dxdt , const value_type /*t*/ ) { //const value_type sigma( 10.0 ); const value_type R( 28.0 ); diff --git a/test/is_resizeable.cpp b/test/is_resizeable.cpp index 39116038c..84f1d525c 100644 --- a/test/is_resizeable.cpp +++ b/test/is_resizeable.cpp @@ -26,7 +26,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__GNUC__) #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) diff --git a/test/multi_array.cpp b/test/multi_array.cpp index 67b7f964d..c2003094c 100644 --- a/test/multi_array.cpp +++ b/test/multi_array.cpp @@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE( test_for_each2_vector ) struct vector_ode { const static size_t n = 128; - void operator()( const vector_type &x , vector_type &dxdt , double t ) const + void operator()( const vector_type &x , vector_type &dxdt , double /*t*/ ) const { dxdt[-1] = x[n] - 2.0 * x[-1] + x[0]; for( size_t i=0 ; i #include -#include +#include #include #include "dummy_steppers.hpp" diff --git a/test/numeric/abm_time_dependent.cpp b/test/numeric/abm_time_dependent.cpp index 019a17d6c..ee746db6f 100644 --- a/test/numeric/abm_time_dependent.cpp +++ b/test/numeric/abm_time_dependent.cpp @@ -37,7 +37,7 @@ typedef value_type state_type; // simple time-dependent rhs, analytic solution x = 0.5*t^2 struct simple_rhs { - void operator()( const state_type& x , state_type &dxdt , const double t ) const + void operator()( const state_type& /*x*/ , state_type &dxdt , const double t ) const { dxdt = t; } diff --git a/test/numeric/adams_bashforth.cpp b/test/numeric/adams_bashforth.cpp index ca8a6cee9..6e3040648 100644 --- a/test/numeric/adams_bashforth.cpp +++ b/test/numeric/adams_bashforth.cpp @@ -38,7 +38,7 @@ typedef boost::array< double , 2 > state_type; // harmonic oscillator, analytic solution x[0] = sin( t ) struct osc { - void operator()( const state_type &x , state_type &dxdt , const double t ) const + void operator()( const state_type &x , state_type &dxdt , const double /*t*/ ) const { dxdt[0] = x[1]; dxdt[1] = -x[0]; diff --git a/test/numeric/adams_bashforth_moulton.cpp b/test/numeric/adams_bashforth_moulton.cpp index dea57182a..eedb0e9d8 100644 --- a/test/numeric/adams_bashforth_moulton.cpp +++ b/test/numeric/adams_bashforth_moulton.cpp @@ -39,7 +39,7 @@ typedef runge_kutta_fehlberg78 initializing_stepper; // harmonic oscillator, analytic solution x[0] = sin( t ) struct osc { - void operator()( const state_type &x , state_type &dxdt , const double t ) const + void operator()( const state_type &x , state_type &dxdt , const double /*t*/ ) const { dxdt[0] = x[1]; dxdt[1] = -x[0]; diff --git a/test/numeric/adaptive_adams_bashforth_moulton.cpp b/test/numeric/adaptive_adams_bashforth_moulton.cpp index 0932dd1dd..464ad0474 100644 --- a/test/numeric/adaptive_adams_bashforth_moulton.cpp +++ b/test/numeric/adaptive_adams_bashforth_moulton.cpp @@ -39,7 +39,7 @@ typedef runge_kutta_fehlberg78 initializing_stepper; // harmonic oscillator, analytic solution x[0] = sin( t ) struct osc { - void operator()( const state_type &x , state_type &dxdt , const double t ) const + void operator()( const state_type &x , state_type &dxdt , const double /*t*/ ) const { dxdt[0] = x[1]; dxdt[1] = -x[0]; diff --git a/test/numeric/order_quadrature_formula.cpp b/test/numeric/order_quadrature_formula.cpp index cefab4dae..1d0d7a030 100644 --- a/test/numeric/order_quadrature_formula.cpp +++ b/test/numeric/order_quadrature_formula.cpp @@ -15,13 +15,22 @@ #pragma warning(disable:4996) #endif +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif + #define BOOST_TEST_MODULE order_quadrature_formula #include #include -#include "boost/format.hpp" - #include #include @@ -49,7 +58,7 @@ struct monomial monomial(int p = 0) : power( p ){}; - void operator()( const state_type &x , state_type &dxdt , const time_type t ) + void operator()( const state_type &/*x*/ , state_type & dxdt , const time_type t ) { dxdt = ( 1.0 + power ) * pow( t, power ); } @@ -193,3 +202,11 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( adams_bashforth_moultion_test , Stepper, abm_step } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif diff --git a/test/numeric/rosenbrock.cpp b/test/numeric/rosenbrock.cpp index 2b6a26788..a3c7825c4 100644 --- a/test/numeric/rosenbrock.cpp +++ b/test/numeric/rosenbrock.cpp @@ -37,7 +37,7 @@ typedef boost::numeric::ublas::matrix< value_type > matrix_type; // harmonic oscillator, analytic solution x[0] = sin( t ) struct sys { - void operator()( const state_type &x , state_type &dxdt , const value_type &t ) const + void operator()( const state_type &x , state_type &dxdt , const value_type &/*t*/ ) const { dxdt( 0 ) = x( 1 ); dxdt( 1 ) = -x( 0 ); @@ -46,7 +46,7 @@ struct sys struct jacobi { - void operator()( const state_type &x , matrix_type &jacobi , const value_type &t , state_type &dfdt ) const + void operator()( const state_type &/*x*/ , matrix_type &jacobi , const value_type &/*t*/ , state_type &dfdt ) const { jacobi( 0 , 0 ) = 0; jacobi( 0 , 1 ) = 1; diff --git a/test/numeric/runge_kutta.cpp b/test/numeric/runge_kutta.cpp index a71701bde..4ae7c178e 100644 --- a/test/numeric/runge_kutta.cpp +++ b/test/numeric/runge_kutta.cpp @@ -39,7 +39,7 @@ typedef boost::array< double , 2 > state_type; // harmonic oscillator, analytic solution x[0] = sin( t ) struct osc { - void operator()( const state_type &x , state_type &dxdt , const double t ) const + void operator()( const state_type &x , state_type &dxdt , const double /*t*/ ) const { dxdt[0] = x[1]; dxdt[1] = -x[0]; @@ -51,7 +51,7 @@ template< class StepperCategory > struct resetter { template< class Stepper > - static void reset( Stepper &stepper ) { } + static void reset( Stepper &/*stepper*/ ) { } }; template< > diff --git a/test/numeric/velocity_verlet.cpp b/test/numeric/velocity_verlet.cpp index 5ac77807b..6423f5158 100644 --- a/test/numeric/velocity_verlet.cpp +++ b/test/numeric/velocity_verlet.cpp @@ -38,8 +38,8 @@ typedef boost::array< double , 1 > state_type; // harmonic oscillator, analytic solution x[0] = sin( t ) struct osc { - void operator()( const state_type &x, const state_type &v, state_type &a, - const double t ) const + void operator()( const state_type &x, const state_type &/*v*/, state_type &a, + const double /*t*/ ) const { a[0] = -x[0]; } diff --git a/test/regression/regression_147.cpp b/test/regression/regression_147.cpp index 7373782df..7c07d5b2a 100644 --- a/test/regression/regression_147.cpp +++ b/test/regression/regression_147.cpp @@ -38,7 +38,7 @@ namespace mpl = boost::mpl; typedef double state_type; -void rhs( const state_type &x , state_type &dxdt , const double t ) +void rhs( const state_type &/*x*/ , state_type &dxdt , const double /*t*/ ) { dxdt = 1; } diff --git a/test/regression/regression_149.cpp b/test/regression/regression_149.cpp index 2790d683f..aa2567c7d 100644 --- a/test/regression/regression_149.cpp +++ b/test/regression/regression_149.cpp @@ -39,7 +39,7 @@ namespace mpl = boost::mpl; typedef std::vector state_type; -void rhs( const state_type &x , state_type &dxdt , const double t ) +void rhs( const state_type &/*x*/ , state_type &/*dxdt*/ , const double /*t*/ ) { } diff --git a/test/regression/regression_168.cpp b/test/regression/regression_168.cpp index 8349261a6..3b4698e54 100644 --- a/test/regression/regression_168.cpp +++ b/test/regression/regression_168.cpp @@ -71,7 +71,7 @@ struct oscillator oscillator( const frequency_type &omega = 1.0 * si::hertz ) : m_omega( omega ) { } - void operator()( const state_type &x , deriv_type &dxdt , time_type t ) const + void operator()( const state_type &x , deriv_type &dxdt , time_type /*t*/ ) const { fusion::at_c< 0 >( dxdt ) = fusion::at_c< 1 >( x ); fusion::at_c< 1 >( dxdt ) = - m_omega * m_omega * fusion::at_c< 0 >( x ); diff --git a/test/runge_kutta_concepts.cpp b/test/runge_kutta_concepts.cpp index 42235dea4..6d24300b9 100644 --- a/test/runge_kutta_concepts.cpp +++ b/test/runge_kutta_concepts.cpp @@ -21,6 +21,18 @@ #pragma warning(disable:4996) #endif +// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif + #define BOOST_TEST_MODULE odeint_runge_kutta_concepts #include @@ -34,7 +46,7 @@ #include #include -#include +#include #include #include @@ -64,6 +76,7 @@ using std::vector; using namespace boost::unit_test; using namespace boost::numeric::odeint; +using namespace boost::placeholders; namespace mpl = boost::mpl; const double result = 2.2; @@ -74,8 +87,6 @@ template< class Stepper , class System > void check_stepper_concept( Stepper &stepper , System system , typename Stepper::state_type &x ) { typedef Stepper stepper_type; - typedef typename stepper_type::deriv_type container_type; - typedef typename stepper_type::order_type order_type; typedef typename stepper_type::time_type time_type; stepper.do_step( system , x , static_cast(0.0) , static_cast(0.1) ); @@ -215,3 +226,11 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( stepper_test2 , Stepper, stepper_combinations2 ) BOOST_AUTO_TEST_SUITE_END() + +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif diff --git a/test/runge_kutta_controlled_concepts.cpp b/test/runge_kutta_controlled_concepts.cpp index 03ad59ac8..cd5292b41 100644 --- a/test/runge_kutta_controlled_concepts.cpp +++ b/test/runge_kutta_controlled_concepts.cpp @@ -71,7 +71,7 @@ template< class Stepper , class System > void check_controlled_stepper_concept( Stepper &stepper , System system , typename Stepper::state_type &x ) { typedef Stepper stepper_type; - typedef typename stepper_type::deriv_type container_type; + //typedef typename stepper_type::deriv_type container_type; //typedef typename stepper_type::order_type order_type; controlled_error_stepper don't necessarily have a order (burlish-stoer) typedef typename stepper_type::time_type time_type; diff --git a/test/runge_kutta_error_concepts.cpp b/test/runge_kutta_error_concepts.cpp index 06980772a..6babc99f4 100644 --- a/test/runge_kutta_error_concepts.cpp +++ b/test/runge_kutta_error_concepts.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include @@ -58,6 +58,7 @@ using std::vector; using namespace boost::unit_test; using namespace boost::numeric::odeint; +using namespace boost::placeholders; namespace mpl = boost::mpl; const double result = 2.4; // four steps total... @@ -68,8 +69,6 @@ template< class Stepper , class System > void check_error_stepper_concept( Stepper &stepper , System system , typename Stepper::state_type &x , typename Stepper::state_type &xerr ) { typedef Stepper stepper_type; - typedef typename stepper_type::deriv_type container_type; - typedef typename stepper_type::order_type order_type; typedef typename stepper_type::time_type time_type; stepper.do_step( system , x , static_cast(0.0) , static_cast(0.1) ); diff --git a/test/std_array.cpp b/test/std_array.cpp index 350a387a8..5c4f67a83 100644 --- a/test/std_array.cpp +++ b/test/std_array.cpp @@ -27,7 +27,7 @@ using namespace boost::unit_test; typedef std::array state_type; -void rhs(const state_type &x, state_type &dxdt, const double t) +void rhs(const state_type &/*x*/, state_type &/*dxdt*/, const double /*t*/) { } diff --git a/test/step_size_limitation.cpp b/test/step_size_limitation.cpp index 2d8e4725d..8b83e4028 100644 --- a/test/step_size_limitation.cpp +++ b/test/step_size_limitation.cpp @@ -34,7 +34,7 @@ typedef std::vector< value_type > state_type; *********************************************** */ -void damped_osc( const state_type &x , state_type &dxdt , const value_type t ) +void damped_osc( const state_type &x , state_type &dxdt , const value_type /*t*/ ) { const value_type gam( 0.1); @@ -51,7 +51,7 @@ struct push_back_time : m_times( times ) { } template - void operator()( const State &x , double t ) + void operator()( const State &/*x*/ , double t ) { m_times.push_back( t ); } @@ -189,7 +189,7 @@ typedef boost::numeric::ublas::matrix< value_type > matrix_type; // harmonic oscillator, analytic solution x[0] = sin( t ) struct osc_rhs { - void operator()( const vector_type &x , vector_type &dxdt , const value_type &t ) const + void operator()( const vector_type &x , vector_type &dxdt , const value_type &/*t*/ ) const { dxdt( 0 ) = x( 1 ); dxdt( 1 ) = -x( 0 ); @@ -198,7 +198,7 @@ struct osc_rhs struct osc_jacobi { - void operator()( const vector_type &x , matrix_type &jacobi , const value_type &t , vector_type &dfdt ) const + void operator()( const vector_type &/*x*/ , matrix_type &jacobi , const value_type &/*t*/ , vector_type &dfdt ) const { jacobi( 0 , 0 ) = 0; jacobi( 0 , 1 ) = 1; diff --git a/test/trivial_state.cpp b/test/trivial_state.cpp index 9976db7fb..2f96d2653 100644 --- a/test/trivial_state.cpp +++ b/test/trivial_state.cpp @@ -46,7 +46,7 @@ namespace mpl = boost::mpl; struct constant_system { template< typename T > - void operator()( const T &x , T &dxdt , const T t ) const + void operator()( const T &/*x*/ , T &dxdt , const T /*t*/ ) const { dxdt = 1.0; } }; diff --git a/test/unwrap_boost_reference.cpp b/test/unwrap_boost_reference.cpp index 4106fdf20..8db209a70 100644 --- a/test/unwrap_boost_reference.cpp +++ b/test/unwrap_boost_reference.cpp @@ -22,9 +22,8 @@ using namespace boost::unit_test; template< typename T > -void func( T t ) +void func( T ) { - typedef typename boost::numeric::odeint::unwrap_reference< T >::type type; } BOOST_AUTO_TEST_SUITE( unwrap_boost_reference_test ) diff --git a/test/unwrap_reference.cpp b/test/unwrap_reference.cpp index 7337ddd3a..a1c59913d 100644 --- a/test/unwrap_reference.cpp +++ b/test/unwrap_reference.cpp @@ -24,9 +24,8 @@ using namespace boost::unit_test; template< typename T > -void func( T t ) +void func( T ) { - typedef typename boost::numeric::odeint::unwrap_reference< T >::type type; } BOOST_AUTO_TEST_SUITE( unwrap_reference_test ) diff --git a/test/velocity_verlet.cpp b/test/velocity_verlet.cpp index 93a2e97ca..a1c88456a 100644 --- a/test/velocity_verlet.cpp +++ b/test/velocity_verlet.cpp @@ -74,7 +74,7 @@ struct velocity_verlet_fixture struct ode { template< class CoorIn , class MomentumIn , class AccelerationOut , class Time > - void operator()( const CoorIn &q , const MomentumIn &p , AccelerationOut &a , Time t ) const + void operator()( const CoorIn &q , const MomentumIn &p , AccelerationOut &a , Time /*t*/ ) const { a[0] = -q[0] - p[0]; a[1] = -q[1] - p[1]; @@ -84,7 +84,7 @@ struct ode struct ode_units { - void operator()( coor_vector const &q , velocity_vector const &p , accelartion_vector &a , time_type t ) const + void operator()( coor_vector const &q , velocity_vector const &p , accelartion_vector &a , time_type /*t*/ ) const { const units::quantity< si::frequency , value_type > omega = 1.0 * si::hertz; const units::quantity< si::frequency , value_type > friction = 0.001 * si::hertz; From 1e18dc0e774c023eab5596ebb5a216142e0b489f Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 12:14:47 +0100 Subject: [PATCH 08/35] Remove unused items --- test/stepper_with_units.cpp | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/test/stepper_with_units.cpp b/test/stepper_with_units.cpp index 3e3a64508..877b9c929 100644 --- a/test/stepper_with_units.cpp +++ b/test/stepper_with_units.cpp @@ -65,7 +65,7 @@ typedef units::quantity< si::acceleration , value_type > acceleration_type; typedef fusion::vector< length_type , velocity_type > state_type; typedef fusion::vector< velocity_type , acceleration_type > deriv_type; -void oscillator( const state_type &x , deriv_type &dxdt , time_type t ) +void oscillator( const state_type &x , deriv_type &dxdt , time_type /*t*/ ) { const units::quantity< si::frequency , value_type > omega = 1.0 * si::hertz; fusion::at_c< 0 >( dxdt ) = fusion::at_c< 1 >( x ); @@ -77,12 +77,12 @@ void check_stepper( Stepper &stepper ) { typedef Stepper stepper_type; typedef typename stepper_type::state_type state_type; - typedef typename stepper_type::value_type value_type; + //typedef typename stepper_type::value_type value_type; typedef typename stepper_type::deriv_type deriv_type; typedef typename stepper_type::time_type time_type; - typedef typename stepper_type::order_type order_type; - typedef typename stepper_type::algebra_type algebra_type; - typedef typename stepper_type::operations_type operations_type; + //typedef typename stepper_type::order_type order_type; + //typedef typename stepper_type::algebra_type algebra_type; + //typedef typename stepper_type::operations_type operations_type; const time_type t( 0.0 * si::second ); time_type dt( 0.1 * si::second ); @@ -109,12 +109,12 @@ void check_fsal_stepper( Stepper &stepper ) { typedef Stepper stepper_type; typedef typename stepper_type::state_type state_type; - typedef typename stepper_type::value_type value_type; + //typedef typename stepper_type::value_type value_type; typedef typename stepper_type::deriv_type deriv_type; typedef typename stepper_type::time_type time_type; - typedef typename stepper_type::order_type order_type; - typedef typename stepper_type::algebra_type algebra_type; - typedef typename stepper_type::operations_type operations_type; + //typedef typename stepper_type::order_type order_type; + //typedef typename stepper_type::algebra_type algebra_type; + //typedef typename stepper_type::operations_type operations_type; const time_type t( 0.0 * si::second ); time_type dt( 0.1 * si::second ); @@ -140,12 +140,12 @@ void check_error_stepper( Stepper &stepper ) { typedef Stepper stepper_type; typedef typename stepper_type::state_type state_type; - typedef typename stepper_type::value_type value_type; + //typedef typename stepper_type::value_type value_type; typedef typename stepper_type::deriv_type deriv_type; typedef typename stepper_type::time_type time_type; - typedef typename stepper_type::order_type order_type; - typedef typename stepper_type::algebra_type algebra_type; - typedef typename stepper_type::operations_type operations_type; + //typedef typename stepper_type::order_type order_type; + //typedef typename stepper_type::algebra_type algebra_type; + //typedef typename stepper_type::operations_type operations_type; const time_type t( 0.0 * si::second ); time_type dt( 0.1 * si::second ); @@ -171,12 +171,12 @@ void check_fsal_error_stepper( Stepper &stepper ) { typedef Stepper stepper_type; typedef typename stepper_type::state_type state_type; - typedef typename stepper_type::value_type value_type; + //typedef typename stepper_type::value_type value_type; typedef typename stepper_type::deriv_type deriv_type; typedef typename stepper_type::time_type time_type; - typedef typename stepper_type::order_type order_type; - typedef typename stepper_type::algebra_type algebra_type; - typedef typename stepper_type::operations_type operations_type; + //typedef typename stepper_type::order_type order_type; + //typedef typename stepper_type::algebra_type algebra_type; + //typedef typename stepper_type::operations_type operations_type; const time_type t( 0.0 * si::second ); time_type dt( 0.1 * si::second ); @@ -202,8 +202,8 @@ void check_controlled_stepper( Stepper &stepper ) { typedef Stepper stepper_type; typedef typename stepper_type::state_type state_type; - typedef typename stepper_type::value_type value_type; - typedef typename stepper_type::deriv_type deriv_type; + //typedef typename stepper_type::value_type value_type; + //typedef typename stepper_type::deriv_type deriv_type; typedef typename stepper_type::time_type time_type; time_type t( 0.0 * si::second ); @@ -220,8 +220,8 @@ void check_dense_output_stepper( Stepper &stepper ) { typedef Stepper stepper_type; typedef typename stepper_type::state_type state_type; - typedef typename stepper_type::value_type value_type; - typedef typename stepper_type::deriv_type deriv_type; + //typedef typename stepper_type::value_type value_type; + //typedef typename stepper_type::deriv_type deriv_type; typedef typename stepper_type::time_type time_type; // typedef typename stepper_type::order_type order_type; From f1d1ccb6651ec74ad1a4a4b496dc2c57e79f7c04 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 12:15:01 +0100 Subject: [PATCH 09/35] Fix regression for gcc on ARM --- test/regression/regression_189.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/regression/regression_189.cpp b/test/regression/regression_189.cpp index f2627553d..d99660115 100644 --- a/test/regression/regression_189.cpp +++ b/test/regression/regression_189.cpp @@ -69,8 +69,8 @@ BOOST_AUTO_TEST_CASE( regression_189 ) std::cout << phoenix::arg_names::arg2 << " " << phoenix::arg_names::arg1[0] << "\n" ); num_of_steps_expected = 1531; - // Apple ARM arch takes one additional step - #if defined(__aarch64__) && defined(__APPLE__) + // Apple ARM arch takes one additional step, but only with clang + #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) ++num_of_steps_expected; #endif From 29fda9f0f30d0587ca59e30d51a3f05544e23aad Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 12:15:16 +0100 Subject: [PATCH 10/35] Increase range of pragma --- .../odeint/stepper/bulirsch_stoer_dense_out.hpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp index a388facf1..56c98ef58 100644 --- a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp +++ b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp @@ -166,15 +166,6 @@ class bulirsch_stoer_dense_out { } } -#if defined(__clang__) -#pragma clang diagnostic pop -#elif defined(__GNUC__) -#pragma GCC diagnostic pop -#elif defined(_MSC_VER) -#pragma warning(pop) -#endif - - template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut > controlled_step_result try_step( System system , const StateIn &in , const DerivIn &dxdt , time_type &t , StateOut &out , DerivOut &dxdt_new , time_type &dt ) { @@ -858,4 +849,12 @@ class bulirsch_stoer_dense_out { } } +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif + #endif // BOOST_NUMERIC_ODEINT_STEPPER_BULIRSCH_STOER_HPP_INCLUDED From e83a6bf0a141f7ff2561c7145f7193d078ca8739 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 13:44:16 +0100 Subject: [PATCH 11/35] Add versioning to -Wdepreacted copy values --- include/boost/numeric/odeint/algebra/multi_array_algebra.hpp | 4 ++-- .../boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp | 4 ++-- include/boost/numeric/odeint/stepper/rosenbrock4.hpp | 4 ++-- include/boost/numeric/odeint/util/ublas_wrapper.hpp | 4 ++-- test/integrate_implicit.cpp | 4 ++-- test/is_resizeable.cpp | 4 ++-- test/numeric/order_quadrature_formula.cpp | 4 ++-- test/runge_kutta_concepts.cpp | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp index 93e581cb0..1ab3beb46 100644 --- a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp +++ b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp @@ -18,10 +18,10 @@ #ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED #define BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) diff --git a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp index 077a3c483..145586e7c 100644 --- a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp +++ b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp @@ -20,10 +20,10 @@ #define BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) diff --git a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp index 33c178db4..d31409673 100644 --- a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp +++ b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp @@ -21,10 +21,10 @@ #define BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) diff --git a/include/boost/numeric/odeint/util/ublas_wrapper.hpp b/include/boost/numeric/odeint/util/ublas_wrapper.hpp index f0e2c7b4d..0bbd6bc31 100644 --- a/include/boost/numeric/odeint/util/ublas_wrapper.hpp +++ b/include/boost/numeric/odeint/util/ublas_wrapper.hpp @@ -19,10 +19,10 @@ #define BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) diff --git a/test/integrate_implicit.cpp b/test/integrate_implicit.cpp index 85d02c5ba..77390c915 100644 --- a/test/integrate_implicit.cpp +++ b/test/integrate_implicit.cpp @@ -17,10 +17,10 @@ #define BOOST_TEST_MODULE odeint_integrate_functions_implicit // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) diff --git a/test/is_resizeable.cpp b/test/is_resizeable.cpp index 84f1d525c..bcabbca5a 100644 --- a/test/is_resizeable.cpp +++ b/test/is_resizeable.cpp @@ -21,10 +21,10 @@ #endif // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) diff --git a/test/numeric/order_quadrature_formula.cpp b/test/numeric/order_quadrature_formula.cpp index 1d0d7a030..deedac117 100644 --- a/test/numeric/order_quadrature_formula.cpp +++ b/test/numeric/order_quadrature_formula.cpp @@ -15,10 +15,10 @@ #pragma warning(disable:4996) #endif -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) diff --git a/test/runge_kutta_concepts.cpp b/test/runge_kutta_concepts.cpp index 6d24300b9..e7a421cfe 100644 --- a/test/runge_kutta_concepts.cpp +++ b/test/runge_kutta_concepts.cpp @@ -22,10 +22,10 @@ #endif // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #elif defined(_MSC_VER) From 0be9900a884d6de006035f5a0199f145e64c2092 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 13:44:32 +0100 Subject: [PATCH 12/35] Require C++14 for bulrisch_stoer since it uses Boost.Math --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 85fc31de2..3d9dcb287 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -60,7 +60,7 @@ test-suite "odeint" [ run adaptive_adams_coefficients.cpp ] [ run generic_stepper.cpp ] [ run generic_error_stepper.cpp ] - [ run bulirsch_stoer.cpp ] + [ run bulirsch_stoer.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] [ run integrate_times.cpp ] [ run integrate_times.cpp : : : ODEINT_INTEGRATE_ITERATOR : integrate_times_iterator ] [ run integrate.cpp ] From 0cbdad354f783bfab7e2bea00504eea5dec3f285 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 14:21:23 +0100 Subject: [PATCH 13/35] Fixup other jamfiles --- test/Jamfile.v2 | 18 +++++++++--------- test/numeric/Jamfile.v2 | 13 +++++++++---- test/regression/Jamfile.v2 | 18 +++++++++++------- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3d9dcb287..68d079d5e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -47,11 +47,11 @@ test-suite "odeint" [ run implicit_euler.cpp ] # disable in clang [ run fusion_algebra.cpp : : : clang:no gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj ] - [ run stepper_with_units.cpp : : : clang:no gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj ] + [ run stepper_with_units.cpp : : : clang:no gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] [ run stepper_copying.cpp ] [ run stepper_with_ranges.cpp ] [ run rosenbrock4.cpp ] - [ run rosenbrock4_mp.cpp ] + [ run rosenbrock4_mp.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] [ run is_pair.cpp ] [ run adams_bashforth.cpp ] [ run adams_moulton.cpp ] @@ -61,10 +61,10 @@ test-suite "odeint" [ run generic_stepper.cpp ] [ run generic_error_stepper.cpp ] [ run bulirsch_stoer.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] - [ run integrate_times.cpp ] - [ run integrate_times.cpp : : : ODEINT_INTEGRATE_ITERATOR : integrate_times_iterator ] - [ run integrate.cpp ] - [ run integrate.cpp : : : ODEINT_INTEGRATE_ITERATOR : integrate_iterator ] + [ run integrate_times.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] + [ run integrate_times.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ODEINT_INTEGRATE_ITERATOR : integrate_times_iterator ] + [ run integrate.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] + [ run integrate.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ODEINT_INTEGRATE_ITERATOR : integrate_iterator ] [ run integrate_implicit.cpp ] [ run integrate_implicit.cpp : : : ODEINT_INTEGRATE_ITERATOR : integrate_implicit_iterator ] [ run generation.cpp ] @@ -88,11 +88,11 @@ test-suite "odeint" [ run n_step_time_iterator.cpp ] [ run times_iterator.cpp ] [ run times_time_iterator.cpp ] - [ run step_size_limitation.cpp ] - [ run integrate_overflow.cpp ] + [ run step_size_limitation.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] + [ run integrate_overflow.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] [ compile unwrap_boost_reference.cpp ] [ compile unwrap_reference.cpp ] - [ compile std_array.cpp ] + [ compile std_array.cpp : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] : valgrind ; diff --git a/test/numeric/Jamfile.v2 b/test/numeric/Jamfile.v2 index a4643f6a5..0b1618b2a 100644 --- a/test/numeric/Jamfile.v2 +++ b/test/numeric/Jamfile.v2 @@ -7,18 +7,23 @@ import testing ; +import ../../config/checks/config : requires ; use-project boost : $(BOOST_ROOT) ; project : requirements - /boost/test//boost_unit_test_framework BOOST_ALL_NO_LIB=1 - ../../include + # use test library + /boost//unit_test_framework static clang:-Wno-unused-variable - -# -D_SCL_SECURE_NO_WARNINGS + # -D_SCL_SECURE_NO_WARNINGS + extra + msvc:on + clang:on + gcc:on + [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ; test-suite "odeint" diff --git a/test/regression/Jamfile.v2 b/test/regression/Jamfile.v2 index c476822f3..4fb30ec2c 100644 --- a/test/regression/Jamfile.v2 +++ b/test/regression/Jamfile.v2 @@ -13,20 +13,24 @@ use-project boost : $(BOOST_ROOT) ; project : requirements - /boost/test//boost_unit_test_framework BOOST_ALL_NO_LIB=1 - ../../include + # use test library + /boost//unit_test_framework static clang:-Wno-unused-variable - -# -D_SCL_SECURE_NO_WARNINGS + # -D_SCL_SECURE_NO_WARNINGS + extra + msvc:on + clang:on + gcc:on + [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ; test-suite "odeint" : - [ run regression_147.cpp ] - [ compile regression_149.cpp ] + [ run regression_147.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] + [ compile regression_149.cpp : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] [ run regression_168.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] - [ run regression_189.cpp ] + [ run regression_189.cpp : : : [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] : valgrind ; From e404092710334f52974fa843c6279ec80e292c6f Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 14:24:43 +0100 Subject: [PATCH 14/35] Update boost.test header --- test/fusion_algebra.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fusion_algebra.cpp b/test/fusion_algebra.cpp index cc63fa921..9c640659a 100644 --- a/test/fusion_algebra.cpp +++ b/test/fusion_algebra.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include From 9182d6b58bf05f6e6eaba444161b4edd426a0c32 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 15:36:56 +0100 Subject: [PATCH 15/35] Fix pop without push for older clang --- include/boost/numeric/odeint/algebra/multi_array_algebra.hpp | 4 ++-- .../boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp | 4 ++-- include/boost/numeric/odeint/stepper/rosenbrock4.hpp | 4 ++-- include/boost/numeric/odeint/util/ublas_wrapper.hpp | 4 ++-- test/integrate_implicit.cpp | 4 ++-- test/is_resizeable.cpp | 4 ++-- test/numeric/order_quadrature_formula.cpp | 4 ++-- test/runge_kutta_concepts.cpp | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp index 1ab3beb46..fa5090b4b 100644 --- a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp +++ b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp @@ -152,9 +152,9 @@ struct algebra_dispatcher< boost::multi_array< T , N > > } // namespace numeric } // namespace boost -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp index 145586e7c..29b390269 100644 --- a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp +++ b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp @@ -320,9 +320,9 @@ public : } // numeric } // boost -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp index d31409673..6bca6810b 100644 --- a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp +++ b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp @@ -354,9 +354,9 @@ class rosenbrock4 } // namespace numeric } // namespace boost -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/include/boost/numeric/odeint/util/ublas_wrapper.hpp b/include/boost/numeric/odeint/util/ublas_wrapper.hpp index 0bbd6bc31..dc95d85af 100644 --- a/include/boost/numeric/odeint/util/ublas_wrapper.hpp +++ b/include/boost/numeric/odeint/util/ublas_wrapper.hpp @@ -304,9 +304,9 @@ struct state_wrapper< boost::numeric::ublas::permutation_matrix< T , A > > // wi } } } -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/test/integrate_implicit.cpp b/test/integrate_implicit.cpp index 77390c915..4087e3083 100644 --- a/test/integrate_implicit.cpp +++ b/test/integrate_implicit.cpp @@ -244,9 +244,9 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( integrate_n_steps_test_case , Stepper, simple_ste BOOST_AUTO_TEST_SUITE_END() -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/test/is_resizeable.cpp b/test/is_resizeable.cpp index bcabbca5a..51f611e1a 100644 --- a/test/is_resizeable.cpp +++ b/test/is_resizeable.cpp @@ -126,9 +126,9 @@ BOOST_AUTO_TEST_CASE( test_my_seq2 ) BOOST_CHECK( is_resizeable< my_seq2< double > >::value ); } -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/test/numeric/order_quadrature_formula.cpp b/test/numeric/order_quadrature_formula.cpp index deedac117..dd4701d7e 100644 --- a/test/numeric/order_quadrature_formula.cpp +++ b/test/numeric/order_quadrature_formula.cpp @@ -203,9 +203,9 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( adams_bashforth_moultion_test , Stepper, abm_step BOOST_AUTO_TEST_SUITE_END() -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/test/runge_kutta_concepts.cpp b/test/runge_kutta_concepts.cpp index e7a421cfe..5004264dd 100644 --- a/test/runge_kutta_concepts.cpp +++ b/test/runge_kutta_concepts.cpp @@ -227,9 +227,9 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( stepper_test2 , Stepper, stepper_combinations2 ) BOOST_AUTO_TEST_SUITE_END() -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) +#elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) From dc862f67a9876c5c2e11e0646d218f796e54d9ef Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 16:12:27 +0100 Subject: [PATCH 16/35] Fix clang versioning of -Wreorder-ctor --- include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp | 4 ++-- .../boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp b/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp index 367bfec88..4a77f65d7 100644 --- a/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp +++ b/include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp @@ -89,7 +89,7 @@ class bulirsch_stoer { const static size_t m_k_max = 8; // Claims m_error_checker will be init after m_max_dt -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wreorder-ctor" #elif defined(__GNUC__) @@ -135,7 +135,7 @@ class bulirsch_stoer { reset(); } -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop #elif defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp index 56c98ef58..6589e980c 100644 --- a/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp +++ b/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp @@ -96,7 +96,7 @@ class bulirsch_stoer_dense_out { // Claims m_error_checker will be init after m_max_dt -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wreorder-ctor" #elif defined(__GNUC__) @@ -849,7 +849,7 @@ class bulirsch_stoer_dense_out { } } -#if defined(__clang__) +#if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop #elif defined(__GNUC__) #pragma GCC diagnostic pop From 9f1b3d6f0f22696b40dcd8b2a0fe53396ef7d059 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 18 Dec 2023 16:16:43 +0100 Subject: [PATCH 17/35] Fix clang versioning of -Wdeprecated-copy --- include/boost/numeric/odeint/algebra/multi_array_algebra.hpp | 5 ++++- .../boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp | 5 ++++- include/boost/numeric/odeint/stepper/rosenbrock4.hpp | 5 ++++- include/boost/numeric/odeint/util/ublas_wrapper.hpp | 5 ++++- test/integrate_implicit.cpp | 5 ++++- test/is_resizeable.cpp | 5 ++++- test/numeric/order_quadrature_formula.cpp | 5 ++++- test/runge_kutta_concepts.cpp | 5 ++++- 8 files changed, 32 insertions(+), 8 deletions(-) diff --git a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp index fa5090b4b..bbc456ff8 100644 --- a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp +++ b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp @@ -18,9 +18,12 @@ #ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED #define BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED -#if defined(__clang__) && __clang_major__ >= 10 +#if defined(__clang__) && __clang_major__ >= 13 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" diff --git a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp index 29b390269..2478f6f32 100644 --- a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp +++ b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp @@ -20,9 +20,12 @@ #define BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 10 +#if defined(__clang__) && __clang_major__ >= 13 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" diff --git a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp index 6bca6810b..7ecc56260 100644 --- a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp +++ b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp @@ -21,9 +21,12 @@ #define BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 10 +#if defined(__clang__) && __clang_major__ >= 13 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" diff --git a/include/boost/numeric/odeint/util/ublas_wrapper.hpp b/include/boost/numeric/odeint/util/ublas_wrapper.hpp index dc95d85af..044076cb3 100644 --- a/include/boost/numeric/odeint/util/ublas_wrapper.hpp +++ b/include/boost/numeric/odeint/util/ublas_wrapper.hpp @@ -19,9 +19,12 @@ #define BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 10 +#if defined(__clang__) && __clang_major__ >= 13 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" diff --git a/test/integrate_implicit.cpp b/test/integrate_implicit.cpp index 4087e3083..2adda6ea3 100644 --- a/test/integrate_implicit.cpp +++ b/test/integrate_implicit.cpp @@ -17,9 +17,12 @@ #define BOOST_TEST_MODULE odeint_integrate_functions_implicit // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 10 +#if defined(__clang__) && __clang_major__ >= 13 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" diff --git a/test/is_resizeable.cpp b/test/is_resizeable.cpp index 51f611e1a..a4b5f5eaa 100644 --- a/test/is_resizeable.cpp +++ b/test/is_resizeable.cpp @@ -21,9 +21,12 @@ #endif // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 10 +#if defined(__clang__) && __clang_major__ >= 13 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" diff --git a/test/numeric/order_quadrature_formula.cpp b/test/numeric/order_quadrature_formula.cpp index dd4701d7e..166bc6953 100644 --- a/test/numeric/order_quadrature_formula.cpp +++ b/test/numeric/order_quadrature_formula.cpp @@ -15,9 +15,12 @@ #pragma warning(disable:4996) #endif -#if defined(__clang__) && __clang_major__ >= 10 +#if defined(__clang__) && __clang_major__ >= 13 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" diff --git a/test/runge_kutta_concepts.cpp b/test/runge_kutta_concepts.cpp index 5004264dd..21d58263c 100644 --- a/test/runge_kutta_concepts.cpp +++ b/test/runge_kutta_concepts.cpp @@ -22,9 +22,12 @@ #endif // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 10 +#if defined(__clang__) && __clang_major__ >= 13 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" From bf6bed433bca9dedddb4219250e2d1f6da72f487 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 09:53:25 +0100 Subject: [PATCH 18/35] Fix maybe uninitialized --- test/resizing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/resizing.cpp b/test/resizing.cpp index 5428749ff..224960a2f 100644 --- a/test/resizing.cpp +++ b/test/resizing.cpp @@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_resize , T, resize_check_types ) adjust_size_count = 0; stepper_type stepper; - test_array_type x; + test_array_type x {}; stepper.do_step( constant_system , x , 0.0 , 0.1 ); stepper.do_step( constant_system , x , 0.0 , 0.1 ); stepper.do_step( constant_system , x , 0.0 , 0.1 ); From 2492a5bc5d0eb842864ba41e40fa1bfcf3f13f35 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 09:55:17 +0100 Subject: [PATCH 19/35] Ignore Wmaybe-uninitialized coming from boost.multi_array --- .../boost/numeric/odeint/algebra/multi_array_algebra.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp index bbc456ff8..275807544 100644 --- a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp +++ b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp @@ -27,6 +27,10 @@ #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#elif defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) @@ -157,7 +161,7 @@ struct algebra_dispatcher< boost::multi_array< T , N > > #if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) && __GNUC__ >= 9 +#elif defined(__GNUC__) && __GNUC__ >= 5 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) From 5ad846aa87eef8ebf4ba813be5564a78606288c9 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 09:57:35 +0100 Subject: [PATCH 20/35] Fix macro for apple clang --- include/boost/numeric/odeint/algebra/multi_array_algebra.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp index 275807544..8d3d17104 100644 --- a/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp +++ b/include/boost/numeric/odeint/algebra/multi_array_algebra.hpp @@ -18,7 +18,7 @@ #ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED #define BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 From e5130f4e37d9bd0d683338a2afb1e23b2dbbdfdd Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 09:58:19 +0100 Subject: [PATCH 21/35] Disable werror on msvc since boost.test won't compile --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 68d079d5e..887d54aab 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -28,7 +28,7 @@ project clang:-Wno-unused-variable # -D_SCL_SECURE_NO_WARNINGS extra - msvc:on + # msvc:on clang:on gcc:on [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] From 140354e0913e03146f5fa5a687ff47df5b1ff5bd Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 10:23:08 +0100 Subject: [PATCH 22/35] Fix clang 5 initialization of std::array --- test/times_time_iterator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/times_time_iterator.cpp b/test/times_time_iterator.cpp index 8b6b29431..d4b5be70b 100644 --- a/test/times_time_iterator.cpp +++ b/test/times_time_iterator.cpp @@ -51,7 +51,7 @@ typedef mpl::vector< , dummy_dense_output_stepper > dummy_steppers; -std::array times = { 0.0 , 0.1, 0.2, 0.3 }; +std::array times = {{ 0.0 , 0.1, 0.2, 0.3 }}; typedef std::array::iterator time_iterator_type; typedef std::vector< std::pair< state_type , time_type > > result_vector; From 74830c0951c75a0e389418391bdb801c1c00d049 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 10:23:24 +0100 Subject: [PATCH 23/35] Ignore erroneous -Wmaybe-uninitialized --- test/adaptive_iterator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/adaptive_iterator.cpp b/test/adaptive_iterator.cpp index a092388f4..5110c0326 100644 --- a/test/adaptive_iterator.cpp +++ b/test/adaptive_iterator.cpp @@ -48,6 +48,10 @@ typedef mpl::vector< , dummy_dense_output_stepper > dummy_steppers; +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif BOOST_AUTO_TEST_CASE( copy_controlled_stepper_iterator ) { @@ -72,6 +76,10 @@ BOOST_AUTO_TEST_CASE( copy_controlled_stepper_iterator ) } +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif + BOOST_AUTO_TEST_CASE( copy_dense_output_stepper_iterator ) { typedef adaptive_iterator< dummy_dense_output_stepper , empty_system , state_type > iterator_type; From 4f51498c2cb99008a002c7bfec189ab33b14b566 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 10:43:15 +0100 Subject: [PATCH 24/35] Collected initialization fixes --- test/const_step_time_iterator.cpp | 9 +++++++++ test/controlled_adams_bashforth_moulton.cpp | 18 +++++++++--------- test/generic_error_stepper.cpp | 2 +- test/integrate_times.cpp | 8 ++++++++ test/numeric/order_quadrature_formula.cpp | 10 +++++++++- test/regression/regression_147.cpp | 2 +- test/resizing.cpp | 2 +- test/rosenbrock4_mp.cpp | 10 ++++++++++ test/runge_kutta_controlled_concepts.cpp | 2 +- test/times_time_iterator.cpp | 9 ++++++++- 10 files changed, 57 insertions(+), 15 deletions(-) diff --git a/test/const_step_time_iterator.cpp b/test/const_step_time_iterator.cpp index e1d2d729b..5d210d4c6 100644 --- a/test/const_step_time_iterator.cpp +++ b/test/const_step_time_iterator.cpp @@ -78,6 +78,11 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( assignment_stepper_iterator , Stepper , dummy_ste BOOST_CHECK( iter1.same( iter2 ) ); } +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + BOOST_AUTO_TEST_CASE_TEMPLATE( stepper_iterator_factory , Stepper , dummy_steppers ) { Stepper stepper; @@ -92,6 +97,10 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( stepper_iterator_factory , Stepper , dummy_steppe BOOST_CHECK_CLOSE( x[0] , 3.5 , 1.0e-13 ); } +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif + BOOST_AUTO_TEST_CASE_TEMPLATE( stepper_range , Stepper , dummy_steppers ) { Stepper stepper; diff --git a/test/controlled_adams_bashforth_moulton.cpp b/test/controlled_adams_bashforth_moulton.cpp index d10c4443f..55adb0470 100644 --- a/test/controlled_adams_bashforth_moulton.cpp +++ b/test/controlled_adams_bashforth_moulton.cpp @@ -29,15 +29,15 @@ BOOST_AUTO_TEST_SUITE( controlled_adams_bashforth_moulton_test ) BOOST_AUTO_TEST_CASE( test_instantiation ) { - controlled_adams_bashforth_moulton > s1; - controlled_adams_bashforth_moulton > s2; - controlled_adams_bashforth_moulton > s3; - controlled_adams_bashforth_moulton > s4; - controlled_adams_bashforth_moulton > s5; - controlled_adams_bashforth_moulton > s6; - controlled_adams_bashforth_moulton > s7; - controlled_adams_bashforth_moulton > s8; - controlled_adams_bashforth_moulton > s9; + controlled_adams_bashforth_moulton > s1 {}; + controlled_adams_bashforth_moulton > s2 {}; + controlled_adams_bashforth_moulton > s3 {}; + controlled_adams_bashforth_moulton > s4 {}; + controlled_adams_bashforth_moulton > s5 {}; + controlled_adams_bashforth_moulton > s6 {}; + controlled_adams_bashforth_moulton > s7 {}; + controlled_adams_bashforth_moulton > s8 {}; + controlled_adams_bashforth_moulton > s9 {}; state_type x = {{ 10.0 }}; value_type t = 0.0 , dt = 0.01; diff --git a/test/generic_error_stepper.cpp b/test/generic_error_stepper.cpp index d71295263..f9c9c6276 100644 --- a/test/generic_error_stepper.cpp +++ b/test/generic_error_stepper.cpp @@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE( test_generic_error_stepper ) error_rk_generic_type rk_generic_( a , b , b2 , c ); error_rk_generic_type rk_generic = rk_generic_; - error_rk54_ck_generic_type rk54_ck_generic_; + error_rk54_ck_generic_type rk54_ck_generic_ {}; error_rk54_ck_generic_type rk54_ck_generic = rk54_ck_generic_; //std::cout << stepper; diff --git a/test/integrate_times.cpp b/test/integrate_times.cpp index ab6d68b01..6f5a08bf3 100644 --- a/test/integrate_times.cpp +++ b/test/integrate_times.cpp @@ -75,6 +75,11 @@ struct push_back_time BOOST_AUTO_TEST_SUITE( integrate_times_test ) +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + BOOST_AUTO_TEST_CASE( test_integrate_times ) { @@ -144,6 +149,9 @@ BOOST_AUTO_TEST_CASE( test_integrate_times ) } +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif BOOST_AUTO_TEST_CASE( test_integrate_times_ranges ) { diff --git a/test/numeric/order_quadrature_formula.cpp b/test/numeric/order_quadrature_formula.cpp index 166bc6953..52db76310 100644 --- a/test/numeric/order_quadrature_formula.cpp +++ b/test/numeric/order_quadrature_formula.cpp @@ -24,6 +24,10 @@ #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#elif defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) @@ -67,6 +71,10 @@ struct monomial } }; +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif /* generic test for all steppers that support integrate_const */ template< class Stepper > @@ -208,7 +216,7 @@ BOOST_AUTO_TEST_SUITE_END() #if defined(__clang__) && __clang_major__ >= 10 #pragma clang diagnostic pop -#elif defined(__GNUC__) && __GNUC__ >= 9 +#elif defined(__GNUC__) && __GNUC__ >= 5 #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/test/regression/regression_147.cpp b/test/regression/regression_147.cpp index 7c07d5b2a..c90bb1666 100644 --- a/test/regression/regression_147.cpp +++ b/test/regression/regression_147.cpp @@ -55,7 +55,7 @@ struct perform_init_test state_type x = 0; Stepper stepper; - InitStepper init_stepper; + InitStepper init_stepper {}; stepper.initialize( init_stepper, rhs, x, t, dt ); // ab-stepper needs order-1 init steps: t and x should be (order-1)*dt diff --git a/test/resizing.cpp b/test/resizing.cpp index 224960a2f..c75a5ef43 100644 --- a/test/resizing.cpp +++ b/test/resizing.cpp @@ -97,7 +97,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_resize , T, resize_check_types ) const size_t multiplicity = mpl::at< T , mpl::int_< 2 > >::type::value; adjust_size_count = 0; - stepper_type stepper; + stepper_type stepper {}; test_array_type x {}; stepper.do_step( constant_system , x , 0.0 , 0.1 ); stepper.do_step( constant_system , x , 0.0 , 0.1 ); diff --git a/test/rosenbrock4_mp.cpp b/test/rosenbrock4_mp.cpp index 10c0e9370..8cfa1795a 100644 --- a/test/rosenbrock4_mp.cpp +++ b/test/rosenbrock4_mp.cpp @@ -20,6 +20,12 @@ #pragma warning(disable:4996) #endif +// Stems from Boost.Multiprecision +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpessimizing-move" +#endif + #define BOOST_TEST_MODULE odeint_rosenbrock4 #include @@ -133,3 +139,7 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_copy_dense_output ) } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif diff --git a/test/runge_kutta_controlled_concepts.cpp b/test/runge_kutta_controlled_concepts.cpp index cd5292b41..c00c893a2 100644 --- a/test/runge_kutta_controlled_concepts.cpp +++ b/test/runge_kutta_controlled_concepts.cpp @@ -163,7 +163,7 @@ struct perform_controlled_stepper_test< ControlledStepper , boost::array > using std::abs; array_type x; x[0] = 2.0; - ControlledStepper controlled_stepper; + ControlledStepper controlled_stepper {}; constant_system_functor_standard sys; #ifndef _MSC_VER // dont run this for MSVC due to compiler bug 697006 diff --git a/test/times_time_iterator.cpp b/test/times_time_iterator.cpp index d4b5be70b..6e50facef 100644 --- a/test/times_time_iterator.cpp +++ b/test/times_time_iterator.cpp @@ -83,7 +83,10 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( assignment_stepper_iterator , Stepper , dummy_ste BOOST_CHECK( iter1.same( iter2 ) ); } - +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif BOOST_AUTO_TEST_CASE_TEMPLATE( stepper_iterator_factory , Stepper , dummy_steppers ) { @@ -101,6 +104,10 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( stepper_iterator_factory , Stepper , dummy_steppe BOOST_CHECK_CLOSE( x[0] , 1.75 , 1.0e-13 ); } +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif + BOOST_AUTO_TEST_CASE_TEMPLATE( stepper_range , Stepper , dummy_steppers ) { std::cout << "range" << std::endl; From d9ffee63f45039ac4932331d503e91b00032662b Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 11:14:09 +0100 Subject: [PATCH 25/35] Fix additional instance of clang 5 std::array initialization --- test/std_array.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/std_array.cpp b/test/std_array.cpp index 5c4f67a83..f8cbe40f2 100644 --- a/test/std_array.cpp +++ b/test/std_array.cpp @@ -35,7 +35,7 @@ BOOST_AUTO_TEST_SUITE( unwrap_reference_test ) BOOST_AUTO_TEST_CASE( test_case ) { - state_type x = {0.0, 0.0, 0.0}; + 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 From 53d2ceb8d9571dcf601f98075c79cf05dfac9d73 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 11:48:52 +0100 Subject: [PATCH 26/35] Fix version of -Wpessimizing-move --- test/adaptive_iterator.cpp | 18 +++++++++--------- test/rosenbrock4_mp.cpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/adaptive_iterator.cpp b/test/adaptive_iterator.cpp index 5110c0326..572c86231 100644 --- a/test/adaptive_iterator.cpp +++ b/test/adaptive_iterator.cpp @@ -41,6 +41,11 @@ using namespace boost::numeric::odeint; typedef dummy_stepper::state_type state_type; typedef dummy_stepper::value_type value_type; +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + BOOST_AUTO_TEST_SUITE( adaptive_iterator_test ) typedef mpl::vector< @@ -48,11 +53,6 @@ typedef mpl::vector< , dummy_dense_output_stepper > dummy_steppers; -#if defined(__GNUC__) && __GNUC__ >= 5 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif - BOOST_AUTO_TEST_CASE( copy_controlled_stepper_iterator ) { typedef adaptive_iterator< dummy_controlled_stepper , empty_system , state_type > iterator_type; @@ -76,10 +76,6 @@ BOOST_AUTO_TEST_CASE( copy_controlled_stepper_iterator ) } -#if defined(__GNUC__) && __GNUC__ >= 5 -#pragma GCC diagnostic pop -#endif - BOOST_AUTO_TEST_CASE( copy_dense_output_stepper_iterator ) { typedef adaptive_iterator< dummy_dense_output_stepper , empty_system , state_type > iterator_type; @@ -352,3 +348,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_range_factory , Stepper , dum BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif diff --git a/test/rosenbrock4_mp.cpp b/test/rosenbrock4_mp.cpp index 8cfa1795a..5d3bcb83c 100644 --- a/test/rosenbrock4_mp.cpp +++ b/test/rosenbrock4_mp.cpp @@ -21,7 +21,7 @@ #endif // Stems from Boost.Multiprecision -#if defined(__GNUC__) && __GNUC__ >= 5 +#if defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpessimizing-move" #endif @@ -140,6 +140,6 @@ BOOST_AUTO_TEST_CASE( test_rosenbrock4_copy_dense_output ) BOOST_AUTO_TEST_SUITE_END() -#if defined(__GNUC__) && __GNUC__ >= 5 +#if defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic pop #endif From b7955fd5e2fbc1ec8d93137483276762f8272655 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 11:54:04 +0100 Subject: [PATCH 27/35] Fix GCC-7 -Wmaybe-uninitialized --- test/generic_error_stepper.cpp | 9 +++++++++ test/generic_stepper.cpp | 9 +++++++++ test/regression/regression_147.cpp | 9 +++++++++ test/resizing.cpp | 10 ++++++++++ test/trivial_state.cpp | 9 +++++++++ 5 files changed, 46 insertions(+) diff --git a/test/generic_error_stepper.cpp b/test/generic_error_stepper.cpp index f9c9c6276..eed507999 100644 --- a/test/generic_error_stepper.cpp +++ b/test/generic_error_stepper.cpp @@ -21,6 +21,11 @@ #pragma warning(disable:4996) #endif +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + #define BOOST_TEST_MODULE odeint_generic_error_stepper #include @@ -106,3 +111,7 @@ BOOST_AUTO_TEST_CASE( test_generic_error_stepper ) } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif diff --git a/test/generic_stepper.cpp b/test/generic_stepper.cpp index f1e4731c1..b2fd46c53 100644 --- a/test/generic_stepper.cpp +++ b/test/generic_stepper.cpp @@ -20,6 +20,11 @@ #pragma warning(disable:4996) #endif +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + #define BOOST_TEST_MODULE odeint_generic_stepper #include @@ -99,3 +104,7 @@ BOOST_AUTO_TEST_CASE( test_generic_stepper ) } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif diff --git a/test/regression/regression_147.cpp b/test/regression/regression_147.cpp index c90bb1666..9fb547a54 100644 --- a/test/regression/regression_147.cpp +++ b/test/regression/regression_147.cpp @@ -20,6 +20,11 @@ #pragma warning(disable:4996) #endif +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + #define BOOST_TEST_MODULE odeint_regression_147 #include @@ -86,3 +91,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( init_test , InitStepper, } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif diff --git a/test/resizing.cpp b/test/resizing.cpp index c75a5ef43..45fad04d4 100644 --- a/test/resizing.cpp +++ b/test/resizing.cpp @@ -20,6 +20,11 @@ #pragma warning(disable:4996) #endif +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + #define BOOST_TEST_MODULE odeint_resize #include @@ -109,3 +114,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_resize , T, resize_check_types ) BOOST_AUTO_TEST_SUITE_END() + + +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif diff --git a/test/trivial_state.cpp b/test/trivial_state.cpp index 2f96d2653..53cdb6c2a 100644 --- a/test/trivial_state.cpp +++ b/test/trivial_state.cpp @@ -22,6 +22,11 @@ #pragma warning(disable:4996) #endif +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + #define BOOST_TEST_MODULE odeint_trivial_state #include @@ -107,3 +112,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_integrate , T , error_stepper_types ) } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif From 6d2759ebf4601325d23b2bce1c5a7292af55bea1 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 12:44:23 +0100 Subject: [PATCH 28/35] Add default init --- .../boost/numeric/odeint/algebra/detail/for_each.hpp | 7 +++++++ .../odeint/stepper/explicit_error_generic_rk.hpp | 4 ++-- .../numeric/odeint/util/detail/less_with_sign.hpp | 10 ++++++++++ test/Jamfile.v2 | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/odeint/algebra/detail/for_each.hpp b/include/boost/numeric/odeint/algebra/detail/for_each.hpp index 5387a47db..27cf62205 100644 --- a/include/boost/numeric/odeint/algebra/detail/for_each.hpp +++ b/include/boost/numeric/odeint/algebra/detail/for_each.hpp @@ -23,6 +23,10 @@ namespace numeric { namespace odeint { namespace detail { +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" +#endif template< class Iterator1 , class Operation > inline void for_each1( Iterator1 first1 , Iterator1 last1 , Operation op ) @@ -155,6 +159,9 @@ namespace detail { op( *first1++ , *first2++ , *first3++ , *first4++ , *first5++ , *first6++ , *first7++ , *first8++ , *first9++ , *first10++ , *first11++ , *first12++ , *first13++ , *first14++ , *first15++ ); } +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif } // detail } // odeint diff --git a/include/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp b/include/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp index 3c59810b6..be4c1c257 100644 --- a/include/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp +++ b/include/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp @@ -164,8 +164,8 @@ class explicit_error_generic_rk : public explicit_error_stepper_base resizer_type m_resizer; - wrapped_state_type m_x_tmp; - wrapped_deriv_type m_F[StageCount-1]; + wrapped_state_type m_x_tmp {}; + wrapped_deriv_type m_F[StageCount-1] {}; }; diff --git a/include/boost/numeric/odeint/util/detail/less_with_sign.hpp b/include/boost/numeric/odeint/util/detail/less_with_sign.hpp index 3ffa7ca17..c03ee255a 100644 --- a/include/boost/numeric/odeint/util/detail/less_with_sign.hpp +++ b/include/boost/numeric/odeint/util/detail/less_with_sign.hpp @@ -26,6 +26,11 @@ namespace numeric { namespace odeint { namespace detail { +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + /** * return t1 < t2 if dt > 0 and t1 > t2 if dt < 0 with epsilon accuracy */ @@ -73,6 +78,11 @@ T max_abs( T t1 , T t2 ) else return min BOOST_PREVENT_MACRO_SUBSTITUTION ( t1 , t2 ); } + +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif + } } } } #endif diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 887d54aab..ddc960084 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -27,6 +27,7 @@ project static clang:-Wno-unused-variable # -D_SCL_SECURE_NO_WARNINGS + _CRT_SECURE_NO_WARNINGS extra # msvc:on clang:on From 70fbe0962e78a97d7c4114ad47c77fc52da4c2b4 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 12:45:50 +0100 Subject: [PATCH 29/35] Ignore ublas deprecated copy --- test/regression/regression_189.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/regression/regression_189.cpp b/test/regression/regression_189.cpp index d99660115..ef7ad4820 100644 --- a/test/regression/regression_189.cpp +++ b/test/regression/regression_189.cpp @@ -15,6 +15,11 @@ #define BOOST_TEST_MODULE odeint_regression_189 +#if defined(__GNUC__) && __GNUC__ >= 9 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy" +#endif + #include #include @@ -76,3 +81,7 @@ BOOST_AUTO_TEST_CASE( regression_189 ) BOOST_CHECK_EQUAL( num_of_steps2 , num_of_steps_expected ); } + +#if defined(__GNUC__) && __GNUC__ >= 9 +#pragma GCC diagnostic pop +#endif From 3adaad93f93511d4413f4a69634391a0432aac8e Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 13:25:47 +0100 Subject: [PATCH 30/35] More maybe-uninitialized --- .../numeric/odeint/stepper/explicit_generic_rk.hpp | 4 ++-- test/controlled_adams_bashforth_moulton.cpp | 10 +++++++++- test/integrate_implicit.cpp | 1 + test/integrate_times.cpp | 9 +++++++++ test/integrators_symplectic.cpp | 9 +++++++++ 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp b/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp index f8edc201a..9776b7382 100644 --- a/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp +++ b/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp @@ -178,8 +178,8 @@ class explicit_generic_rk : public explicit_stepper_base resizer_type m_resizer; - wrapped_state_type m_x_tmp; - wrapped_deriv_type m_F[StageCount-1]; + wrapped_state_type m_x_tmp {}; + wrapped_deriv_type m_F[StageCount-1] {}; }; diff --git a/test/controlled_adams_bashforth_moulton.cpp b/test/controlled_adams_bashforth_moulton.cpp index 55adb0470..c2f58a9fb 100644 --- a/test/controlled_adams_bashforth_moulton.cpp +++ b/test/controlled_adams_bashforth_moulton.cpp @@ -2,6 +2,10 @@ #ifdef BOOST_MSVC #pragma warning(disable:4996) #endif +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif #define BOOST_TEST_MODULE odeint_controlled_adams_bashforth_moulton @@ -53,4 +57,8 @@ BOOST_AUTO_TEST_CASE( test_instantiation ) s9.try_step(const_sys(), x, t, dt); } -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file +BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif diff --git a/test/integrate_implicit.cpp b/test/integrate_implicit.cpp index 2adda6ea3..d5a4b53e6 100644 --- a/test/integrate_implicit.cpp +++ b/test/integrate_implicit.cpp @@ -26,6 +26,7 @@ #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) diff --git a/test/integrate_times.cpp b/test/integrate_times.cpp index 6f5a08bf3..c16213e57 100644 --- a/test/integrate_times.cpp +++ b/test/integrate_times.cpp @@ -14,6 +14,11 @@ copy at http://www.boost.org/LICENSE_1_0.txt) */ +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + #define BOOST_TEST_MODULE odeint_integrate_times #include @@ -253,3 +258,7 @@ BOOST_AUTO_TEST_CASE( test_integrate_times_overshoot ) } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif diff --git a/test/integrators_symplectic.cpp b/test/integrators_symplectic.cpp index 2c2861950..8fb42721f 100644 --- a/test/integrators_symplectic.cpp +++ b/test/integrators_symplectic.cpp @@ -19,6 +19,11 @@ #pragma warning(disable:4996) #endif +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + #define BOOST_TEST_MODULE odeint_iterators_symplectic #define BOOST_FUSION_INVOKE_MAX_ARITY 15 @@ -72,3 +77,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_integrate_const , Stepper , complete_stepper } BOOST_AUTO_TEST_SUITE_END() + +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif From 2bee137835a116c8f477093c33eae26058eccb42 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 13:31:14 +0100 Subject: [PATCH 31/35] Suppress deprecated-declarations from ublas in headers --- .../odeint/algebra/algebra_dispatcher.hpp | 24 +++++++++++++++++++ .../numeric/odeint/stepper/implicit_euler.hpp | 21 ++++++++++++++++ .../numeric/odeint/stepper/rosenbrock4.hpp | 1 + .../numeric/odeint/util/ublas_wrapper.hpp | 1 + 4 files changed, 47 insertions(+) diff --git a/include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp b/include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp index 88cf159e0..11e895ded 100644 --- a/include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp +++ b/include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp @@ -22,6 +22,21 @@ #include #include +#if defined(__clang__) && __clang_major__ >= 13 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" +#elif defined(__GNUC__) && __GNUC__ >= 9 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif + #include #include @@ -104,6 +119,15 @@ struct algebra_dispatcher< std::array< T , N > > } } } +#if defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic pop +#elif defined(__GNUC__) && __GNUC__ >= 9 +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif + + #endif diff --git a/include/boost/numeric/odeint/stepper/implicit_euler.hpp b/include/boost/numeric/odeint/stepper/implicit_euler.hpp index e1c64164b..8ce838858 100644 --- a/include/boost/numeric/odeint/stepper/implicit_euler.hpp +++ b/include/boost/numeric/odeint/stepper/implicit_euler.hpp @@ -19,6 +19,20 @@ #ifndef BOOST_NUMERIC_ODEINT_STEPPER_IMPLICIT_EULER_HPP_INCLUDED #define BOOST_NUMERIC_ODEINT_STEPPER_IMPLICIT_EULER_HPP_INCLUDED +#if defined(__clang__) && __clang_major__ >= 13 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#elif defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy" +#elif defined(__GNUC__) && __GNUC__ >= 9 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 5267) +#endif #include @@ -166,5 +180,12 @@ class implicit_euler } // numeric } // boost +#if defined(__clang__) && __clang_major__ >= 10 +#pragma clang diagnostic pop +#elif defined(__GNUC__) && __GNUC__ >= 9 +#pragma GCC diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif #endif // BOOST_NUMERIC_ODEINT_STEPPER_IMPLICIT_EULER_HPP_INCLUDED diff --git a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp index 7ecc56260..b279d5792 100644 --- a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp +++ b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp @@ -30,6 +30,7 @@ #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) diff --git a/include/boost/numeric/odeint/util/ublas_wrapper.hpp b/include/boost/numeric/odeint/util/ublas_wrapper.hpp index 044076cb3..1f7548a04 100644 --- a/include/boost/numeric/odeint/util/ublas_wrapper.hpp +++ b/include/boost/numeric/odeint/util/ublas_wrapper.hpp @@ -28,6 +28,7 @@ #elif defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) From 27bd3de5f2950e8453bd5f86c44ca28aa9c877c3 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 13:37:09 +0100 Subject: [PATCH 32/35] Fix another instance of deprecated-declarations --- include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp | 4 ++-- test/integrate_implicit.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp b/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp index 9776b7382..f8edc201a 100644 --- a/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp +++ b/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp @@ -178,8 +178,8 @@ class explicit_generic_rk : public explicit_stepper_base resizer_type m_resizer; - wrapped_state_type m_x_tmp {}; - wrapped_deriv_type m_F[StageCount-1] {}; + wrapped_state_type m_x_tmp; + wrapped_deriv_type m_F[StageCount-1]; }; diff --git a/test/integrate_implicit.cpp b/test/integrate_implicit.cpp index d5a4b53e6..4183287c8 100644 --- a/test/integrate_implicit.cpp +++ b/test/integrate_implicit.cpp @@ -27,6 +27,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy" #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 5267) From 04012da06ebebe1c9548a3a34ded7bf5ab0b9ea4 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Fri, 22 Dec 2023 05:40:44 -0500 Subject: [PATCH 33/35] Disable MSVC warning C4127 --- include/boost/numeric/odeint/version.hpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/odeint/version.hpp b/include/boost/numeric/odeint/version.hpp index 379c90659..befc9b9c2 100644 --- a/include/boost/numeric/odeint/version.hpp +++ b/include/boost/numeric/odeint/version.hpp @@ -19,7 +19,7 @@ #include #include - +#include #define ODEINT_MAJOR_VERSION 2 #define ODEINT_MINOR_VERSION 2 @@ -39,14 +39,26 @@ const int patch_level = ODEINT_PATCH_LEVEL ; } +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 4127) +#endif + inline std::string get_version_string( void ) { std::ostringstream str; str << "v" << version::major << "." << version::minor; - if( version::patch_level != 0 ) str << "_" << version::patch_level; + BOOST_IF_CONSTEXPR( version::patch_level != 0 ) + { + str << "_" << version::patch_level; + } + return str.str(); } +#ifdef _MSC_VER +# pragma warning(pop) +#endif } } From 34cc7eb40eb25cf8faaf90a5c180855449c463e3 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Fri, 22 Dec 2023 05:44:14 -0500 Subject: [PATCH 34/35] Ignore GCC 7 -Wuninitalized --- .../boost/numeric/odeint/stepper/explicit_generic_rk.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp b/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp index f8edc201a..497d0fbab 100644 --- a/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp +++ b/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp @@ -78,6 +78,10 @@ struct stage_wrapper }; #endif +#if defined(__GNUC__) && __GNUC__ >= 7 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wuninitialized" +#endif template< size_t StageCount, @@ -183,7 +187,9 @@ class explicit_generic_rk : public explicit_stepper_base }; - +#if defined(__GNUC__) && __GNUC__ >= 7 +# pragma GCC diagnostic pop +#endif /*********** DOXYGEN *************/ From b53cf6070bac421f02b56cc2e1bc3c55c0fd945e Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Fri, 22 Dec 2023 05:45:45 -0500 Subject: [PATCH 35/35] Fix macro logic for Apple clang --- include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp | 2 +- .../boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp | 2 +- include/boost/numeric/odeint/stepper/implicit_euler.hpp | 2 +- include/boost/numeric/odeint/stepper/rosenbrock4.hpp | 2 +- include/boost/numeric/odeint/util/ublas_wrapper.hpp | 2 +- test/integrate_implicit.cpp | 2 +- test/is_resizeable.cpp | 2 +- test/numeric/order_quadrature_formula.cpp | 2 +- test/runge_kutta_concepts.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp b/include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp index 11e895ded..025cd46a4 100644 --- a/include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp +++ b/include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp @@ -22,7 +22,7 @@ #include #include -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 diff --git a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp index 2478f6f32..4b8f6b1fa 100644 --- a/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp +++ b/include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp @@ -20,7 +20,7 @@ #define BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 diff --git a/include/boost/numeric/odeint/stepper/implicit_euler.hpp b/include/boost/numeric/odeint/stepper/implicit_euler.hpp index 8ce838858..efd84c9bf 100644 --- a/include/boost/numeric/odeint/stepper/implicit_euler.hpp +++ b/include/boost/numeric/odeint/stepper/implicit_euler.hpp @@ -19,7 +19,7 @@ #ifndef BOOST_NUMERIC_ODEINT_STEPPER_IMPLICIT_EULER_HPP_INCLUDED #define BOOST_NUMERIC_ODEINT_STEPPER_IMPLICIT_EULER_HPP_INCLUDED -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 diff --git a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp index b279d5792..b2071e804 100644 --- a/include/boost/numeric/odeint/stepper/rosenbrock4.hpp +++ b/include/boost/numeric/odeint/stepper/rosenbrock4.hpp @@ -21,7 +21,7 @@ #define BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 diff --git a/include/boost/numeric/odeint/util/ublas_wrapper.hpp b/include/boost/numeric/odeint/util/ublas_wrapper.hpp index 1f7548a04..b422345da 100644 --- a/include/boost/numeric/odeint/util/ublas_wrapper.hpp +++ b/include/boost/numeric/odeint/util/ublas_wrapper.hpp @@ -19,7 +19,7 @@ #define BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 diff --git a/test/integrate_implicit.cpp b/test/integrate_implicit.cpp index 4183287c8..9893ce7e8 100644 --- a/test/integrate_implicit.cpp +++ b/test/integrate_implicit.cpp @@ -17,7 +17,7 @@ #define BOOST_TEST_MODULE odeint_integrate_functions_implicit // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 diff --git a/test/is_resizeable.cpp b/test/is_resizeable.cpp index a4b5f5eaa..bd34101f6 100644 --- a/test/is_resizeable.cpp +++ b/test/is_resizeable.cpp @@ -21,7 +21,7 @@ #endif // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 diff --git a/test/numeric/order_quadrature_formula.cpp b/test/numeric/order_quadrature_formula.cpp index 52db76310..7eb9703fe 100644 --- a/test/numeric/order_quadrature_formula.cpp +++ b/test/numeric/order_quadrature_formula.cpp @@ -15,7 +15,7 @@ #pragma warning(disable:4996) #endif -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10 diff --git a/test/runge_kutta_concepts.cpp b/test/runge_kutta_concepts.cpp index 21d58263c..0e9c66433 100644 --- a/test/runge_kutta_concepts.cpp +++ b/test/runge_kutta_concepts.cpp @@ -22,7 +22,7 @@ #endif // Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153 -#if defined(__clang__) && __clang_major__ >= 13 +#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" #elif defined(__clang__) && __clang_major__ >= 10