mirror of
https://github.com/boostorg/odeint.git
synced 2026-01-19 04:22:12 +00:00
Fix reference wrapper for MSVC
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
|
||||
#define BOOST_NUMERIC_ODEINT_CXX11 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,28 +20,16 @@
|
||||
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
|
||||
|
||||
#if BOOST_NUMERIC_ODEINT_CXX11
|
||||
#include <functional>
|
||||
#else
|
||||
#include <boost/ref.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if BOOST_NUMERIC_ODEINT_CXX11
|
||||
template<typename T> class reference_wrapper;
|
||||
|
||||
template<typename T> struct unwrap_reference;
|
||||
#endif
|
||||
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
|
||||
#if BOOST_NUMERIC_ODEINT_CXX11
|
||||
|
||||
template<typename T>
|
||||
struct unwrap_reference
|
||||
{
|
||||
@@ -60,24 +48,11 @@ struct unwrap_reference< boost::reference_wrapper<T> >
|
||||
typedef typename boost::unwrap_reference<T>::type type;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
using ::boost::unwrap_reference;
|
||||
|
||||
#endif
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
#if BOOST_NUMERIC_ODEINT_CXX11
|
||||
|
||||
using ::std::ref;
|
||||
|
||||
#else
|
||||
|
||||
using ::boost::ref;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user