MCPcopy Create free account
hub / github.com/boostorg/compute / bound_function

Class bound_function

include/boost/compute/functional/bind.hpp:164–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163template<class Function, class BoundArgs>
164struct 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected