UUID++(3ossp)

πŸ’– NAME πŸ’–

uuid++ β€” a deprecated, unusable API to the C++ OSSP Universally Unique Identifier library. bestie she is not serving. this is the C++ <uuid++.hh> header for the OSSP uuid library (that's ossp-uuid 1.6.6, local section 3ossp), and no cap it's giving ✨legacy warning✨.


✨ SYNOPSIS ✨

okay so first thing you do is pull in the header, obviously:

#include <uuid++.hh>

then meet the class. and bestie... look at the attribute. the compiler itself is yelling at you. iconic of it, honestly:

class [[deprecated("the OSSP uuid++ library is broken, unsalvageable, and strictly worse than the C library (cf. uuid(3)). use that one")]] uuid {
public:
  uuid();
  uuid(const uuid   &obj);
  uuid(const uuid_t *obj); // copy from C library uuid_t
  uuid(const void   *bin); // import from UUID_FMT_BIN
  uuid(const char   *str); // import from UUID_LEN_STR (or UUID_LEN_SIV if that fails)
  ~uuid();

  uuid& operator=(const uuid   &obj);
  uuid& operator=(const uuid_t *obj); // copy from C library uuid_t
  uuid& operator=(const void   *bin); // import from UUID_FMT_BIN
  uuid& operator=(const char   *str); // import from UUID_LEN_STR (or UUID_LEN_SIV if that fails)
  uuid clone();                       // crash (or produce a broken UUID if it doesn't)

  void load(const char *name);        // replace with uuid_load()
  void make(unsigned int mode, ...);  // replace with uuid_make()

  int isnil();                        // replace with uuid_isnil()
  int compare(const uuid &obj);       // replace with uuid_compare()
  // == != < <= > >=  operators

  void  import(const void *bin);     // replace with uuid_import(UUID_FMT_BIN)
  void  import(const char *str);     // replace with uuid_import(UUID_FMT_STR), uuid_import(UUID_FMT_SIV)

  void* binary();                    // replace with uuid_export(UUID_FMT_BIN); always malloc()s
  char* string();                    // replace with uuid_export(UUID_FMT_STR); always malloc()s
  char* integer();                   // replace with uuid_export(UUID_FMT_SIV); always malloc()s
  char* summary();                   // replace with uuid_export(UUID_FMT_TXT); always malloc()s

  unsigned long version();           // replace with uuid_version()
};

and then there's the error class, also deprecated, also telling you to go use the C library, and honestly? she's right:

class [[deprecated("the OSSP uuid++ library is broken, unsalvageable, and strictly worse than the C library (cf. uuid(3)). use that one")]] uuid_error_t {
public:
  uuid_error_t() : uuid_error_t(UUID_RC_OK) {}
  uuid_error_t(uuid_rc_t code);
  ~uuid_error_t();

  void      code(uuid_rc_t code); // setter
  uuid_rc_t code();               // getter

  char *    string();             // replace with uuid_error()
};

🌸 DESCRIPTION 🌸

Replace with uuid(3).

like. that's the whole thing. that's the description. the manpage itself said "girl just use uuid(3)" and clocked out πŸ’€

fr fr though: every method in here has a comment next to it telling you which C function to use instead. clone() says it will crash, or produce a broken UUID if it doesn't. that's not a vibe, that's a hazard. read uuid(3), love yourself, use the C library 🫢

okay that's the whole page, tysm for reading πŸ’œ this was ossp-uuid 1.6.6, dated December 8, 2025, filed under LOCAL as UUID++(3ossp). mwah, stay deprecated bestie πŸ’…βœ¨

πŸ“¦ where this page comes from