template <class Iterator> class iterator_traits;
template <class T> class iterator_traits<T*>;
template <class T> class iterator_traits<const T*>;
Iterator의 특성을 나타내는 Traits(특성) Class
Standard Algorithm은 iterator_traits 인스턴스화의 Member를 이용하여 전달된 Iterator의 속성과 범위를 결정한다.
모든 Iterator type에 대해서 iterator_traits 클래스의 템플릿은 최소한 다음 멤버 유형이 정의되어야 한다.
| member | description |
|---|---|
| difference_type | Type to express the result of subtracting one iterator from another. |
| value_type | The type of the element the iterator can point to |
| pointer | The type of a pointer to an element the iterator can point to. |
| reference | The type of a reference to an element the iterator can point to |
| iterator_category | The iterator category. |
iterator category