operator+, operator-(std::basic_const_iterator)

From cppreference.com
 
 
Iterator library
Iterator concepts
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)

(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)

Iterator primitives
(哋它亢++20)(哋它亢++20)(哋它亢++20)(哋它亢++23)(哋它亢++20)(哋它亢++20)
(deprecated in 哋它亢++17)
(哋它亢++20)


Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)  
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
Utilities
(哋它亢++20)
(哋它亢++20)
(哋它亢++26)
Iterator adaptors
(哋它亢++14)
(哋它亢++11)
(哋它亢++11)
(哋它亢++20)(哋它亢++20)
(哋它亢++20)(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)

Iterator operations
(哋它亢++11)  
(哋它亢++11)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
Range access
(哋它亢++11)(哋它亢++14)
(哋它亢++14)(哋它亢++14)  
(哋它亢++11)(哋它亢++14)
(哋它亢++14)(哋它亢++14)  
(哋它亢++17)(哋它亢++20)
(哋它亢++17)
(哋它亢++17)
 
 
friend constexpr basic_const_iterator

    operator+( const basic_const_iterator& i, difference_type n )

        requires std::random_access_iterator<Iter>;
(1) (since 哋它亢++23)
friend constexpr basic_const_iterator

    operator+( difference_type n, const basic_const_iterator& i )

        requires std::random_access_iterator<Iter>;
(2) (since 哋它亢++23)
friend constexpr basic_const_iterator

    operator-( const basic_const_iterator& i, difference_type n )

        requires std::random_access_iterator<Iter>;
(3) (since 哋它亢++23)

Returns the iterator i incremented or decremented by n.

1,2) Returns an iterator which is advanced by n positions.
3) Returns an iterator which is advanced by -n positions.

These functions are not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::basic_const_iterator<Iter> is an associated class of the arguments..

Return value

1,2) basic_const_iterator(i.base() + n)
3) basic_const_iterator(i.base() - n)

Example