Vector< T >::Iterator< Const, Forward > Class Template Reference

A random access iterator class for Vector. More...

#include "Vector.hpp"

Public Types

template<class U >
using ConstSel = typename std::conditional< Const, U const, U >::type
 
template<class ForX , class ForBool >
using ForXOrBool = typename std::conditional<!std::is_same< T, bool >::value, ForX, ForBool >::type
 
using iterator_category = std::random_access_iterator_tag
 
using value_type = ConstSel< T >
 
using difference_type = std::ptrdiff_t
 
using reference = typename std::conditional< Const, typename Vector::const_reference, typename Vector::reference >::type
 
using pointer = ForXOrBool< ConstSel< value_type > *, void >
 
using ConstIterator = Iterator< true, Forward >
 

Public Member Functions

construction, conversion, destruction
 Iterator ()
 
 Iterator (const Iterator &that)
 
 operator ConstIterator () const
 
 ~Iterator ()
 
assignment, swapping
Iteratoroperator= (const Iterator &that)
 
void swap (Iterator &that)
 
element access
reference operator* () const
 
pointer operator-> () const
 
reference operator[] (difference_type offset) const
 
movement
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
Iteratoroperator-- ()
 
Iterator operator-- (int)
 
Iteratoroperator+= (difference_type offset)
 
Iterator operator+ (difference_type offset) const
 
Iteratoroperator-= (difference_type offset)
 
Iterator operator- (difference_type offset) const
 
comparison
difference_type operator- (const Iterator< true, Forward > &that) const
 
difference_type operator- (const Iterator< false, Forward > &that) const
 
bool operator== (const Iterator< true, Forward > &that) const
 
bool operator== (const Iterator< false, Forward > &that) const
 
bool operator!= (const Iterator< true, Forward > &that) const
 
bool operator!= (const Iterator< false, Forward > &that) const
 
bool operator< (const Iterator< true, Forward > &that) const
 
bool operator< (const Iterator< false, Forward > &that) const
 
bool operator> (const Iterator< true, Forward > &that) const
 
bool operator> (const Iterator< false, Forward > &that) const
 
bool operator<= (const Iterator< true, Forward > &that) const
 
bool operator<= (const Iterator< false, Forward > &that) const
 
bool operator>= (const Iterator< true, Forward > &that) const
 
bool operator>= (const Iterator< false, Forward > &that) const
 

Detailed Description

template<class T>
template<bool Const, bool Forward>
class opals::Vector< T >::Iterator< Const, Forward >

A random access iterator class for Vector.

Template Parameters
Constconstant-ness
Forwardforward/reverse traversal
Author
wk
Date
02.02.2011