Documentation Home >> Headers >> <mutex> Header >> std::mutex >> std::mutex Default Constructor

Construct a std::mutex object.

mutex();

Effects:

Constructs a std::mutex instance.

Postconditions:

The newly-constructed std::mutex object is initially unlocked.

Throws:

An exception of type std::system_error if unable to create a new std::mutex instance.

Header

#include <mutex>

See Also