libstud-uuid

[brief]

Portable UUID generation library for C++

A portable, dependency-free, MIT-licensed UUID generation library for C++ that tries to make reasonably sure the generated IDs are unique.

Specifically, the implementation calls platform-specific APIs that were carefully analyzed for uniqueness guarantees (good source of randomness, time collision prevention, etc). If an API does not explicitly provide such guarantees or if such guarantees are only provided for certain UUID versions, then the implementation will refuse to return such a UUID if a strong uniqueness was requested.

Typical usage:

#include <string>
#include <iostream>

#include <libstud/uuid.hxx>

int main ()
{
  using stud::uuid;
  using namespace std;

  uuid u (uuid::generate ()); // Make strong ID using system generator.
  string s (u.string ());     // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  cout << u << endl;          // Print string representation.
}

See the libstud/uuid/uuid.hxx and libstud/uuid/uuid-io.hxx headers for interface details and the NEWS file for changes. See the cppget.org/libstud-uuid package page for build status.

license MIT
project libstud
url github.com/libstud/libstud-uuid
topics C++UUIDidentification
8 Versions
version 1.0.7
repository https://pkg.cppget.org/1/stable
depends 0
version 1.0.6+2
repository https://pkg.cppget.org/1/stable
depends 0
version 1.0.5
repository https://pkg.cppget.org/1/stable
depends 0
version 1.0.4
repository https://pkg.cppget.org/1/stable
depends 0
version 1.0.3
repository https://pkg.cppget.org/1/stable
depends 0
version 1.0.2
repository https://pkg.cppget.org/1/legacy
depends 0
version 1.0.1+1
repository https://pkg.cppget.org/1/legacy
depends 0
version 1.0.0
repository https://pkg.cppget.org/1/legacy
depends 0