MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / def

Function def

external/boost/boost/parameter/python.hpp:453–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451
452template <class M, class Signature>
453void def(char const* name, Signature)
454{
455 typedef mpl::iterator_range<
456 typename mpl::next<
457 typename mpl::begin<Signature>::type
458 >::type
459 , typename mpl::end<Signature>::type
460 > arg_types;
461
462 typedef typename mpl::transform<
463 typename M::keywords
464 , arg_types
465 , aux::make_arg_spec<mpl::_1, mpl::_2>
466 , mpl::back_inserter<mpl::vector0<> >
467 >::type arg_specs;
468
469 typedef typename mpl::count_if<
470 arg_specs
471 , aux::is_optional<mpl::_1>
472 >::type optional_arity;
473
474 typedef typename mpl::front<Signature>::type result_type;
475 typedef typename mpl::shift_left<mpl::long_<1>, optional_arity>::type upper;
476
477 aux::def_combinations(
478 aux::def_function(name)
479 , (arg_specs*)0
480 , mpl::long_<0>()
481 , mpl::long_<upper::value>()
482 , (aux::make_invoker<M, result_type>*)0
483 );
484}
485
486template <class M, class Class, class Signature>
487void def(Class& cl, char const* name, Signature)

Callers 2

def_combination_auxFunction · 0.85
operator()Method · 0.85

Calls 2

def_combinationsFunction · 0.85
def_functionClass · 0.85

Tested by

no test coverage detected