std::list::size

From cppreference.com
< cpp‎ | container‎ | list
size_type size() const;

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

Parameters

(none)

Return value

The number of elements in the container.

Exceptions

(none) (until C++11)
noexcept specification:  
noexcept
  
(since C++11)

Complexity

Constant or linear. (until C++11)
Constant. (since C++11)