| 162 | |
| 163 | template<class Function, class BoundArgs> |
| 164 | struct bound_function |
| 165 | { |
| 166 | typedef int result_type; |
| 167 | |
| 168 | bound_function(Function f, BoundArgs args) |
| 169 | : m_function(f), |
| 170 | m_args(args) |
| 171 | { |
| 172 | } |
| 173 | |
| 174 | template<class Arg1> |
| 175 | detail::invoked_bound_function< |
| 176 | Function, |
| 177 | BoundArgs, |
| 178 | boost::tuple<Arg1> |
| 179 | > |
| 180 | operator()(const Arg1 &arg1) const |
| 181 | { |
| 182 | return detail::invoked_bound_function< |
| 183 | Function, |
| 184 | BoundArgs, |
| 185 | boost::tuple<Arg1> |
| 186 | >(m_function, m_args, boost::make_tuple(arg1)); |
| 187 | } |
| 188 | |
| 189 | template<class Arg1, class Arg2> |
| 190 | detail::invoked_bound_function< |
| 191 | Function, |
| 192 | BoundArgs, |
| 193 | boost::tuple<Arg1, Arg2> |
| 194 | > |
| 195 | operator()(const Arg1 &arg1, const Arg2 &arg2) const |
| 196 | { |
| 197 | return detail::invoked_bound_function< |
| 198 | Function, |
| 199 | BoundArgs, |
| 200 | boost::tuple<Arg1, Arg2> |
| 201 | >(m_function, m_args, boost::make_tuple(arg1, arg2)); |
| 202 | } |
| 203 | |
| 204 | Function m_function; |
| 205 | BoundArgs m_args; |
| 206 | }; |
| 207 | |
| 208 | } // end detail namespace |
| 209 |
nothing calls this directly
no outgoing calls
no test coverage detected