: private _Iterator,
public _Safe_iterator_base
{
- typedef _Iterator _Iter_base;
- typedef _Safe_iterator_base _Safe_base;
-
typedef std::iterator_traits<_Iterator> _Traits;
protected:
_GLIBCXX20_CONSTEXPR
_Safe_iterator(const _Safe_iterator& __x, _Unchecked) _GLIBCXX_NOEXCEPT
- : _Iter_base(__x.base()), _Safe_base()
- {
- if (!std::__is_constant_evaluated())
- _M_attach(__x._M_sequence);
- }
+ : _Iterator(__x), _Safe_iterator_base(__x, _S_constant())
+ { }
public:
typedef _Iterator iterator_type;
/// @post the iterator is singular and unattached
_GLIBCXX20_CONSTEXPR
- _Safe_iterator() _GLIBCXX_NOEXCEPT : _Iter_base() { }
+ _Safe_iterator() _GLIBCXX_NOEXCEPT : _Iterator() { }
/**
* @brief Safe iterator construction from an unsafe iterator and
_GLIBCXX20_CONSTEXPR
_Safe_iterator(_Iterator __i, const _Safe_sequence_base* __seq)
_GLIBCXX_NOEXCEPT
- : _Iter_base(__i), _Safe_base(__seq, _S_constant())
+ : _Iterator(__i), _Safe_iterator_base(__seq, _S_constant())
{ }
/**
*/
_GLIBCXX20_CONSTEXPR
_Safe_iterator(const _Safe_iterator& __x) _GLIBCXX_NOEXCEPT
- : _Iter_base(__x.base()), _Safe_base()
+ : _Iterator(__x), _Safe_iterator_base()
{
if (std::__is_constant_evaluated())
return;
*/
_GLIBCXX20_CONSTEXPR
_Safe_iterator(_Safe_iterator&& __x) noexcept
- : _Iter_base()
+ : _Iterator()
{
if (std::__is_constant_evaluated())
{
std::__are_same<_MutableIterator, _OtherIterator>::__value,
_Category>::__type>& __x)
_GLIBCXX_NOEXCEPT
- : _Iter_base(__x.base())
+ : _Iterator(__x.base())
{
if (std::__is_constant_evaluated())
return;
/** Attach iterator to the given sequence. */
void
_M_attach(const _Safe_sequence_base* __seq)
- { _Safe_base::_M_attach(__seq, _S_constant()); }
+ { _Safe_iterator_base::_M_attach(__seq, _S_constant()); }
/** Likewise, but not thread-safe. */
void
_M_attach_single(const _Safe_sequence_base* __seq)
- { _Safe_base::_M_attach_single(__seq, _S_constant()); }
+ { _Safe_iterator_base::_M_attach_single(__seq, _S_constant()); }
/// Is the iterator dereferenceable?
bool
/// Is the iterator value-initialized?
bool
_M_value_initialized() const
- { return _M_version == 0 && base() == _Iter_base(); }
+ { return _M_version == 0 && base() == _Iterator(); }
// Can we advance the iterator @p __n steps (@p __n may be negative)
bool
: private _Iterator
, public _Safe_local_iterator_base
{
- typedef _Iterator _Iter_base;
- typedef _Safe_local_iterator_base _Safe_base;
-
typedef typename _UContainer::size_type size_type;
typedef std::iterator_traits<_Iterator> _Traits;
struct _Unchecked { };
- _Safe_local_iterator(const _Safe_local_iterator& __x,
- _Unchecked) noexcept
- : _Iter_base(__x.base())
- { _M_attach(__x._M_safe_container()); }
+ _Safe_local_iterator(const _Safe_local_iterator& __x, _Unchecked) noexcept
+ : _Iterator(__x), _Safe_local_iterator_base(__x, _S_constant())
+ { }
public:
typedef _Iterator iterator_type;
typedef typename _Traits::pointer pointer;
/// @post the iterator is singular and unattached
- _Safe_local_iterator() noexcept : _Iter_base() { }
+ _Safe_local_iterator() noexcept : _Iterator() { }
/**
* @brief Safe iterator construction from an unsafe iterator and
*/
_Safe_local_iterator(_Iterator __i,
const _Safe_unordered_container_base* __cont)
- : _Iter_base(__i), _Safe_base(__cont, _S_constant())
+ : _Iterator(__i), _Safe_local_iterator_base(__cont, _S_constant())
{ }
/**
* @brief Copy construction.
*/
_Safe_local_iterator(const _Safe_local_iterator& __x) noexcept
- : _Iter_base(__x.base())
+ : _Iterator(__x)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 408. Is vector<reverse_iterator<char*> > forbidden?
* @post __x is singular and unattached
*/
_Safe_local_iterator(_Safe_local_iterator&& __x) noexcept
- : _Iter_base()
+ : _Iterator()
{
_GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
|| __x._M_value_initialized(),
typename __gnu_cxx::__enable_if<_IsConstant::__value &&
std::__are_same<_MutableIterator, _OtherIterator>::__value,
_UContainer>::__type>& __x) noexcept
- : _Iter_base(__x.base())
+ : _Iterator(__x.base())
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 408. Is vector<reverse_iterator<char*> > forbidden?
/** Attach iterator to the given unordered container. */
void
_M_attach(const _Safe_unordered_container_base* __cont)
- { _Safe_base::_M_attach(__cont, _S_constant()); }
+ { _Safe_local_iterator_base::_M_attach(__cont, _S_constant()); }
/** Likewise, but not thread-safe. */
void
_M_attach_single(const _Safe_unordered_container_base* __cont)
- { _Safe_base::_M_attach_single(__cont, _S_constant()); }
+ { _Safe_local_iterator_base::_M_attach_single(__cont, _S_constant()); }
/// Is the iterator dereferenceable?
bool
/// Is the iterator value-initialized?
bool
_M_value_initialized() const
- { return _M_version == 0 && base() == _Iter_base{}; }
+ { return _M_version == 0 && base() == _Iterator{}; }
// Is the iterator range [*this, __rhs) valid?
bool