[range.iter.op.prev]

# 24 Iterators library [[iterators]](./#iterators)

## 24.4 Iterator primitives [[iterator.primitives]](iterator.primitives#range.iter.op.prev)

### 24.4.4 Range iterator operations [[range.iter.ops]](range.iter.ops#range.iter.op.prev)

#### 24.4.4.5 ranges​::​prev [range.iter.op.prev]

[ð](#lib:prev)

`template<[bidirectional_iterator](iterator.concept.bidir#concept:bidirectional_iterator "24.3.4.12 Concept bidirectional_­iterator [iterator.concept.bidir]") I>
  constexpr I ranges::prev(I x);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L3150)

*Effects*: Equivalent to: --x; return x;

[ð](#lib:prev_)

`template<[bidirectional_iterator](iterator.concept.bidir#concept:bidirectional_iterator "24.3.4.12 Concept bidirectional_­iterator [iterator.concept.bidir]") I>
  constexpr I ranges::prev(I x, iter_difference_t<I> n);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L3162)

*Effects*: Equivalent to: ranges​::​advance(x, -n); return x;

[ð](#lib:prev__)

`template<[bidirectional_iterator](iterator.concept.bidir#concept:bidirectional_iterator "24.3.4.12 Concept bidirectional_­iterator [iterator.concept.bidir]") I>
  constexpr I ranges::prev(I x, iter_difference_t<I> n, I bound);
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L3174)

*Effects*: Equivalent to: ranges​::​advance(x, -n, bound); return x;
