MCPcopy Create free account
hub / github.com/charto/nbind / FunctionDefiner

Method FunctionDefiner

include/nbind/FunctionDefiner.h:13–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12 template <typename ReturnType, typename... Args, typename... Policies>
13 FunctionDefiner(
14 const char* name,
15 ReturnType(*func)(Args...),
16 Policies... policies
17 ) {
18 typedef FunctionSignature<
19 decltype(func),
20 std::nullptr_t,
21 typename SkipNamePolicy<PolicyListType<Policies...>>::Type,
22 ReturnType,
23 Args...
24 > Signature;
25
26 registerFunction(
27 executeNamePolicy(name, policies...),
28 Signature::getDirect(func),
29 Signature::addMethod(func, TypeFlags::none),
30 &Signature::getInstance(),
31 TypeFlags::none
32 );
33 }
34
35 template <typename... Args>
36 struct Overloaded {

Callers

nothing calls this directly

Calls 2

executeNamePolicyFunction · 0.85
addMethodFunction · 0.85

Tested by

no test coverage detected