- Qt 5.15
- Qt Core
- C++ Classes
- const_iterator
- Qt 5.15.15 Reference Documentation

# Obsolete Members for const_iterator

The following members of class const_iterator are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(obsolete)` const_iterator | operator+(int j) const
`(obsolete)` const_iterator & | operator+=(int j)
`(obsolete)` const_iterator | operator-(int j) const
`(obsolete)` const_iterator & | operator--()
`(obsolete)` const_iterator | operator--(int)
`(obsolete)` const_iterator & | operator-=(int j)

## Member Function Documentation

### const_iterator const_iterator::operator+(int j) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This operator is deprecated in order to align with std::unordered_map functionality.

Returns an iterator to the item at j positions forward from this iterator. (If j is negative, the iterator goes backward.)

This operation can be slow for large j values.

See also operator-().

### const_iterator &const_iterator::operator+=(int j)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This operator is deprecated in order to align with std::unordered_map functionality.

Advances the iterator by j items. (If j is negative, the iterator goes backward.)

This operation can be slow for large j values.

See also operator-=() and operator+().

### const_iterator const_iterator::operator-(int j) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This operator is deprecated in order to align with std::unordered_map functionality.

Returns an iterator to the item at j positions backward from this iterator. (If j is negative, the iterator goes forward.)

This operation can be slow for large j values.

See also operator+().

### const_iterator &const_iterator::operator--()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This operator is deprecated in order to align with std::unordered_map functionality.

The prefix -- operator (`--i`) makes the preceding item current and returns an iterator pointing to the new current item.

Calling this function on QHash::begin() leads to undefined results.

See also operator++().

### const_iterator const_iterator::operator--(int)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This operator is deprecated in order to align with std::unordered_map functionality.

This is an overloaded function.

The postfix -- operator (`i--`) makes the preceding item current and returns an iterator pointing to the previously current item.

### const_iterator &const_iterator::operator-=(int j)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This operator is deprecated in order to align with std::unordered_map functionality.

Makes the iterator go back by j items. (If j is negative, the iterator goes forward.)

This operation can be slow for large j values.

See also operator+=() and operator-().