##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::dynarray::size

From cppreference.com
< cpp‎ | container‎ | dynarray

[edit template]

size_type size() const; |  | (since {std})

Returns the number of elements in the container, i.e. std::distance(begin(), end()).

### [edit] Parameters

(none)

### [edit] Return value

The number of elements in the container.

### [edit] Exceptions

`noexcept` specification:
noexcept

### [edit] Complexity

Constant.

### [edit] Example

[edit]
Template:cpp/container/dynarray/example size

### [edit] See also

empty | checks whether the container is empty (public member function) [edit]
max_size | returns the maximum possible number of elements (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/container/dynarray/size&oldid=50491"
Category:

- unconditionally noexcept