Can someone explain me what this line in iterator.concepts.general#1 means from the C++ standard draft:
For a type
I
, letITER_TRAITS(I)
denote the typeI
ifiterator_traits<I>
names a specialization generated from the primary template. Otherwise,ITER_TRAITS(I)
denotesiterator_traits<I>
.
The primary iterator_traits<I>
template will fill in members like value_type
and reference
from corresponding members of I
. If your iterator type does not have those members (for example, all pointer types), you can specialize std::iterator_traits<your_iterator_type>
to provide those members instead, and provide them in the traits class.
The ITER_TRAITS(I)
conceptual metafunction represents this. If there is no specialization of iterator_traits
for the iterator type I
, then it gets the members from I
itself. If it is specialized, then it gets them from iterator_traits<I>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With