Documentation Home >> Headers >> <jss/concurrent_map.hpp> Header >> jss::concurrent_map >> size member function

Obtain the number of items stored in the map.

size_type size() const;

Returns:

The number of key/value pairs store in *this.

Throws:

Nothing.

Synchronization:

size() may be called concurrently with any other member function of jss::concurrent_map on a given instance (except for the constructor and destructor) without external synchronization.

Note:

size() returns the count at the point of the call. Operations on other threads may insert additional elements or remove existing ones between a call to size() and the caller making use of the returned size.

Header

#include <jss/concurrent_map.hpp>

See Also