boost::multi_converter
// In header: <boost/iterator/convert_iterator.hpp> template<typename P1, typename P2> struct multi_converter { // types typedef P1::input_type input_type; typedef P2::output_type output_type; typedef mpl::times< typename P1::max_output, typename P2::max_output >::type max_output; // construct/copy/destruct multi_converter(); multi_converter(P1, P2 = P2()); // public member functions BOOST_CONCEPT_ASSERT((ConverterConcept< P1 >)); BOOST_CONCEPT_ASSERT((ConverterConcept< P2 >)); BOOST_CONCEPT_ASSERT((Convertible< typename P1::output_type, typename P2::input_type >)); template<typename In, typename Out> enable_if< mpl::and_< is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Out >::iterator_category >, is_same< typename P1::output_type, typename P2::output_type > >, Out >::type ltr(In &, In, Out); template<typename In, typename Out> disable_if< mpl::and_< is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Out >::iterator_category >, is_same< typename P1::output_type, typename P2::output_type > >, Out >::type ltr(In &, In, Out); template<typename In, typename Out> enable_if< mpl::and_< is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Out >::iterator_category >, is_same< typename P1::output_type, typename P2::output_type > >, Out >::type rtl(In, In &, Out); template<typename In, typename Out> disable_if< mpl::and_< is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Out >::iterator_category >, is_same< typename P1::output_type, typename P2::output_type > >, Out >::type rtl(In, In &, Out); };
Model of Converter
constructed from two models of Converter
and that applies one after the other.
The second convert must require less input than the output of the first per step for it to work.
multi_converter
public member functionsBOOST_CONCEPT_ASSERT((ConverterConcept< P1 >));
BOOST_CONCEPT_ASSERT((ConverterConcept< P2 >));
BOOST_CONCEPT_ASSERT((Convertible< typename P1::output_type, typename P2::input_type >));
template<typename In, typename Out> enable_if< mpl::and_< is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Out >::iterator_category >, is_same< typename P1::output_type, typename P2::output_type > >, Out >::type ltr(In & begin, In end, Out out);
template<typename In, typename Out> disable_if< mpl::and_< is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Out >::iterator_category >, is_same< typename P1::output_type, typename P2::output_type > >, Out >::type ltr(In & begin, In end, Out out);
template<typename In, typename Out> enable_if< mpl::and_< is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Out >::iterator_category >, is_same< typename P1::output_type, typename P2::output_type > >, Out >::type rtl(In begin, In & end, Out out);
template<typename In, typename Out> disable_if< mpl::and_< is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Out >::iterator_category >, is_same< typename P1::output_type, typename P2::output_type > >, Out >::type rtl(In begin, In & end, Out out);