reductor.hpp
Go to the documentation of this file.
auto empty_reductor(ReducingFnT &&step, InitialStateT &&state) -> empty_reductor_fn< estd::decay_t< ReducingFnT >, estd::decay_t< InitialStateT >, estd::decay_t< InputTs >... >
Constructs an empty_reductor_fn object with deduced argument types.
Definition: reductor.hpp:250
auto call(ReducingFnT &&step, StateT &&state, InputTs &&...ins) -> estd::enable_if_t< is_skip_state< estd::decay_t< StateT > >
Call the next reducing function in a transducer that could otherwise skip calling the next reducing f...
Definition: skip.hpp:276
#define ABL_DECLTYPE_RETURN(body_expr)
Utility for defining generic functions with a deduced return type, that are composed of a single expr...
Definition: utils.hpp:109
complete_type current() const &
Peeks at the current visible state of the reduction.
Definition: reductor.hpp:75
Reductor_Fn object that does not require inputs to be fed at construction time.
Definition: reductor.hpp:213
STL namespace.
complete_type complete() const &
Completes and returns the state of the reduction.
Definition: reductor.hpp:65
auto state_rewrap(T &&s, U &&x) -> decltype(state_traits_t< T >::rewrap(std::forward< T >(s), std::forward< U >(x)))
Convenience function for calling state_traits::unwrap_all
Definition: state_traits.hpp:152
auto state_complete(T &&s) -> decltype(state_traits_t< T >::complete(std::forward< T >(s)))
Convenience function for calling state_traits::complete
Definition: state_traits.hpp:110
auto state_is_reduced(T &&s) -> bool
Convenience function for calling state_traits::is_reduced
Definition: state_traits.hpp:118
auto state_unwrap_all(T &&s) -> decltype(state_traits_t< T >::unwrap_all(std::forward< T >(s)))
Convenience function for calling state_traits::unwrap_all
Definition: state_traits.hpp:144
reductor_fn_base & operator()(InputTs2 &&...ins)&
Evaluates the next step of the reduction, passing the inputs ins to the reducing function.
Definition: reductor.hpp:95
auto reductor(ReducingFnT &&step, InitialStateT &&state, InputTs &&...ins) -> reductor_fn< estd::decay_t< ReducingFnT >, estd::decay_t< InitialStateT >, estd::decay_t< InputTs >... >
Constructs a reductor_fn object with deduced argument types.
Definition: reductor.hpp:175
Function object that performs a reduction using a reducing function of type ReducingFnT, an initial state of type of type InitialStateT and inputs of types InputTs....
Definition: reductor.hpp:149
typename std::result_of< T >::type result_of_t
Similar to C++14 std::result_of_t.
Definition: type_traits.hpp:60