Bidirectional cursor over Base-owned list nodes. More...
#include <StormByte/safe/list.hxx>
Public Types | |
| using | iterator_category = std::bidirectional_iterator_tag |
| Iterator category. | |
| using | iterator_concept = std::bidirectional_iterator_tag |
| C++20 iterator concept. | |
| using | value_type = T |
| Element type. | |
| using | difference_type = std::ptrdiff_t |
| Iterator distance type. | |
| using | reference = std::conditional_t<IsConst, const T&, T&> |
| Element reference. | |
| using | pointer = std::conditional_t<IsConst, const T*, T*> |
| Element pointer. | |
| using | StormByteSafeCursor = void |
| Base cursor mark. Copying the cursor copies one link pointer. | |
Public Member Functions | |
| BasicIterator () noexcept | |
| Construct a singular iterator. | |
| template<bool OtherConst> requires IsConst | |
| &&!OtherConst | BasicIterator (const BasicIterator< OtherConst > &other) noexcept |
| Convert a mutable iterator to a const iterator. | |
| reference | operator* () const noexcept |
| Return the element stored in the node. | |
| pointer | operator-> () const noexcept |
| Access the element stored in the node. | |
| BasicIterator & | operator++ () noexcept |
| Advance to the next element. | |
| BasicIterator | operator++ (int) noexcept |
| Advance to the next element. | |
| BasicIterator & | operator-- () noexcept |
| Move to the previous element. | |
| BasicIterator | operator-- (int) noexcept |
| Move to the previous element. | |
| template<bool OtherConst> | |
| bool | operator== (const BasicIterator< OtherConst > &other) const noexcept |
| Compare link identity. | |
Friends | |
| class | List |
| template<bool> | |
| class | BasicIterator |
Bidirectional cursor over Base-owned list nodes.
| IsConst | Whether dereference is read-only. |
The cursor stores one link pointer. End designates the sentinel. Copying it does not allocate and does not take ownership.
| using StormByte::Safe::List< T >::BasicIterator< IsConst >::difference_type = std::ptrdiff_t |
Iterator distance type.
| using StormByte::Safe::List< T >::BasicIterator< IsConst >::iterator_category = std::bidirectional_iterator_tag |
Iterator category.
| using StormByte::Safe::List< T >::BasicIterator< IsConst >::iterator_concept = std::bidirectional_iterator_tag |
C++20 iterator concept.
| using StormByte::Safe::List< T >::BasicIterator< IsConst >::pointer = std::conditional_t<IsConst, const T*, T*> |
Element pointer.
| using StormByte::Safe::List< T >::BasicIterator< IsConst >::reference = std::conditional_t<IsConst, const T&, T&> |
Element reference.
| using StormByte::Safe::List< T >::BasicIterator< IsConst >::StormByteSafeCursor = void |
Base cursor mark. Copying the cursor copies one link pointer.
| using StormByte::Safe::List< T >::BasicIterator< IsConst >::value_type = T |
Element type.
|
inlinenoexcept |
Construct a singular iterator.
|
inlinenoexcept |
Convert a mutable iterator to a const iterator.
| other | Mutable iterator. |
|
inlinenoexcept |
Return the element stored in the node.
|
inlinenoexcept |
Advance to the next element.
|
inlinenoexcept |
Advance to the next element.
|
inlinenoexcept |
Move to the previous element.
|
inlinenoexcept |
Move to the previous element.
|
inlinenoexcept |
Access the element stored in the node.
|
inlinenoexcept |
Compare link identity.
| other | Iterator to compare. |
|
friend |
|
friend |