Documentation Home >> Headers >> <jss/concurrent_map.hpp> Header >> jss::concurrent_map >> jss::concurrent_map constructor

Construct a new empty jss::concurrent_map instance using copies of the specified Hasher and KeyEquals objects.

explicit concurrent_map(
    Hasher const& hasher=Hasher(),
    KeyEquals const& equals=KeyEquals());

Effects:

Constructs an empty jss::concurrent_map instance. Copies of the specified Hasher and KeyEquals objects are stored in the map object, and will be used for hashing or comparing all keys stored in the map.

Throws:

std::bad_alloc if memory required for the internal storage of the jss::concurrent_map cannot be allocated; any exceptions thrown by the copy constructors of Hasher and KeyEquals.

Postconditions:

size() returns 0, and empty() returns true when called on the newly created object.

Synchronization:

The constructor of a jss::concurrent_map instance must not run concurrently with any other member functions called on the same object. Users must ensure (through the use of external synchronization) that the completion of the constructor happens-before any calls to member functions on the same object.

Header

#include <jss/concurrent_map.hpp>

See Also