annotate DEPENDENCIES/generic/include/boost/numeric/odeint/util/unwrap_reference.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 /*
Chris@16 2 [auto_generated]
Chris@16 3 boost/numeric/odeint/util/unwrap_reference.hpp
Chris@16 4
Chris@16 5 [begin_description]
Chris@16 6 unwrap_reference
Chris@16 7 [end_description]
Chris@16 8
Chris@101 9 Copyright 2012-2013 Karsten Ahnert
Chris@101 10 Copyright 2012-2013 Mario Mulansky
Chris@16 11
Chris@16 12 Distributed under the Boost Software License, Version 1.0.
Chris@16 13 (See accompanying file LICENSE_1_0.txt or
Chris@16 14 copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 15 */
Chris@16 16
Chris@16 17
Chris@16 18 #ifndef BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED
Chris@16 19 #define BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED
Chris@16 20
Chris@16 21
Chris@16 22 #include <boost/numeric/odeint/config.hpp>
Chris@16 23
Chris@16 24
Chris@16 25 #if BOOST_NUMERIC_ODEINT_CXX11
Chris@16 26 #include <functional>
Chris@16 27 #else
Chris@16 28 #include <boost/ref.hpp>
Chris@16 29 #endif
Chris@16 30
Chris@16 31 namespace boost {
Chris@16 32
Chris@16 33 #if BOOST_NUMERIC_ODEINT_CXX11
Chris@101 34 template<typename T> struct reference_wrapper;
Chris@16 35
Chris@101 36 template<typename T> struct unwrap_reference;
Chris@16 37 #endif
Chris@16 38
Chris@16 39 namespace numeric {
Chris@16 40 namespace odeint {
Chris@16 41
Chris@16 42
Chris@16 43 #if BOOST_NUMERIC_ODEINT_CXX11
Chris@16 44
Chris@16 45 template<typename T>
Chris@16 46 struct unwrap_reference
Chris@16 47 {
Chris@16 48 typedef typename std::remove_reference<T>::type type;
Chris@16 49 };
Chris@16 50
Chris@16 51 template<typename T>
Chris@16 52 struct unwrap_reference< std::reference_wrapper<T> >
Chris@16 53 {
Chris@16 54 typedef typename std::remove_reference<T>::type type;
Chris@16 55 };
Chris@16 56
Chris@16 57 template<typename T>
Chris@16 58 struct unwrap_reference< boost::reference_wrapper<T> >
Chris@16 59 {
Chris@101 60 typedef typename boost::unwrap_reference<T>::type type;
Chris@16 61 };
Chris@16 62
Chris@16 63 #else
Chris@16 64
Chris@16 65 using ::boost::unwrap_reference;
Chris@16 66
Chris@16 67 #endif
Chris@16 68
Chris@16 69 namespace detail
Chris@16 70 {
Chris@16 71
Chris@16 72 #if BOOST_NUMERIC_ODEINT_CXX11
Chris@16 73
Chris@16 74 using ::std::ref;
Chris@16 75
Chris@16 76 #else
Chris@16 77
Chris@16 78 using ::boost::ref;
Chris@16 79
Chris@16 80 #endif
Chris@16 81 }
Chris@16 82
Chris@16 83 }
Chris@16 84 }
Chris@16 85 }
Chris@16 86
Chris@101 87
Chris@101 88
Chris@101 89 /*
Chris@101 90 *
Chris@101 91 * the following is the suggested way, but unfortunately it does not work with all compilers.
Chris@101 92 */
Chris@101 93
Chris@101 94 /*
Chris@101 95
Chris@101 96 #include <boost/config.hpp>
Chris@101 97
Chris@101 98
Chris@101 99 #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
Chris@101 100 #include <boost/ref.hpp>
Chris@101 101 #else
Chris@101 102 #include <functional>
Chris@101 103 #endif
Chris@101 104
Chris@101 105
Chris@101 106
Chris@101 107 namespace boost {
Chris@101 108 namespace numeric {
Chris@101 109 namespace odeint {
Chris@101 110
Chris@101 111
Chris@101 112 #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
Chris@101 113
Chris@101 114 template<typename T>
Chris@101 115 struct unwrap_reference
Chris@101 116 {
Chris@101 117 typedef typename std::remove_reference<T>::type type;
Chris@101 118 };
Chris@101 119
Chris@101 120 template<typename T>
Chris@101 121 struct unwrap_reference< std::reference_wrapper<T> >
Chris@101 122 {
Chris@101 123 typedef typename std::remove_reference<T>::type type;
Chris@101 124 };
Chris@101 125
Chris@101 126 template<typename T>
Chris@101 127 struct unwrap_reference< boost::reference_wrapper<T> >
Chris@101 128 {
Chris@101 129 typedef typename boost::unwrap_reference<T>::type type;
Chris@101 130 };
Chris@101 131
Chris@101 132 #else
Chris@101 133
Chris@101 134 using ::boost::unwrap_reference;
Chris@101 135
Chris@101 136 #endif
Chris@101 137
Chris@101 138 }
Chris@101 139 }
Chris@101 140 }
Chris@101 141
Chris@101 142 namespace boost {
Chris@101 143 namespace numeric {
Chris@101 144 namespace odeint {
Chris@101 145 namespace detail {
Chris@101 146
Chris@101 147
Chris@101 148 #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
Chris@101 149
Chris@101 150 using ::std::ref;
Chris@101 151
Chris@101 152 #else
Chris@101 153
Chris@101 154 using ::boost::ref;
Chris@101 155
Chris@101 156 #endif
Chris@101 157
Chris@101 158
Chris@101 159 }
Chris@101 160 }
Chris@101 161 }
Chris@101 162 }
Chris@101 163
Chris@101 164 */
Chris@101 165
Chris@16 166 #endif // BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED