/usr/include/sigc++-2.0/sigc++/adaptors/bind_return.h is in libsigc++-2.0-dev 2.2.10-0.2ubuntu2.
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 | // -*- c++ -*-
/* Do not edit! -- generated file */
#ifndef _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_
#define _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_
#include <sigc++/adaptors/adaptor_trait.h>
#include <sigc++/adaptors/bound_argument.h>
namespace sigc {
/** Adaptor that fixes the return value of the wrapped functor.
* Use the convenience function sigc::bind_return() to create an instance of sigc::bind_return_functor.
*
* The following template arguments are used:
* - @e T_return Type of the fixed return value.
* - @e T_functor Type of the functor to wrap.
*
* @ingroup bind
*/
template <class T_return, class T_functor>
struct bind_return_functor : public adapts<T_functor>
{
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 typename unwrap_reference<T_return>::type type; };
typedef typename unwrap_reference<T_return>::type result_type;
/** Invokes the wrapped functor dropping its return value.
* @return The fixed return value.
*/
typename unwrap_reference<T_return>::type operator()();
/** Invokes the wrapped functor passing on the arguments.,
* @param _A_arg%1 Argument to be passed on to the functor.)
* @return The fixed return value.
*/
template <class T_arg1>
inline typename unwrap_reference<T_return>::type operator()(T_arg1 _A_a1)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
(_A_a1); return ret_value_.invoke();
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1>
inline typename unwrap_reference<T_return>::type sun_forte_workaround(T_arg1 _A_a1)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
(_A_a1); return ret_value_.invoke();
}
#endif
/** Invokes the wrapped functor passing on the arguments.,
* @param _A_arg%1 Argument to be passed on to the functor.)
* @return The fixed return value.
*/
template <class T_arg1, class T_arg2>
inline typename unwrap_reference<T_return>::type operator()(T_arg1 _A_a1, T_arg2 _A_a2)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass>
(_A_a1, _A_a2); return ret_value_.invoke();
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2>
inline typename unwrap_reference<T_return>::type sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass>
(_A_a1, _A_a2); return ret_value_.invoke();
}
#endif
/** Invokes the wrapped functor passing on the arguments.,
* @param _A_arg%1 Argument to be passed on to the functor.)
* @return The fixed return value.
*/
template <class T_arg1, class T_arg2, class T_arg3>
inline typename unwrap_reference<T_return>::type operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
(_A_a1, _A_a2, _A_a3); return ret_value_.invoke();
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3>
inline typename unwrap_reference<T_return>::type sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
(_A_a1, _A_a2, _A_a3); return ret_value_.invoke();
}
#endif
/** Invokes the wrapped functor passing on the arguments.,
* @param _A_arg%1 Argument to be passed on to the functor.)
* @return The fixed return value.
*/
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4>
inline typename unwrap_reference<T_return>::type operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4)
{ this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
(_A_a1, _A_a2, _A_a3, _A_a4); return ret_value_.invoke();
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4>
inline typename unwrap_reference<T_return>::type 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<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
(_A_a1, _A_a2, _A_a3, _A_a4); return ret_value_.invoke();
}
#endif
/** Invokes the wrapped functor passing on the arguments.,
* @param _A_arg%1 Argument to be passed on to the functor.)
* @return The fixed return value.
*/
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
inline typename unwrap_reference<T_return>::type 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<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); return ret_value_.invoke();
}
#ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
inline typename unwrap_reference<T_return>::type 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<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); return ret_value_.invoke();
}
#endif
/** Invokes the wrapped functor passing on the arguments.,
* @param _A_arg%1 Argument to be passed on to the functor.)
* @return The fixed return value.
*/
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
inline typename unwrap_reference<T_return>::type 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<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); return ret_value_.invoke();
}
#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 typename unwrap_reference<T_return>::type 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<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); return ret_value_.invoke();
}
#endif
/** Invokes the wrapped functor passing on the arguments.,
* @param _A_arg%1 Argument to be passed on to the functor.)
* @return The fixed return value.
*/
template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7>
inline typename unwrap_reference<T_return>::type 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<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); return ret_value_.invoke();
}
#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 typename unwrap_reference<T_return>::type 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<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); return ret_value_.invoke();
}
#endif
/** Constructs a bind_return_functor object that fixes the return value to @p _A_ret_value.
* @param _A_functor Functor to invoke from operator()().
* @param _A_ret_value Value to return from operator()().
*/
bind_return_functor(typename type_trait<T_functor>::take _A_functor, typename type_trait<T_return>::take _A_ret_value)
: adapts<T_functor>(_A_functor), ret_value_(_A_ret_value)
{}
/// The fixed return value.
bound_argument<T_return> ret_value_; // public, so that visit_each() can access it
};
template <class T_return, class T_functor>
typename unwrap_reference<T_return>::type bind_return_functor<T_return, T_functor>::operator()()
{ this->functor_(); return ret_value_.invoke(); }
//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bind_return_functor performs a functor on the
* functor and on the object instance stored in the sigc::bind_return_functor object.
*
* @ingroup bind
*/
template <class T_action, class T_return, class T_functor>
void visit_each(const T_action& _A_action,
const bind_return_functor<T_return, T_functor>& _A_target)
{
visit_each(_A_action, _A_target.ret_value_);
visit_each(_A_action, _A_target.functor_);
}
/** Creates an adaptor of type sigc::bind_return_functor which fixes the return value of the passed functor to the passed argument.
*
* @param _A_functor Functor that should be wrapped.
* @param _A_ret_value Argument to fix the return value of @e _A_functor to.
* @return Adaptor that executes @e _A_functor on invokation and returns @e _A_ret_value.
*
* @ingroup bind
*/
template <class T_return, class T_functor>
inline bind_return_functor<T_return, T_functor>
bind_return(const T_functor& _A_functor, T_return _A_ret_value)
{ return bind_return_functor<T_return, T_functor>(_A_functor, _A_ret_value); }
} /* namespace sigc */
#endif /* _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_ */
|