2
0
mirror of https://github.com/boostorg/uuid.git synced 2026-01-19 04:42:16 +00:00
Files
uuid/README.md
2017-10-12 05:27:42 -07:00

3.2 KiB

Uuid, part of collection of the Boost C++ Libraries, provides a C++ wrapper around RFC-4122 UUIDs.

License

Distributed under the Boost Software License, Version 1.0.

Properties

  • C++03
  • Header-only

Build Status

Branch Travis Appveyor Coverity Coveralls Regression Tests
develop Build Status Build status N/A (Header-only) Enter the Matrix
master Build Status Build status Coverity Scan Build Status N/A (Header-only) Enter the Matrix

Directories

  • doc - Dcumentation
  • include - Interface headers of Uuid
  • test - Uuid unit tests

More information

Code Example - UUID Generation

// Copyright 2017 James E. King, III
// Distributed under the Boost Software License, Version 1.0. 
// (See http://www.boost.org/LICENSE_1_0.txt)
// mkuuid.cpp example

#include <boost/lexical_cast.hpp>
#include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <iostream>

int main(void)
{
    boost::uuids::random_generator gen;
    std::cout << boost::lexical_cast<std::string>(gen()) << std::endl;
    return 0;
}

----

$ clang++ -ansi -Wall -Wextra -std=c++03 -O3 mkuuid.cpp -o mkuuid
$ ./mkuuid
2c186eb0-89cf-4a3c-9b97-86db1670d5f4
$ ./mkuuid
a9d3fbb9-0383-4389-a8a8-61f6629f90b6