Namespaces
Variants
Views
Actions

std::dynarray::size

From cppreference.com
< cpp‎ | container‎ | dynarray
Revision as of 19:30, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
size_type size() const;
(since {std})

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

Contents

[edit] Parameters

(none)

[edit] Return value

The number of elements in the container.

[edit] Exceptions

noexcept specification:  
noexcept
  

[edit] Complexity

Constant.

[edit] Example

Template:cpp/container/dynarray/example size

[edit] See also

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