Region uuid generator7/25/2023 ![]() However, the Microsoft Guidelines Support Library (aka GSL) can be used for its span implementation (from which the standard version was defined). Otherwise, such as when building with C++17, std::span is not available. ![]() The check is done with the _cpp_lib_span feature-test macro. This is used by default, if the header is supported by your compiler. If you use the library in a project built with C++20, then you can use std::span. The library is supported on all major operating systems: Windows, Linux and Mac OS. This was fixed in GCC 9.2.Ī portable alternative is to use the Boost.Random library. See Bug 85494 - implementation of random_device on mingw is useless. In this case each std::random_device object may generate the same number sequence. a hardware device) is not available to the implementation. ![]() Std::random_device may be implemented in terms of an implementation-defined pseudo-random number engine if a non-deterministic source (e.g. If you generate uuids using the basic_uuid_random_generator and std::random_device to seed a generator, keep in mind that this might not be non-deterministic and actually generate the same sequence of numbers: Uuid id = uuids::uuid::from_string(str).value() The following is a list of examples for using the library: See the revision history of the proposal for history of changes. This library is an implementation of the proposal P0959.Īs the proposal evolves based on the standard committee and the C++ community feedback, this library implementation will reflect those changes. To write a UUID to an output stream using the canonical textual representation.Ĭreates a string with the canonical textual representation of a UUID. Although this operation does not make much logical sense, it is necessary in order to store UUIDs in a std::set. Namespace ID for name-based uuids when name string is an X.500 DN, in DER or a text output format (See, ).įor UUIDs comparison for equality/inequalityįor comparing whether one UUIDs is less than another. Namespace ID for name-based uuids when mame string is an ISO OID (See, ). Namespace ID for name-based uuids when name string is a URL. Namespace ID for name-based uuids when name string is a fully-qualified domain name. ![]() Specialization of hash for uuid (necessary for storing UUIDs in unordered associative containers, such as std::unordered_set) ![]() It is available only if the UUID_TIME_GENERATOR macro is defined. Note:This is an experimental feature and should not be used in any production code. It is available only if the UUID_SYSTEM_GENERATOR macro is defined.Īn experimental function object that generates time-based UUIDs. Note: This is not part of the standard proposal. The following types and utilities are available:Ī class representing a UUID this can be default constructed (a nil UUID), constructed from a range (defined by a pair of iterators), or from a span.Ī strongly type enum representing the type of a UUIDĪ strongly type enum representing the version of a UUIDĪ function object that generates version 4 UUIDs using a pseudo-random number generator engine.Ī basic_uuid_random_generator using the Mersenne Twister engine ( basic_uuid_random_generator)Ī function object that generates version 5, name-based UUIDs using SHA1 hashing.Ī function object that generates new UUIDs using operating system resources ( CoCreateGuid on Windows, uuid_generate on Linux, CFUUIDCreate on Mac)
0 Comments
Leave a Reply. |