[libcxx-commits] [PATCH] D151248: [libc++][spaceship][NFC] Improved consistency - removed `inline` specifier for `operator<=>`

Hristo Hristov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 25 00:20:43 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGcc2d06126653: [libc++][spaceship][NFC] Improved consistency - removed `inline` specifier for… (authored by Zingam).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151248/new/

https://reviews.llvm.org/D151248

Files:
  libcxx/include/deque
  libcxx/include/forward_list
  libcxx/include/list
  libcxx/include/map


Index: libcxx/include/map
===================================================================
--- libcxx/include/map
+++ libcxx/include/map
@@ -1737,12 +1737,9 @@
 
 #else // #if _LIBCPP_STD_VER <= 17
 
-template<class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI
-__synth_three_way_result<pair<const _Key, _Tp>>
-operator<=>(const map<_Key, _Tp, _Compare, _Allocator>& __x,
-            const map<_Key, _Tp, _Compare, _Allocator>& __y)
-{
+template <class _Key, class _Tp, class _Compare, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<pair<const _Key, _Tp>>
+operator<=>(const map<_Key, _Tp, _Compare, _Allocator>& __x, const map<_Key, _Tp, _Compare, _Allocator>& __y) {
     return std::lexicographical_compare_three_way(
         __x.begin(),
         __x.end(),
@@ -2351,12 +2348,10 @@
 
 #else // #if _LIBCPP_STD_VER <= 17
 
-template<class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI
-__synth_three_way_result<pair<const _Key, _Tp>>
+template <class _Key, class _Tp, class _Compare, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<pair<const _Key, _Tp>>
 operator<=>(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
-            const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
-{
+            const multimap<_Key, _Tp, _Compare, _Allocator>& __y) {
     return std::lexicographical_compare_three_way(
         __x.begin(),
         __x.end(),
Index: libcxx/include/list
===================================================================
--- libcxx/include/list
+++ libcxx/include/list
@@ -2345,11 +2345,9 @@
 
 #else // _LIBCPP_STD_VER <= 17
 
-template<class _Tp, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI
-__synth_three_way_result<_Tp>
-operator<=>(const list<_Tp, _Allocator>& __x, const list<_Tp, _Allocator>& __y)
-{
+template <class _Tp, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Tp>
+operator<=>(const list<_Tp, _Allocator>& __x, const list<_Tp, _Allocator>& __y) {
     return std::lexicographical_compare_three_way(
         __x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Tp, _Tp>);
 }
Index: libcxx/include/forward_list
===================================================================
--- libcxx/include/forward_list
+++ libcxx/include/forward_list
@@ -1774,12 +1774,9 @@
 
 #else // #if _LIBCPP_STD_VER <= 17
 
-template<class _Tp, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI
-__synth_three_way_result<_Tp>
-operator<=>(const forward_list<_Tp, _Allocator>& __x,
-            const forward_list<_Tp, _Allocator>& __y)
-{
+template <class _Tp, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Tp>
+operator<=>(const forward_list<_Tp, _Allocator>& __x, const forward_list<_Tp, _Allocator>& __y) {
     return std::lexicographical_compare_three_way(
         __x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Tp, _Tp>);
 }
Index: libcxx/include/deque
===================================================================
--- libcxx/include/deque
+++ libcxx/include/deque
@@ -2920,11 +2920,9 @@
 
 #else // _LIBCPP_STD_VER <= 17
 
-template<class _Tp, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI
-__synth_three_way_result<_Tp>
-operator<=>(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
-{
+template <class _Tp, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Tp>
+operator<=>(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y) {
     return std::lexicographical_compare_three_way(
         __x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Tp, _Tp>);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151248.525465.patch
Type: text/x-patch
Size: 3678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230525/85331bd0/attachment.bin>


More information about the libcxx-commits mailing list