2
0
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:
Matt Borland
2024-01-10 12:36:41 +01:00
parent f8964269ba
commit e9f1049871
2 changed files with 1 additions and 26 deletions

View File

@@ -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

View File

@@ -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
}
}