Update P0959.md
removed redundant specification of operator<=>
This commit is contained in:
parent
3c5adc5cff
commit
96510aaaca
13
P0959.md
13
P0959.md
@ -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`.
|
||||
|
Loading…
Reference in New Issue
Block a user