From cc2d06126653bb7c996685c17c19cb2fdefff2cd Mon Sep 17 00:00:00 2001 From: Hristo Hristov Date: Tue, 23 May 2023 23:03:35 +0300 Subject: [PATCH] [libc++][spaceship][NFC] Improved consistency - removed `inline` specifier for `operator<=>` Removed `inline` specifier for consistency as discussed in D148416 previously. Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D151248 --- libcxx/include/deque | 8 +++----- libcxx/include/forward_list | 9 +++------ libcxx/include/list | 8 +++----- libcxx/include/map | 17 ++++++----------- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/libcxx/include/deque b/libcxx/include/deque index c7d3cdaa5b48..210642464e50 100644 --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -2920,11 +2920,9 @@ operator<=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y) #else // _LIBCPP_STD_VER <= 17 -template -inline _LIBCPP_HIDE_FROM_ABI -__synth_three_way_result<_Tp> -operator<=>(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y) -{ +template +_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>); } diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list index 19a56acdca0e..5625a0b9b0d5 100644 --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -1774,12 +1774,9 @@ bool operator<=(const forward_list<_Tp, _Alloc>& __x, #else // #if _LIBCPP_STD_VER <= 17 -template -inline _LIBCPP_HIDE_FROM_ABI -__synth_three_way_result<_Tp> -operator<=>(const forward_list<_Tp, _Allocator>& __x, - const forward_list<_Tp, _Allocator>& __y) -{ +template +_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>); } diff --git a/libcxx/include/list b/libcxx/include/list index 0d87906871e8..dd56b893cf78 100644 --- a/libcxx/include/list +++ b/libcxx/include/list @@ -2345,11 +2345,9 @@ operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) #else // _LIBCPP_STD_VER <= 17 -template -inline _LIBCPP_HIDE_FROM_ABI -__synth_three_way_result<_Tp> -operator<=>(const list<_Tp, _Allocator>& __x, const list<_Tp, _Allocator>& __y) -{ +template +_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>); } diff --git a/libcxx/include/map b/libcxx/include/map index 98c5aca2be3e..eb7c204ac3b2 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -1737,12 +1737,9 @@ operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __x, #else // #if _LIBCPP_STD_VER <= 17 -template -inline _LIBCPP_HIDE_FROM_ABI -__synth_three_way_result> -operator<=>(const map<_Key, _Tp, _Compare, _Allocator>& __x, - const map<_Key, _Tp, _Compare, _Allocator>& __y) -{ +template +_LIBCPP_HIDE_FROM_ABI __synth_three_way_result> +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 @@ operator<=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x, #else // #if _LIBCPP_STD_VER <= 17 -template -inline _LIBCPP_HIDE_FROM_ABI -__synth_three_way_result> +template +_LIBCPP_HIDE_FROM_ABI __synth_three_way_result> 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(),