[vector.data]

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

## 23.3 Sequence containers [[sequences]](sequences#vector.data)

### 23.3.13 Class template vector [[vector]](vector#data)

#### 23.3.13.4 Data [vector.data]

[ð](#lib:data,vector)

`constexpr T*       data() noexcept;
constexpr const T* data() const noexcept;
`

[1](#1)

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

*Returns*: A pointer such that [data(), data() + size()) is a valid range[.](#1.sentence-1)

For a
non-empty vector, data() == addressof(front()) is true[.](#1.sentence-2)

[2](#2)

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

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