Inheritance diagram for forward_container:
For internal use only.
Uses CRTP to flesh out a forward container. Given the iterator and size type, and a defined begin, end and size member functions, define the rest of the members of a forward container.
Cont | The container. Should be the subclass. | |
ConstIter | The iterator to access the elements. | |
Iter | The iterator to access or change the elements. | |
Size | The size type. |
Public Types | |
typedef ConstIter | const_iterator |
Iterator to access the elements. | |
typedef std::iterator_traits< ConstIter >::pointer | const_pointer |
Pointer to access an element. | |
typedef std::iterator_traits< ConstIter >::reference | const_reference |
Reference to access an element. | |
typedef std::iterator_traits< ConstIter >::difference_type | difference_type |
Type for the difference between two iterators. | |
typedef Iter | iterator |
Iterator to access or change the elements. | |
typedef std::iterator_traits< Iter >::pointer | pointer |
Pointer to access or change an element. | |
typedef std::iterator_traits< Iter >::reference | reference |
Reference to access or change an element. | |
typedef Size | size_type |
Type for the size of the container. | |
typedef std::iterator_traits< ConstIter >::value_type | value_type |
The element value type. | |
Public Member Functions | |
reference | front () |
Gets the first element. | |
const_reference | front () const |
Gets the first element. | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator< (const forward_container< C1, ConstIter1, Iter1, Size1 > &lhs, const forward_container< C2, ConstIter2, Iter2, Size2 > &rhs) |
Whether lhs is less than rhs i.e. lexicographically less. | |
bool | operator== (const forward_container< C1, ConstIter1, Iter1, Size1 > &lhs, const forward_container< C2, ConstIter2, Iter2, Size2 > &rhs) |
Whether the two containers are equal i.e. their elements are equal. |