[container.rev.reqmts]

# 23 Containers library [[containers]](./#containers)

## 23.2 Requirements [[container.requirements]](container.requirements#container.rev.reqmts)

### 23.2.2 General containers [[container.requirements.general]](container.requirements.general#container.rev.reqmts)

#### 23.2.2.3 Reversible container requirements [container.rev.reqmts]

[1](#1)

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

A type X meets the [*reversible container*](#def:container,reversible "23.2.2.3 Reversible container requirements [container.rev.reqmts]") requirements ifX meets the container requirements,
the iterator type of X belongs to the
bidirectional or random access iterator categories ([[iterator.requirements]](iterator.requirements "24.3 Iterator requirements")),
and
the following types and expressions are well-formed and have
the specified semantics[.](#1.sentence-1)

[ð](#lib:reverse_iterator,containers)

`typename X::reverse_iterator
`

[2](#2)

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

*Result*: The type reverse_iterator<X​::​iterator>,
an iterator type whose value type is T[.](#2.sentence-1)

[ð](#lib:const_reverse_iterator,containers)

`typename X::const_reverse_iterator
`

[3](#3)

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

*Result*: The type reverse_iterator<X​::​const_iterator>,
a constant iterator type whose value type is T[.](#3.sentence-1)

[ð](#lib:rbegin,containers)

`a.rbegin()
`

[4](#4)

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

*Result*: reverse_iterator;const_reverse_iterator for constant a[.](#4.sentence-1)

[5](#5)

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

*Returns*: reverse_iterator(end())

[6](#6)

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

*Complexity*: Constant[.](#6.sentence-1)

[ð](#lib:rend,containers)

`a.rend()
`

[7](#7)

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

*Result*: reverse_iterator;const_reverse_iterator for constant a[.](#7.sentence-1)

[8](#8)

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

*Returns*: reverse_iterator(begin())

[9](#9)

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

*Complexity*: Constant[.](#9.sentence-1)

[ð](#lib:crbegin,containers)

`a.crbegin()
`

[10](#10)

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

*Result*: const_reverse_iterator[.](#10.sentence-1)

[11](#11)

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

*Returns*: const_cast<X const&>(a).rbegin()

[12](#12)

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

*Complexity*: Constant[.](#12.sentence-1)

[ð](#lib:crend,containers)

`a.crend()
`

[13](#13)

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

*Result*: const_reverse_iterator[.](#13.sentence-1)

[14](#14)

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

*Returns*: const_cast<X const&>(a).rend()

[15](#15)

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

*Complexity*: Constant[.](#15.sentence-1)
