mirror of
https://github.com/boostorg/odeint.git
synced 2025-05-09 23:24:01 +00:00
Remove use of Boost.Bind
This commit is contained in:
parent
f07b2ac947
commit
e008a015b6
@ -15,7 +15,6 @@ target_include_directories(boost_numeric_odeint INTERFACE include)
|
|||||||
target_link_libraries(boost_numeric_odeint
|
target_link_libraries(boost_numeric_odeint
|
||||||
INTERFACE
|
INTERFACE
|
||||||
Boost::assert
|
Boost::assert
|
||||||
Boost::bind
|
|
||||||
Boost::compute
|
Boost::compute
|
||||||
Boost::config
|
Boost::config
|
||||||
Boost::core
|
Boost::core
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include <boost/numeric/odeint.hpp>
|
#include <boost/numeric/odeint.hpp>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -130,7 +129,7 @@ int main( int argc , char **argv )
|
|||||||
|
|
||||||
//[ symplectic_stepper_detail_system_class_example
|
//[ symplectic_stepper_detail_system_class_example
|
||||||
harm_osc h;
|
harm_osc h;
|
||||||
rkn.do_step( make_pair( boost::bind( &harm_osc::f1 , h , _1 , _2 ) , boost::bind( &harm_osc::f2 , h , _1 , _2 ) ) ,
|
rkn.do_step( make_pair( detail::bind( &harm_osc::f1 , h , _1 , _2 ) , detail::bind( &harm_osc::f2 , h , _1 , _2 ) ) ,
|
||||||
x , t , dt );
|
x , t , dt );
|
||||||
//]
|
//]
|
||||||
}
|
}
|
||||||
|
@ -17,85 +17,19 @@
|
|||||||
#ifndef BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
|
#ifndef BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
|
||||||
#define BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
|
#define BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include <boost/numeric/odeint/config.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
#if BOOST_NUMERIC_ODEINT_CXX11
|
|
||||||
#include <functional>
|
|
||||||
#else
|
|
||||||
#define BOOST_BIND_NO_PLACEHOLDERS
|
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace boost {
|
|
||||||
namespace numeric {
|
|
||||||
namespace odeint {
|
|
||||||
namespace detail {
|
|
||||||
|
|
||||||
#if BOOST_NUMERIC_ODEINT_CXX11
|
|
||||||
|
|
||||||
using ::std::bind;
|
|
||||||
using namespace ::std::placeholders;
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
// unnamed namespace to avoid multiple declarations (#138)
|
|
||||||
namespace {
|
|
||||||
using ::boost::bind;
|
|
||||||
boost::arg<1> _1;
|
|
||||||
boost::arg<2> _2;
|
|
||||||
}
|
|
||||||
// using ::boost::bind;
|
|
||||||
// using ::_1;
|
|
||||||
// using ::_2;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
// the following is the suggested way. Unfortunately it does not work with all compilers.
|
|
||||||
|
|
||||||
#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
|
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#else
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace numeric {
|
namespace numeric {
|
||||||
namespace odeint {
|
namespace odeint {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
|
|
||||||
#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
|
|
||||||
|
|
||||||
using ::boost::bind;
|
|
||||||
using ::_1;
|
|
||||||
using ::_2;
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
using ::std::bind;
|
using ::std::bind;
|
||||||
using namespace ::std::placeholders;
|
using namespace ::std::placeholders;
|
||||||
|
|
||||||
#endif
|
} //namespace detail
|
||||||
|
} //namespace odeint
|
||||||
|
} //namespace numeric
|
||||||
}
|
} //namespace boost
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
#endif // BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
|
#endif // BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
#include <boost/type_traits/integral_constant.hpp>
|
#include <boost/type_traits/integral_constant.hpp>
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include <boost/ref.hpp>
|
#include <boost/ref.hpp>
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
#include <boost/type_traits/add_reference.hpp>
|
#include <boost/type_traits/add_reference.hpp>
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include <boost/ref.hpp>
|
#include <boost/ref.hpp>
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
#include <boost/type_traits/add_reference.hpp>
|
#include <boost/type_traits/add_reference.hpp>
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include <boost/ref.hpp>
|
#include <boost/ref.hpp>
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
#include <boost/type_traits/add_reference.hpp>
|
#include <boost/type_traits/add_reference.hpp>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user