|
libstdc++
|
Inherited by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::random_access_iterator_tag >.
Public Types | |
| typedef _Safe_iterator< _Iterator, _Sequence, iterator_category > | _Self |
| typedef _Traits::difference_type | difference_type |
| typedef _Traits::iterator_category | iterator_category |
| using | iterator_concept = std::__detail::__iter_concept< _Iterator > |
| typedef _Iterator | iterator_type |
| typedef _Traits::pointer | pointer |
| typedef _Traits::reference | reference |
| typedef _Traits::value_type | value_type |
Public Member Functions | |
| constexpr | _Safe_iterator () noexcept |
| constexpr | _Safe_iterator (_Iterator __i, const _Safe_sequence_base *__seq) noexcept |
| constexpr | _Safe_iterator (_Safe_iterator &&__x) noexcept |
| constexpr | _Safe_iterator (const _Safe_iterator &__x) noexcept |
| template<typename _MutableIterator > | |
| constexpr | _Safe_iterator (const _Safe_iterator< _MutableIterator, _Sequence, typename __gnu_cxx::__enable_if< _IsConstant::__value &&std::__are_same< _MutableIterator, _OtherIterator >::__value, _Category >::__type > &__x) noexcept |
| void | _M_attach (const _Safe_sequence_base *__seq) |
| void | _M_attach_single (const _Safe_sequence_base *__seq) |
| bool | _M_before_dereferenceable () const |
| template<typename _Diff > | |
| bool | _M_can_advance (const std::pair< _Diff, _Distance_precision > &__dist, int __way) const |
| bool | _M_can_advance (difference_type __n, bool __strict=false) const |
| bool | _M_dereferenceable () const |
| _Distance_traits< _Iterator >::__type | _M_get_distance_from_begin () const |
| _Distance_traits< _Iterator >::__type | _M_get_distance_to (const _Safe_iterator &__rhs) const |
| _Distance_traits< _Iterator >::__type | _M_get_distance_to_end () const |
| __gnu_cxx::__conditional_type< _IsConstant::__value, const _Sequence *, _Sequence * >::__type | _M_get_sequence () const |
| bool | _M_incrementable () const |
| bool | _M_is_before_begin () const |
| constexpr bool | _M_is_begin () const |
| bool | _M_is_beginnest () const |
| bool | _M_is_end () const |
| bool | _M_valid_range (const _Safe_iterator &__rhs, std::pair< difference_type, _Distance_precision > &__dist, bool __check_dereferenceable=true) const |
| bool | _M_value_initialized () const |
| constexpr const _Iterator & | base () const noexcept |
| constexpr _Iterator & | base () noexcept |
| constexpr | operator _Iterator () const noexcept |
| constexpr reference | operator* () const noexcept |
| constexpr _Safe_iterator & | operator++ () noexcept |
| constexpr _Safe_iterator | operator++ (int) noexcept |
| constexpr pointer | operator-> () const noexcept |
| constexpr _Safe_iterator & | operator= (_Safe_iterator &&__x) noexcept |
| constexpr _Safe_iterator & | operator= (const _Safe_iterator &__x) noexcept |
Static Public Member Functions | |
| static constexpr bool | _S_constant () |
Protected Member Functions | |
| constexpr | _Safe_iterator (const _Safe_iterator &__x, _Unchecked) noexcept |
Friends | |
| template<typename _IteR > | |
| constexpr friend bool | operator== (const _Self &__lhs, const _Safe_iterator< _IteR, _Sequence, iterator_category > &__rhs) noexcept |
| constexpr friend bool | operator== (const _Self &__lhs, const _Self &__rhs) noexcept |
Safe iterator wrapper.
The class template _Safe_iterator is a wrapper around an iterator that tracks the iterator's movement among sequences and checks that operations performed on the "safe" iterator are legal. In additional to the basic iterator operations (which are validated, and then passed to the underlying iterator), _Safe_iterator has member functions for iterator invalidation, attaching/detaching the iterator from sequences, and querying the iterator's state.
Note that _Iterator must be the first base class so that it gets initialized before the iterator is being attached to the container's list of iterators and it is being detached before _Iterator get destroyed. Otherwise it would result in a data race.
Definition at line 62 of file boost_concept_check.h.
|
inlineconstexprnoexcept |
Definition at line 172 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Safe iterator construction from an unsafe iterator and its sequence.
seq is not NULL Definition at line 182 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Copy construction.
Definition at line 191 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Move construction.
Definition at line 213 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Converting constructor from a mutable iterator to a constant iterator.
Definition at line 240 of file safe_iterator.h.
|
inline |
Attach iterator to the given sequence.
Definition at line 448 of file safe_iterator.h.
|
inline |
Likewise, but not thread-safe.
Definition at line 453 of file safe_iterator.h.
|
inline |
Is the iterator before a dereferenceable one?
Definition at line 463 of file safe_iterator.h.
|
inline |
Is the iterator dereferenceable?
Definition at line 458 of file safe_iterator.h.
|
inline |
Is the iterator incrementable?
Definition at line 475 of file safe_iterator.h.
Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_before_dereferenceable().
|
inline |
Is this iterator equal to the sequence's before_begin() iterator if any?
Definition at line 537 of file safe_iterator.h.
Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_dereferenceable().
|
inlineconstexpr |
Is this iterator equal to the sequence's begin() iterator?
Definition at line 526 of file safe_iterator.h.
|
inline |
Is this iterator equal to the sequence's before_begin() iterator if any or begin() otherwise?
Definition at line 543 of file safe_iterator.h.
|
inline |
Is this iterator equal to the sequence's end() iterator?
Definition at line 531 of file safe_iterator.h.
Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_dereferenceable(), and __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_incrementable().
|
inline |
Is the iterator value-initialized?
Definition at line 480 of file safe_iterator.h.
|
inlinestaticconstexpr |
Determine if this is a constant iterator.
Definition at line 425 of file safe_iterator.h.
Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_attach(), and __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_attach_single().
|
inlineconstexprnoexcept |
Return the underlying iterator.
Definition at line 433 of file safe_iterator.h.
Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_before_dereferenceable(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_is_begin(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_is_end(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::_M_value_initialized(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::operator++(), and __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >::operator=().
|
inlineconstexprnoexcept |
Conversion to underlying non-debug iterator to allow better interaction with non-debug containers.
Definition at line 444 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Iterator dereference.
Definition at line 348 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Iterator preincrement.
Definition at line 384 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Iterator postincrement.
Definition at line 408 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Iterator dereference.
Definition at line 366 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Move assignment.
Definition at line 305 of file safe_iterator.h.
|
inlineconstexprnoexcept |
Copy assignment.
Definition at line 266 of file safe_iterator.h.