39 template <
typename ReducingFnT,
46 template <
typename StateT,
typename ...InputTs>
47 auto operator() (StateT&& s, InputTs&& ...is)
48 -> decltype(step(std::forward<StateT>(s), std::forward<InputTs>(is)...))
51 abort_reduce(std::forward<StateT>(s));
53 return step(std::forward<StateT>(s), std::forward<InputTs>(is)...);
61 using take_t = transducer_impl<detail::take_rf_gen, T>;
63 template <
typename IntegralT>
64 auto take(IntegralT&& n)
65 -> take_t<estd::decay_t<IntegralT> >
67 return take_t<estd::decay_t<IntegralT> > {
68 std::forward<IntegralT>(n) };
C++ amazing templates and reusable implementations awesomeness.