SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
Defines iterator_category member if underlying_iterator_t has a valid std::iterator_traits::iterator_category overload. More...
#include <seqan3/core/detail/iterator_traits.hpp>
Public Types | |
using | iterator_category = MAYBE_PRESENT(std::iterator_traits< underlying_iterator_t >::iterator_category) |
The iterator category tag. (not always present!) | |
Defines iterator_category member if underlying_iterator_t has a valid std::iterator_traits::iterator_category overload.
The C++ paper P2259R1 defines the behaviour of iterator_category for a C++-20 input iterator.
https://wg21.link/p2259r1#fixing-counted_iterator states:
Provide member iterator_concept and iterator_category when the wrapped iterator type provides them, to honor its opt-in/opt-outs.
That means, only define iterator_category if the underlying iterator has it.
using seqan3::detail::maybe_iterator_category< underlying_iterator_t >::iterator_category = MAYBE_PRESENT(std::iterator_traits<underlying_iterator_t>::iterator_category) |
The iterator category tag. (not always present!)
This member is only defined if and only if std::iterator_traits<underlying_iterator_t>::iterator_category is valid and denotes a type.