Name
iterator_traits<const T*> template specialization — Iterator traits specialized for pointers to const
Synopsis
template<typename T> struct iterator_traits<const T*>{ typedef ptrdiff_t difference_type; typedef T value_type; typedef const T* pointer; typedef const T& reference; typedef random_access_iterator_tag iterator_category; };
The iterator_traits
class
template is specialized for pointers to const
. This specialization lets you use a
pointer as a random access iterator.
See Also
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.