array::data

Access the underlying array directly.

Synopsis

value*
data() noexcept; (1)

value const*
data() const noexcept; (2)

Description

Returns a pointer to the underlying array serving as element storage. The value returned is such that the range [data(), data() + size()) is always a valid range, even if the container is empty.

If size() == 0, the function may or may not return a null pointer.

Complexity

Constant.

Exception Safety

No-throw guarantee.