Closed Manu343726 closed 9 years ago
I think the templates used for algorithm factories (The actual functors to translate STL algorithms to container algorithms) are a bit verbose, where a simple tag dispatching approach may work:
template<typename Algorithm> auto algorithm_factory(Algorithm algorithm, snail::categories::unary_inmutable) { return [=](auto f) { return [=](const auto& container) -> decltype(container) { using std::begin; using std::end; algorithm( begin(container), end(container), f); return container; }; }; }
I think the templates used for algorithm factories (The actual functors to translate STL algorithms to container algorithms) are a bit verbose, where a simple tag dispatching approach may work: