[common.iter.types]

# 24 Iterators library [[iterators]](./#iterators)

## 24.5 Iterator adaptors [[predef.iterators]](predef.iterators#common.iter.types)

### 24.5.5 Common iterators [[iterators.common]](iterators.common#common.iter.types)

#### 24.5.5.2 Associated types [common.iter.types]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L5513)

The nested [*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4 The typedef specifier [dcl.typedef]") iterator_category of
the specialization of iterator_traits for common_iterator<I, S> is defined if and only if iter_difference_t<I> is an integral type[.](#1.sentence-1)

In that case,iterator_category denotes forward_iterator_tag if
the [*qualified-id*](expr.prim.id.qual#nt:qualified-id "7.5.5.3 Qualified names [expr.prim.id.qual]") iterator_traits<I>​::​iterator_category is valid and denotes a type that
models [derived_from](concept.derived#concept:derived_from "18.4.3 Concept derived_­from [concept.derived]")<forward_iterator_tag>;
otherwise it denotes input_iterator_tag[.](#1.sentence-2)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L5524)

The remaining nested [*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4 The typedef specifier [dcl.typedef]")*s* of the specialization ofiterator_traits for common_iterator<I, S> are defined as follows:

- [(2.1)](#2.1)

  iterator_concept denotes forward_iterator_tag if I models [forward_iterator](iterator.concept.forward#concept:forward_iterator "24.3.4.11 Concept forward_­iterator [iterator.concept.forward]");
otherwise it denotes input_iterator_tag[.](#2.1.sentence-1)

- [(2.2)](#2.2)

  Let a denote an lvalue of type const common_iterator<I, S>[.](#2.2.sentence-1)
  If the expression a.operator->() is well-formed,
then pointer denotes decltype(a.operator->())[.](#2.2.sentence-2)
  Otherwise, pointer denotes void[.](#2.2.sentence-3)
