from_string return value

This commit is contained in:
Marius Bancila 2019-01-28 09:09:50 +02:00
parent d660780bc4
commit dee14f660d

View File

@ -184,7 +184,7 @@ assert(id.has_value() && id.value().is_nil());
Member functions `variant()` and `version()` allow checking the variant type of the uuid and, respectively, the version type. These are defined by two strongly typed enums called `uuid_variant` and `uuid_version`. Member functions `variant()` and `version()` allow checking the variant type of the uuid and, respectively, the version type. These are defined by two strongly typed enums called `uuid_variant` and `uuid_version`.
```cpp ```cpp
uuid id = uuid::from_string("47183823-2574-4bfd-b411-99ed177d3e43"); uuid id = uuid::from_string("47183823-2574-4bfd-b411-99ed177d3e43").value();
assert(id.version() == uuid_version::random_number_based); assert(id.version() == uuid_version::random_number_based);
assert(id.variant() == uuid_variant::rfc); assert(id.variant() == uuid_variant::rfc);
``` ```