From e9f104987164afca55d568d20c0f056a42fe57a6 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Wed, 10 Jan 2024 12:36:41 +0100 Subject: [PATCH] Fix reference wrapper for MSVC --- include/boost/numeric/odeint/config.hpp | 2 +- .../numeric/odeint/util/unwrap_reference.hpp | 25 ------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/include/boost/numeric/odeint/config.hpp b/include/boost/numeric/odeint/config.hpp index f1915825..964bb1bd 100644 --- a/include/boost/numeric/odeint/config.hpp +++ b/include/boost/numeric/odeint/config.hpp @@ -43,7 +43,7 @@ #include -#if __cplusplus >= 201103L +#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) #define BOOST_NUMERIC_ODEINT_CXX11 1 #endif diff --git a/include/boost/numeric/odeint/util/unwrap_reference.hpp b/include/boost/numeric/odeint/util/unwrap_reference.hpp index e1608783..bbe087b2 100644 --- a/include/boost/numeric/odeint/util/unwrap_reference.hpp +++ b/include/boost/numeric/odeint/util/unwrap_reference.hpp @@ -20,28 +20,16 @@ #include - - -#if BOOST_NUMERIC_ODEINT_CXX11 #include -#else -#include -#endif namespace boost { -#if BOOST_NUMERIC_ODEINT_CXX11 template class reference_wrapper; - template struct unwrap_reference; -#endif namespace numeric { namespace odeint { - -#if BOOST_NUMERIC_ODEINT_CXX11 - template struct unwrap_reference { @@ -60,24 +48,11 @@ struct unwrap_reference< boost::reference_wrapper > typedef typename boost::unwrap_reference::type type; }; -#else - -using ::boost::unwrap_reference; - -#endif - namespace detail { -#if BOOST_NUMERIC_ODEINT_CXX11 - using ::std::ref; -#else - -using ::boost::ref; - -#endif } }