2 [section:traits Iterator Traits]
4 `std::iterator_traits` provides access to five associated types
5 of any iterator: its `value_type`, `reference`, `pointer`,
6 `iterator_category`, and `difference_type`. Unfortunately,
7 such a "multi-valued" traits template can be difficult to use in a
8 metaprogramming context. `<boost/iterator/iterator_traits.hpp>`
9 provides access to these types using a standard metafunctions_.
13 Header `<boost/iterator/iterator_traits.hpp>`:
15 template <class Iterator>
19 std::iterator_traits<Iterator>::value_type
23 template <class Iterator>
24 struct iterator_reference
27 std::iterator_traits<Iterator>::reference
31 template <class Iterator>
32 struct iterator_pointer
35 std::iterator_traits<Iterator>::pointer
39 template <class Iterator>
40 struct iterator_difference
43 detail::iterator_traits<Iterator>::difference_type
47 template <class Iterator>
48 struct iterator_category
51 detail::iterator_traits<Iterator>::iterator_category