FreeBSD Manual Pages
std::ranges...brange::prev(3) C++ Standard Libarystd::ranges...brange::prev(3) NAME std::ranges::subrange::prev - std::ranges::subrange::prev Synopsis [[nodiscard]] constexpr subrange prev( std::iter_difference_t<I> n = 1 ) const (since C++20) requires std::bidirectional_iterator<I>; Obtains a subrange whose iterator is decremented by n times or in- cremented by min(-n, size()) times respect to that of *this, when n >= 0 or n < 0 respectively. Equivalent to auto tmp = *this; tmp.advance(-n); return tmp;. The behavior is undefined if the iterator is decremented after being a non-decre- mentable value. Parameters n - number of minimal decrements of the iterator Return value A subrange whose iterator is decremented by n times or incremented by min(-n, size()) times respect to that of *this, when n >= 0 or n < 0 respec- tively. Complexity Generally n decrements or min(-n, size()) increments on the itera- tor, when n >= 0 or n < 0 respectively. Constant if I models random_access_iterator, and either n >= 0 or std::sized_sentinel_for<S, I> is modeled. Example This section is incomplete Reason: no example See also next obtains a copy of the subrange with its iterator ad- vanced by a given (C++20) distance (public member function) advance advances the iterator by given distance (C++20) (public member function) prev decrement an iterator (C++11) (function template) ranges::prev decrement an iterator by a given distance or to a bound (C++20) (niebloid) Category: * Todo no example http://cppreference.com 2024.06.10 std::ranges...brange::prev(3)
NAME | Synopsis | Parameters | Return value | Complexity | Example | See also | Category:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::ranges::subrange::prev&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
