Chris@16: /* Chris@16: [auto_generated] Chris@16: boost/numeric/odeint/util/unwrap_reference.hpp Chris@16: Chris@16: [begin_description] Chris@16: unwrap_reference Chris@16: [end_description] Chris@16: Chris@101: Copyright 2012-2013 Karsten Ahnert Chris@101: Copyright 2012-2013 Mario Mulansky Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. Chris@16: (See accompanying file LICENSE_1_0.txt or Chris@16: copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: */ Chris@16: Chris@16: Chris@16: #ifndef BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED Chris@16: #define BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED Chris@16: Chris@16: Chris@16: #include Chris@16: Chris@16: Chris@16: #if BOOST_NUMERIC_ODEINT_CXX11 Chris@16: #include Chris@16: #else Chris@16: #include Chris@16: #endif Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: #if BOOST_NUMERIC_ODEINT_CXX11 Chris@101: template struct reference_wrapper; Chris@16: Chris@101: template struct unwrap_reference; Chris@16: #endif Chris@16: Chris@16: namespace numeric { Chris@16: namespace odeint { Chris@16: Chris@16: Chris@16: #if BOOST_NUMERIC_ODEINT_CXX11 Chris@16: Chris@16: template Chris@16: struct unwrap_reference Chris@16: { Chris@16: typedef typename std::remove_reference::type type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct unwrap_reference< std::reference_wrapper > Chris@16: { Chris@16: typedef typename std::remove_reference::type type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct unwrap_reference< boost::reference_wrapper > Chris@16: { Chris@101: typedef typename boost::unwrap_reference::type type; Chris@16: }; Chris@16: Chris@16: #else Chris@16: Chris@16: using ::boost::unwrap_reference; Chris@16: Chris@16: #endif Chris@16: Chris@16: namespace detail Chris@16: { Chris@16: Chris@16: #if BOOST_NUMERIC_ODEINT_CXX11 Chris@16: Chris@16: using ::std::ref; Chris@16: Chris@16: #else Chris@16: Chris@16: using ::boost::ref; Chris@16: Chris@16: #endif Chris@16: } Chris@16: Chris@16: } Chris@16: } Chris@16: } Chris@16: Chris@101: Chris@101: Chris@101: /* Chris@101: * Chris@101: * the following is the suggested way, but unfortunately it does not work with all compilers. Chris@101: */ Chris@101: Chris@101: /* Chris@101: Chris@101: #include Chris@101: Chris@101: Chris@101: #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL Chris@101: #include Chris@101: #else Chris@101: #include Chris@101: #endif Chris@101: Chris@101: Chris@101: Chris@101: namespace boost { Chris@101: namespace numeric { Chris@101: namespace odeint { Chris@101: Chris@101: Chris@101: #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL Chris@101: Chris@101: template Chris@101: struct unwrap_reference Chris@101: { Chris@101: typedef typename std::remove_reference::type type; Chris@101: }; Chris@101: Chris@101: template Chris@101: struct unwrap_reference< std::reference_wrapper > Chris@101: { Chris@101: typedef typename std::remove_reference::type type; Chris@101: }; Chris@101: Chris@101: template Chris@101: struct unwrap_reference< boost::reference_wrapper > Chris@101: { Chris@101: typedef typename boost::unwrap_reference::type type; Chris@101: }; Chris@101: Chris@101: #else Chris@101: Chris@101: using ::boost::unwrap_reference; Chris@101: Chris@101: #endif Chris@101: Chris@101: } Chris@101: } Chris@101: } Chris@101: Chris@101: namespace boost { Chris@101: namespace numeric { Chris@101: namespace odeint { Chris@101: namespace detail { Chris@101: Chris@101: Chris@101: #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL Chris@101: Chris@101: using ::std::ref; Chris@101: Chris@101: #else Chris@101: Chris@101: using ::boost::ref; Chris@101: Chris@101: #endif Chris@101: Chris@101: Chris@101: } Chris@101: } Chris@101: } Chris@101: } Chris@101: Chris@101: */ Chris@101: Chris@16: #endif // BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED