From d660780bc4e703073b49ccf5f28239ca8a207bcd Mon Sep 17 00:00:00 2001 From: Marius Bancila Date: Mon, 28 Jan 2019 09:07:48 +0200 Subject: [PATCH] proof reading --- P0959.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/P0959.md b/P0959.md index 2345c60..a3c46b1 100644 --- a/P0959.md +++ b/P0959.md @@ -1,6 +1,6 @@ | ___ | ___ | | --- | --- | -| Doc. No.: | P0959R1 | +| Doc. No.: | P0959R2 | | Date: | 2019-01-08 | | Reply to: | Marius Bancila, Tony van Eerd | | Audience: | Library WG | @@ -465,7 +465,7 @@ namespace std { template, class Allocator = std::allocator> - static bool is_valid_uuid(std::basic_string& str) noexcept; + static bool is_valid_uuid(std::basic_string const & str) noexcept; template static uuid from_string(CharT const * str); @@ -473,7 +473,7 @@ namespace std { template, class Allocator = std::allocator> - static uuid from_string(std::basic_string& str); + static uuid from_string(std::basic_string const & str); private: template friend std::basic_ostream & operator<<(std::basic_ostream &s, uuid const & id); @@ -498,7 +498,9 @@ namespace std { ``` ### Generators -`basic_uuid_random_generator` is a class template for generating random or pseudo-random UUIDs (version 4, i.e. `uuid_version::random_number_based`). The type template parameter represents a function object that implements both the [`RandomNumberEngine`](http://en.cppreference.com/w/cpp/concept/UniformRandomBitGenerator) and [`UniformRandomBitGenerator`](http://en.cppreference.com/w/cpp/concept/RandomNumberEngine) concepts. `basic_uuid_random_generator` can be either default constructed or constructed with a reference or pointer to a an objects that satisfies the `UniformRandomNumberGenerator` requirements. +`basic_uuid_random_generator` is a class template for generating random or pseudo-random UUIDs (version 4, i.e. `uuid_version::random_number_based`). +The type template parameter represents a function object that implements both the [`RandomNumberEngine`](http://en.cppreference.com/w/cpp/concept/UniformRandomBitGenerator) and [`UniformRandomBitGenerator`](http://en.cppreference.com/w/cpp/concept/RandomNumberEngine) concepts. +`basic_uuid_random_generator` can be constructed with a reference or pointer to a an objects that satisfies the `UniformRandomNumberGenerator` requirements. ```cpp namespace std { template @@ -520,7 +522,7 @@ namespace std { using uuid_random_generator = basic_uuid_random_generator; } ``` -`uuid_name_generator` is a function object that generates new UUIDs from a name. It has to be initialized with another UUID and has overloaded `operator()` for both `std::string_view` and `std::wstring_view`. +`uuid_name_generator` is a function object that generates new UUIDs from a name and has to be initialized with another UUID. This generator produces different uuids for the same text represented in different character sets or encodings. In order words, the uuids generated from "jane" and L"jane" are different. ```cpp @@ -544,7 +546,7 @@ namespace std { `uuid_time_generator` is a function object that generates a time-based UUID as described in the RFC4122 document. The generated uuid's parts are as follows: * the timestamp is a 60-bit value, representing the number of 100 nanosecond intervals since 15 October 1582 00:00:000000000. * the clock sequence is a 14-bit value, that is initially a high-quality pseudo-random value; when the previous value is known, it is simply incremented by one. -* the node identifier is a IEEE 802 MAC address (when multiple are available any could be used); if no such address is available, a pseudo-randomly generated value may be used, in which case the multicast bit (least significant bit of the first byte) is set to 1, this to avoid clashes with legitimate IEEE 802 addresses. +* the node identifier is an IEEE 802 MAC address (when multiple are available any could be used); if no such address is available, a pseudo-randomly generated value may be used, in which case the multicast bit (least significant bit of the first byte) is set to 1, this to avoid clashes with legitimate IEEE 802 addresses. ```cpp namespace std { class uuid_time_generator @@ -617,7 +619,7 @@ namespace std { template, class Allocator = std::allocator> - static bool is_valid_uuid(std::basic_string& str) noexcept; + static bool is_valid_uuid(std::basic_string const & str) noexcept; template static uuid from_string(CharT const * str); @@ -625,7 +627,7 @@ namespace std { template, class Allocator = std::allocator> - static uuid from_string(std::basic_string& str); + static uuid from_string(std::basic_string const & str); private: template friend std::basic_ostream & operator<<(std::basic_ostream &s, uuid const & id);