#ifndef PYTHONIC_FUNCTOOLS_PARTIAL_HPP #define PYTHONIC_FUNCTOOLS_PARTIAL_HPP #include "pythonic/include/functools/partial.hpp" #include "pythonic/utils/functor.hpp" #include "pythonic/utils/seq.hpp" #include PYTHONIC_NS_BEGIN namespace functools { namespace details { template task::task() : closure() { } template task::task(ClosureTypes const &... types) : closure(types...) { } template template auto task::operator()(Types &&... types) const -> decltype( this->call(utils::make_index_sequence(), std::forward(types)...)) { return call(utils::make_index_sequence(), std::forward(types)...); } } template // remove references as closure capture the env by copy details::task::type>::type...> partial(Types &&... types) { return {std::forward(types)...}; } } PYTHONIC_NS_END #endif