Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:58:44

0001 /*
0002  [auto_generated]
0003  boost/numeric/odeint/util/unwrap_reference.hpp
0004 
0005  [begin_description]
0006  unwrap_reference
0007  [end_description]
0008 
0009  Copyright 2012-2013 Karsten Ahnert
0010  Copyright 2012-2013 Mario Mulansky
0011 
0012  Distributed under the Boost Software License, Version 1.0.
0013  (See accompanying file LICENSE_1_0.txt or
0014  copy at http://www.boost.org/LICENSE_1_0.txt)
0015  */
0016 
0017 
0018 #ifndef BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED
0020 
0021 
0022 #include <boost/numeric/odeint/config.hpp>
0023 #include <functional>
0024 
0025 namespace boost {
0026 
0027 template<typename T> class reference_wrapper;
0028 template<typename T> struct unwrap_reference;
0029 
0030 namespace numeric {
0031 namespace odeint {
0032 
0033 template<typename T>
0034 struct unwrap_reference
0035 {
0036     typedef typename std::remove_reference<T>::type type;
0037 };
0038 
0039 template<typename T>
0040 struct unwrap_reference< std::reference_wrapper<T> >
0041 {
0042     typedef typename std::remove_reference<T>::type type;
0043 };
0044 
0045 template<typename T>
0046 struct unwrap_reference< boost::reference_wrapper<T> >
0047 {
0048     typedef typename boost::unwrap_reference<T>::type type;
0049 };
0050 
0051 namespace detail
0052 {
0053 
0054 using ::std::ref;
0055 
0056 }
0057 
0058 }
0059 }
0060 }
0061 
0062 
0063 
0064 /*
0065  * 
0066  * the following is the suggested way, but unfortunately it does not work with all compilers.
0067  */
0068 
0069 /*
0070 
0071 #include <boost/config.hpp>
0072 
0073 
0074 #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
0075 #include <boost/ref.hpp>
0076 #else
0077 #include <functional>
0078 #endif
0079 
0080 
0081 
0082 namespace boost {
0083 namespace numeric {
0084 namespace odeint {
0085 
0086 
0087 #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
0088 
0089 template<typename T>
0090 struct unwrap_reference
0091 {
0092     typedef typename std::remove_reference<T>::type type;
0093 };
0094 
0095 template<typename T>
0096 struct unwrap_reference< std::reference_wrapper<T> >
0097 {
0098     typedef typename std::remove_reference<T>::type type;
0099 };
0100 
0101 template<typename T>
0102 struct unwrap_reference< boost::reference_wrapper<T> >
0103 {
0104     typedef typename boost::unwrap_reference<T>::type type;
0105 };
0106 
0107 #else
0108 
0109 using ::boost::unwrap_reference;
0110 
0111 #endif
0112 
0113 }
0114 }
0115 }
0116 
0117 namespace boost {
0118 namespace numeric {
0119 namespace odeint {  
0120 namespace detail {
0121 
0122 
0123 #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
0124 
0125 using ::std::ref;
0126 
0127 #else
0128 
0129 using ::boost::ref;
0130 
0131 #endif
0132 
0133 
0134 }
0135 }
0136 }
0137 }
0138 
0139 */
0140 
0141 #endif // BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED