W3cubDocs

/C++

std::dynarray::empty

bool empty() const;
(since {std})

Checks if the container has no elements, i.e. whether begin() == end().

Parameters

(none).

Return value

true if the container is empty, false otherwise.

Exceptions

noexcept specification:
noexcept

Complexity

Constant.

Example

Template:cpp/container/dynarray/example empty

See also

returns the number of elements
(public member function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/container/dynarray/empty