@@ -75,6 +75,8 @@ class bound_argument
75
75
T_type visited_;
76
76
};
77
77
78
+ #ifndef SIGCXX_DISABLE_DEPRECATED
79
+
78
80
// Template specialization:
79
81
/* * bound_argument object for a bound argument that is passed by bind() or
80
82
* returned by bind_return() by reference, specialized for reference_wrapper<> types.
@@ -142,6 +144,44 @@ class bound_argument< const_reference_wrapper<T_wrapped> >
142
144
const_limit_reference<T_wrapped> visited_;
143
145
};
144
146
147
+ #endif // SIGCXX_DISABLE_DEPRECATED
148
+
149
+ // Template specialization:
150
+ /* * bound_argument object for a bound argument that is passed by bind() or
151
+ * returned by bind_return() by reference, specialized for std::reference_wrapper<> types.
152
+ * @e T_wrapped The type of the bound argument.
153
+ */
154
+ template <class T_wrapped >
155
+ class bound_argument < std::reference_wrapper<T_wrapped> >
156
+ {
157
+ public:
158
+ /* * Constructor.
159
+ * @param _A_argument The argument to bind.
160
+ */
161
+ bound_argument (const std::reference_wrapper<T_wrapped>& _A_argument)
162
+ : visited_(unwrap(_A_argument))
163
+ {}
164
+
165
+ /* * Retrieve the entity to visit in visit_each().
166
+ * @return The limited_reference to the bound argument.
167
+ */
168
+ inline const limit_reference<T_wrapped>& visit () const
169
+ { return visited_; }
170
+
171
+ /* * Retrieve the entity to pass to the bound functor or return.
172
+ * @return The bound argument.
173
+ */
174
+ inline T_wrapped& invoke ()
175
+ { return visited_.invoke (); }
176
+
177
+ private:
178
+ /* * The limited_reference to the bound argument.
179
+ */
180
+ limit_reference<T_wrapped> visited_;
181
+ };
182
+
183
+
184
+
145
185
#ifndef DOXYGEN_SHOULD_SKIP_THIS
146
186
/* * Implementation of visitor<>::do_visit_each<>() specialized for the bound_argument class.
147
187
* Call visit_each() on the entity returned by the bound_argument's visit()
0 commit comments