From 0c2f9b50947bdf79512deb5ade2dc0c3a07ae110 Mon Sep 17 00:00:00 2001 From: Marius Bancila Date: Fri, 2 Nov 2018 23:13:56 +0200 Subject: [PATCH] Update P0959.md from_string() --- P0959.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/P0959.md b/P0959.md index fa28cec..0a30b9a 100644 --- a/P0959.md +++ b/P0959.md @@ -178,7 +178,7 @@ std::array arr{ { } }; uuid id1{ std::span{arr} }; -uuid id2{"47183823-2574-4bfd-b411-99ed177d3e43"}; +uuid id2 = uuid::from_string("47183823-2574-4bfd-b411-99ed177d3e43"); assert(id1 == id2); std::set ids{ @@ -324,7 +324,7 @@ assert(id1.variant() == uuid_variant::rfc); ``` Examples for genearting new UUIDs with the `uuid_name_generator` class: ```cpp -uuid_name_generator dgen(uuid{"415ccc2b-f5cf-4ec1-b544-45132a518cc8"}); +uuid_name_generator dgen(uuid::from_string("415ccc2b-f5cf-4ec1-b544-45132a518cc8")); auto id1 = dgen("john"); assert(!id1.is_nil()); assert(id1.size() == 16);