skip.hpp
Go to the documentation of this file.
static auto complete(T &&state) -> decltype(std::forward< T >(state))
Unwraps all the layers of state wrappers returning the deepmost.
Definition: state_traits.hpp:75
static auto is_reduced(T &&) -> bool
Returns whether the value is idempotent, and thus, the reduction can finish.
Definition: state_traits.hpp:60
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
typename std::enable_if< X, T >::type enable_if_t
Similar to C++14 std::enable_if_t.
Definition: type_traits.hpp:84
Definition: skip.hpp:63
typename common_type< Ts... >::type common_type_t
C++14 style alias for common_type
Definition: common_type.hpp:132
typename std::conditional< X, T, F >::type conditional_t
Similar to C++14 std::conditional_t.
Definition: type_traits.hpp:66
Interface for a type specializing the State concept.
Definition: state_traits.hpp:53
MPL-compatible sequence that just holds a vector of types as a paremeter pack.
Definition: pack.hpp:57
static auto unwrap(T &&state) -> decltype(std::forward< T >(state))
Unwraps this layers of state wrappers, returning the nested state for the next reducing function...
Definition: state_traits.hpp:83
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
Type-safe union type that can hold values of both SkippedT and CalledT types.
Definition: skip.hpp:45
static auto data(T &&, D &&d) -> decltype(std::forward< D >(d)())
Returns the associated from the current state.
Definition: state_traits.hpp:68
auto match(VariantT &variant, FnTs &&...fns) -> estd::enable_if_t< detail::is_boost_variant< estd::decay_t< VariantT > >
Destructure a boost::variant with a given set of functions.
Definition: match_boost.hpp:69
static auto unwrap_all(T &&state) -> decltype(std::forward< T >(state))
Unwraps all layers of state wrappers, returning the most nested state for the innermost reducing func...
Definition: state_traits.hpp:91
static auto rewrap(T &&, U &&x) -> decltype(std::forward< U >(x))
Copies all layers of state wrappers but replaces the innermost state with substate.
Definition: state_traits.hpp:99
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
auto skip(ReducingFnT &&, StateT &&state, InputTs &&...) -> skip_result_t< ReducingFnT, StateT, InputTs... >
Skip calling the next reducing function in a transducer.
Definition: skip.hpp:228
Metafunction that returns a type that can hold both values of type skipped_t = StateT and wrapped_t =...
Definition: skip.hpp:193
typename std::result_of< T >::type result_of_t
Similar to C++14 std::result_of_t.
Definition: type_traits.hpp:60