void abort_reduce(StateT&& state) { using complete_t = estd::decay_t<decltype(state_complete(state))>; throw reduce_aborted_error<complete_t> { state_complete(std::forward<StateT>(state)) }; }
typename WrappedFn> auto with_state_check_state_complete(std::true_type /*is_state_complete*/, StateT&& st, UnwrappedFn&& fn, WrappedFn&&) -> estd::result_of_t<UnwrappedFn(StateT)> { return std::forward<UnwrappedFn>(fn)(std::forward<StateT>(st)); } template <typename StateT, typename UnwrappedFn, typename WrappedFn> auto with_state_check_any_state(std::false_type /*is_any_state*/, StateT&& st, UnwrappedFn&& fn1, WrappedFn&& fn2) -> ABL_DECLTYPE_RETURN( with_state_check_state_complete( std::is_same< estd::decay_t<StateT>, estd::decay_t<decltype(state_complete(std::forward<StateT>(st)))> >{}, std::forward<StateT>(st), std::forward<UnwrappedFn>(fn1), std::forward<WrappedFn>(fn2))) template <typename StateT, typename UnwrappedFn, typename WrappedFn> auto with_state_check_any_state(std::true_type /*is_any_state*/, StateT&& st, UnwrappedFn&& fn1, WrappedFn&& fn2) -> estd::result_of_t<UnwrappedFn(StateT)> { using wrapped_state_t = estd::result_of_t<UnwrappedFn(StateT)>; if (!st.template has<wrapped_state_t>()) { return std::forward<UnwrappedFn>(fn1)(
std::get<0>(data).push_back(tuplify(std::forward<InputTs>(is)...)); return wrap_state<tag> ( state_unwrap(std::forward<StateT>(s)), std::move(data)); } }; template <typename T> friend auto state_wrapper_complete(tag, T&& wrapper) -> ABL_DECLTYPE_RETURN( identity_( state_complete( reduce_nested( std::get<1>(state_wrapper_data(std::forward<T>(wrapper))).get().step, state_unwrap(std::forward<T>(wrapper)), std::get<1>(state_wrapper_data(std::forward<T>(wrapper))).get().mapping( std::get<0>(state_wrapper_data(std::forward<T>(wrapper)))))))) }; } // namespace detail template <typename T> using eager_t = transducer_impl<detail::eager_rf_gen, T>; /*! * Similar to clojure.core/eager-all$1 */ template <typename MappingT> auto eager(MappingT&& mapping) -> eager_t<estd::decay_t<MappingT> >