transducer_impl< ReducingFnGenT, ParamTs > Struct Template Reference
  Utility to write simple transducers easily. More...
#include <atria/xform/transducer_impl.hpp>
| Public Types | |
| using | base_t = std::tuple< ParamTs... > | 
| Public Member Functions | |
| transducer_impl (const transducer_impl &)=default | |
| transducer_impl (transducer_impl &&)=default | |
| transducer_impl & | operator= (const transducer_impl &)=default | 
| transducer_impl & | operator= (transducer_impl &&)=default | 
| template<typename... Ts> | |
| transducer_impl (Ts...ts) | |
| template<typename ReducingFnT > | |
| constexpr auto | operator() (ReducingFnT &&step) const -> typename ReducingFnGenT::template apply< estd::decay_t< ReducingFnT >, estd::decay_t< ParamTs >... > | 
| template<typename ReducingFnT , std::size_t... indexes_t> | |
| constexpr auto | make (ReducingFnT &&step, estd::index_sequence< indexes_t... >) const -> typename ReducingFnGenT::template apply< estd::decay_t< ReducingFnT >, estd::decay_t< ParamTs >... > | 
Detailed Description
template<typename ReducingFnGenT, typename... ParamTs>
struct atria::xform::transducer_impl< ReducingFnGenT, ParamTs >
Utility to write simple transducers easily.
Most transducers have the following structure:
Writing functions that return functions without erasing their type is very cumbersome in C++11 (this is not true with generic lambdas and decltype(auto) in the next standard). The transducer_impl type implements the first two calls. The ReducingFnGenT parameter should have a nested template apply that implements the last call. It will be constructed step, params... and it should be callable with state, input.
Definition at line 60 of file transducer_impl.hpp.
The documentation for this struct was generated from the following file:
- src/atria/xform/transducer_impl.hpp
 
          
          
 1.8.10
 1.8.10
  