Difference between revisions of "Template:cpp/container/size"
From cppreference.com
(move example to a template) |
|||
Line 22: | Line 22: | ||
===Example=== | ===Example=== | ||
− | {{ | + | {{example template | cpp/container/{{{1|}}}/example_size}} |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | }} | + | |
===See also=== | ===See also=== |
Revision as of 12:07, 16 May 2013
size_type size() const; |
||
Returns the number of elements in the container, i.e. std::distance(begin(), end()).
Contents |
Parameters
(none)
Return value
The number of elements in the container
Exceptions
noexcept specification:
noexcept
Complexity
Constant
Example
Templated example. The link is cpp/container/<PP>/example_size |