/usr/include/sigc++-2.0/sigc++/adaptors/retype_return.h is in libsigc++-2.0-dev 2.6.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | // -*- c++ -*-
/* Do not edit! -- generated file */
#ifndef _SIGC_ADAPTORS_RETYPE_RETURN_H_
#define _SIGC_ADAPTORS_RETYPE_RETURN_H_
#include <sigc++/adaptors/adaptor_trait.h>
namespace sigc {
/** Adaptor that performs a C-style cast on the return value of a functor.
* Use the convenience function sigc::retype_return() to create an instance of retype_return_functor.
*
* The following template arguments are used:
* - @e T_return Target type of the C-style cast.
* - @e T_functor Type of the functor to wrap.
*
* @ingroup retype
*/
template <class T_return, class T_functor>
struct retype_return_functor : public adapts<T_functor>
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <class T_arg1=void, class T_arg2=void, class T_arg3=void, class T_arg4=void, class T_arg5=void, class T_arg6=void, class T_arg7=void>
struct deduce_result_type
{ typedef T_return type; };
#endif
typedef T_return result_type;
T_return operator()();
template <class T_arg1>
inline T_return operator()(T_arg1 _A_a1)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>>
(_A_a1));
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1>
inline T_return sun_forte_workaround(T_arg1 _A_a1)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>>
(_A_a1));
}
#endif
template <class T_arg1, class T_arg2>
inline T_return operator()(T_arg1 _A_a1, T_arg2 _A_a2)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>>
(_A_a1, _A_a2));
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2>
inline T_return sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>>
(_A_a1, _A_a2));
}
#endif
template <class T_arg1, class T_arg2, class T_arg3>
inline T_return operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>>
(_A_a1, _A_a2, _A_a3));
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3>
inline T_return sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>>
(_A_a1, _A_a2, _A_a3));
}
#endif
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4>
inline T_return operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>>
(_A_a1, _A_a2, _A_a3, _A_a4));
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4>
inline T_return sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>>
(_A_a1, _A_a2, _A_a3, _A_a4));
}
#endif
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
inline T_return operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5));
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
inline T_return sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5));
}
#endif
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
inline T_return operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>, type_trait_pass_t<T_arg6>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6));
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
inline T_return sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>, type_trait_pass_t<T_arg6>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6));
}
#endif
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7>
inline T_return operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>, type_trait_pass_t<T_arg6>, type_trait_pass_t<T_arg7>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7));
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7>
inline T_return sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7)
{ return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>, type_trait_pass_t<T_arg6>, type_trait_pass_t<T_arg7>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7));
}
#endif
retype_return_functor() {}
/** Constructs a retype_return_functor object that perform a C-style cast on the return value of the passed functor.
* @param _A_functor Functor to invoke from operator()().
*/
explicit retype_return_functor(type_trait_take_t<T_functor> _A_functor)
: adapts<T_functor>(_A_functor)
{}
};
template <class T_return, class T_functor>
T_return retype_return_functor<T_return, T_functor>::operator()()
{ return T_return(this->functor_()); }
/** Adaptor that performs a C-style cast on the return value of a functor.
* This template specialization is for a void return. It drops the return value of the functor it invokes.
* Use the convenience function sigc::hide_return() to create an instance of sigc::retype_return_functor<void>.
*
* @ingroup retype
*/
/* The void specialization is needed because of explicit cast to T_return.
*/
template <class T_functor>
struct retype_return_functor<void, T_functor> : public adapts<T_functor>
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <class T_arg1=void, class T_arg2=void, class T_arg3=void, class T_arg4=void, class T_arg5=void, class T_arg6=void, class T_arg7=void>
struct deduce_result_type
{ typedef void type; };
#endif
typedef void result_type;
void operator()();
template <class T_arg1>
inline void operator()(T_arg1 _A_a1)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>>
(_A_a1);
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1>
inline void sun_forte_workaround(T_arg1 _A_a1)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>>
(_A_a1);
}
#endif
template <class T_arg1, class T_arg2>
inline void operator()(T_arg1 _A_a1, T_arg2 _A_a2)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>>
(_A_a1, _A_a2);
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2>
inline void sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>>
(_A_a1, _A_a2);
}
#endif
template <class T_arg1, class T_arg2, class T_arg3>
inline void operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>>
(_A_a1, _A_a2, _A_a3);
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3>
inline void sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>>
(_A_a1, _A_a2, _A_a3);
}
#endif
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4>
inline void operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>>
(_A_a1, _A_a2, _A_a3, _A_a4);
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4>
inline void sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>>
(_A_a1, _A_a2, _A_a3, _A_a4);
}
#endif
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
inline void operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
inline void sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
}
#endif
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
inline void operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>, type_trait_pass_t<T_arg6>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
inline void sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>, type_trait_pass_t<T_arg6>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
}
#endif
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7>
inline void operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>, type_trait_pass_t<T_arg6>, type_trait_pass_t<T_arg7>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7>
inline void sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg1>, type_trait_pass_t<T_arg2>, type_trait_pass_t<T_arg3>, type_trait_pass_t<T_arg4>, type_trait_pass_t<T_arg5>, type_trait_pass_t<T_arg6>, type_trait_pass_t<T_arg7>>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
}
#endif
retype_return_functor() {}
retype_return_functor(type_trait_take_t<T_functor> _A_functor)
: adapts<T_functor>(_A_functor)
{}
};
template <class T_functor>
void retype_return_functor<void, T_functor>::operator()()
{ this->functor_(); }
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//template specialization of visitor<>::do_visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::retype_return_functor performs a functor on the
* functor stored in the sigc::retype_return_functor object.
*
* @ingroup retype
*/
template <class T_return, class T_functor>
struct visitor<retype_return_functor<T_return, T_functor> >
{
template <typename T_action>
static void do_visit_each(const T_action& _A_action,
const retype_return_functor<T_return, T_functor>& _A_target)
{
sigc::visit_each(_A_action, _A_target.functor_);
}
};
#endif // DOXYGEN_SHOULD_SKIP_THIS
/** Creates an adaptor of type sigc::retype_return_functor which performs a C-style cast on the return value of the passed functor.
* The template argument @e T_return specifies the target type of the cast.
*
* @param _A_functor Functor that should be wrapped.
* @return Adaptor that executes @e _A_functor performing a C-style cast on the return value.
*
* @ingroup retype
*/
template <class T_return, class T_functor>
inline retype_return_functor<T_return, T_functor>
retype_return(const T_functor& _A_functor)
{ return retype_return_functor<T_return, T_functor>(_A_functor); }
/** Creates an adaptor of type sigc::retype_return_functor which drops the return value of the passed functor.
*
* @param _A_functor Functor that should be wrapped.
* @return Adaptor that executes @e _A_functor dropping its return value.
*
* @ingroup hide
*/
template <class T_functor>
inline retype_return_functor<void, T_functor>
hide_return(const T_functor& _A_functor)
{ return retype_return_functor<void, T_functor>(_A_functor); }
} /* namespace sigc */
#endif /* _SIGC_ADAPTORS_RETYPE_RETURN_H_ */
|