UUID#

A version 4 UUID generator.

Info

To use declarations from this page, include the <essence/uuid.hpp> header.

Note

Performance

Generates 50,000,000 UUID’s over 100 iterations in an average of 1.387 seconds, or roughly 36 million per second.

class uuid#

Container class for a version 4 UUID. Specialization available for std::hash and std::formatter.

uuid::uuid()#

Default constructor, generates immediately.

std::string_view view() const noexcept#

Get a view of the UUID string.

std::string string() const#

Get a copy of the UUID string.

const std::string &cref() const#

Get a constant reference to the UUID string.

friend std::ostream &operator<<(std::ostream &os, const uuid &self)#

Stream overload for std::cout and the like.