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

Function make_function_declaration

include/boost/compute/function.hpp:324–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322
323template<class Signature>
324inline std::string make_function_declaration(const char *name, const char *arguments)
325{
326 typedef typename
327 boost::function_traits<Signature>::result_type result_type;
328 typedef typename
329 boost::function_types::parameter_types<Signature>::type parameter_types;
330 typedef typename
331 mpl::size<parameter_types>::type arity_type;
332
333 std::stringstream s;
334 s << "inline " << type_name<result_type>() << " " << name;
335 s << "(";
336
337 if(arity_type::value > 0){
338 signature_argument_inserter i(s, arguments, arity_type::value);
339 mpl::for_each<
340 typename mpl::transform<parameter_types, boost::add_pointer<mpl::_1>
341 >::type>(i);
342 }
343
344 s << ")";
345 return s.str();
346}
347
348struct argument_list_inserter
349{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected