19 #ifndef PYSTON_FUNCTION_H
20 #define PYSTON_FUNCTION_H
37 template <
typename R,
typename... Args>
79 template <
typename Signature>
90 template <
typename R,
typename... Args>
101 : m_repr(repr), m_functor(functor) {}
121 #define PYSTON_GRAPH_FUNCTION_IMPL
123 #undef PYSTON_GRAPH_FUNCTION_IMPL
std::function< R(const Context &, Args...)> m_functor
FunctionFactory(const std::string &repr, std::function< R(const Context &, Args...)> functor)
std::shared_ptr< Node< R > > operator()(const std::shared_ptr< Node< Args >> &... nodes) const
Function(const std::string &repr_, std::function< R(const Context &, Args...)> functor, const std::shared_ptr< Node< Args >>... args)
R eval(const Context &context, const Arguments &args) const final
void visit(Visitor &visitor) const final
std::string repr() const final