codecs::iterator_sentinel_source

Defined in header <mgs/codecs/iterator_sentinel_source.hpp>.

template <meta::input_iterator I, meta::sentinel_for<I> S = I>
class iterator_sentinel_source;

The class template iterator_sentinel_source models codecs::input_source by wrapping a meta::input_iterator and a meta::sentinel_for.


Template parameters

Name

Description

I

Input iterator type

S

Sentinel type

Member types

Name

Description

element_type

The element type

Member functions

Name

Description

(constructor)

Construct an input source from an iterator/sentinel range

read

Fill a meta::output_iterator with the input range’s content

max_remaining_size

Compute the maximum number of remaining bytes

begin

Returns the stored meta::input_iterator

end

Returns the stored meta::sentinel_for<I>

Non-member functions

Name

Description

make_iterator_sentinel_source

Helper function to create a iterator_sentinel_source