Update P0959.md

removed redundant specification of operator<=>
This commit is contained in:
Marius Bancila 2018-11-02 23:11:33 +02:00 committed by GitHub
parent 3c5adc5cff
commit 96510aaaca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,19 +255,6 @@ assert(to_wstring(id) == L"47183823-2574-4bfd-b411-99ed177d3e43");
The order of the internal UUID bytes reflects directly into the string bytes order. That is, for a UUID with the internal bytes in the form `aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp` the resulted string has the form `"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp"`.
### `operator<=>`
Member `operator<=>` is provided in order to compare `uuid` values. The return value is `std::strong_ordering`.
```cpp
uuid empty;
uuid id = uuid::from_string("47183823-2574-4bfd-b411-99ed177d3e43");
assert(empty == empty);
assert(id == id);
assert(empty != id);
```
### Hashing
A `std::hash<>` specialization for `uuid` is provided in order to enable the use of `uuid`s in associative unordered containers such as `std::unordered_set`.