std::experimental::ranges::prev
<experimental/ranges/iterator>
constexpr /* unspecified */ prev = /* unspecified */;
(customization point object)
constexpr I prev( I i );
constexpr I prev( I i, ranges::difference_type_t<I> n );
constexpr I prev( I i, ranges::difference_type_t<I> n, I bound );
Decrements the iterator i n times, or until bound is reached, whichever comes first, and returns the decremented iterator.
[edit] Customization point objects
The name ranges::prev
denotes a customization point object, which is a function object of a literal Semiregular
class type (denoted, for exposition purposes, as PrevT
). All instances of PrevT
are equal. Thus, ranges::prev
can be copied freely and its copies can be used interchangeably.
Given a set of types Args...
, if std::declval <Args>()... meet the requirements for arguments to ranges::prev
above, PrevT
will satisfy ranges::Invocable<const PrevT, Args...>. Otherwise, no function call operator of PrevT
participates in overload resolution.
In every translation unit in which ranges::prev
is defined, it refers to the same instance of the customization point object. (This means that it can be used freely in things like inline functions and function templates without violating the one-definition rule.)
[edit] Return value
The decremented iterator.
[edit] Example
Reason: no example