with_state.hpp File Reference

Go to the source code of this file.

Namespaces

 atria
 C++ amazing templates and reusable implementations awesomeness.
 
 atria::xform
 Efficient and flexible C++ implementation of transducers.
 

Functions

template<typename StateT , typename UnwrappedFn , typename WrappedFn >
auto with_state (StateT &&st, UnwrappedFn &&, WrappedFn &&fn) -> meta::lazy_enable_if_t< !std::is_same< estd::decay_t< StateT >, estd::decay_t< decltype(state_complete(st))> >::value, std::result_of< WrappedFn(StateT)> >
 Given a value st that represents the state of a reduction, this function generically dispatches to the right function UnwrappedFn or WrappedFn, depending of whether the value is already wrapped or not. More...
 
Fork me on GitHub