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