[libc++] Implement `operator<=>` for `thread::id`
authorAdrian Vogelsgesang <avogelsgesang@tableau.com>
Sun, 31 Jul 2022 23:12:42 +0000 (16:12 -0700)
committerAdrian Vogelsgesang <avogelsgesang@salesforce.com>
Sun, 14 Aug 2022 00:30:55 +0000 (17:30 -0700)
commit41e7665c4b8ed47d1802b1dc8a41be3eacf805ad
tree90e4d34fb09c7b434be5c527e82c5ed68815ed88
parent80c7e93a2a8448fa16fe28b99c733e93ec64df51
[libc++] Implement `operator<=>` for `thread::id`

The new operator<=> is mapped onto the existing functions
__libcpp_thread_id_equal and __libcpp_thread_id_less. Introducing a
new __libcpp_thread_id_compare_three_way might lead to more efficient
code. Given that we can still introduce __libcpp_thread_id_compare_three_way
later, for this commit I opted to not break ABI. If requested, I will
add __libcpp_thread_id_compare_three_way in a follow-up commit.

Implements part of P1614R2 "The Mothership has Landed"

Differential Revision: https://reviews.llvm.org/D131362
libcxx/docs/Status/SpaceshipProjects.csv
libcxx/include/__threading_support
libcxx/include/thread
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/cmp.pass.cpp [new file with mode: 0644]
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp [deleted file]
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp [deleted file]