Skip to content

Commit cc2d061

Browse files
committed
[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
1 parent 246626a commit cc2d061

File tree

4 files changed

+15
-27
lines changed

4 files changed

+15
-27
lines changed

libcxx/include/deque

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,11 +2920,9 @@ operator<=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
29202920

29212921
#else // _LIBCPP_STD_VER <= 17
29222922

2923-
template<class _Tp, class _Allocator>
2924-
inline _LIBCPP_HIDE_FROM_ABI
2925-
__synth_three_way_result<_Tp>
2926-
operator<=>(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
2927-
{
2923+
template <class _Tp, class _Allocator>
2924+
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Tp>
2925+
operator<=>(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y) {
29282926
return std::lexicographical_compare_three_way(
29292927
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Tp, _Tp>);
29302928
}

libcxx/include/forward_list

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,12 +1774,9 @@ bool operator<=(const forward_list<_Tp, _Alloc>& __x,
17741774

17751775
#else // #if _LIBCPP_STD_VER <= 17
17761776

1777-
template<class _Tp, class _Allocator>
1778-
inline _LIBCPP_HIDE_FROM_ABI
1779-
__synth_three_way_result<_Tp>
1780-
operator<=>(const forward_list<_Tp, _Allocator>& __x,
1781-
const forward_list<_Tp, _Allocator>& __y)
1782-
{
1777+
template <class _Tp, class _Allocator>
1778+
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Tp>
1779+
operator<=>(const forward_list<_Tp, _Allocator>& __x, const forward_list<_Tp, _Allocator>& __y) {
17831780
return std::lexicographical_compare_three_way(
17841781
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Tp, _Tp>);
17851782
}

libcxx/include/list

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,11 +2345,9 @@ operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
23452345

23462346
#else // _LIBCPP_STD_VER <= 17
23472347

2348-
template<class _Tp, class _Allocator>
2349-
inline _LIBCPP_HIDE_FROM_ABI
2350-
__synth_three_way_result<_Tp>
2351-
operator<=>(const list<_Tp, _Allocator>& __x, const list<_Tp, _Allocator>& __y)
2352-
{
2348+
template <class _Tp, class _Allocator>
2349+
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Tp>
2350+
operator<=>(const list<_Tp, _Allocator>& __x, const list<_Tp, _Allocator>& __y) {
23532351
return std::lexicographical_compare_three_way(
23542352
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Tp, _Tp>);
23552353
}

libcxx/include/map

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,12 +1737,9 @@ operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
17371737

17381738
#else // #if _LIBCPP_STD_VER <= 17
17391739

1740-
template<class _Key, class _Tp, class _Compare, class _Allocator>
1741-
inline _LIBCPP_HIDE_FROM_ABI
1742-
__synth_three_way_result<pair<const _Key, _Tp>>
1743-
operator<=>(const map<_Key, _Tp, _Compare, _Allocator>& __x,
1744-
const map<_Key, _Tp, _Compare, _Allocator>& __y)
1745-
{
1740+
template <class _Key, class _Tp, class _Compare, class _Allocator>
1741+
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<pair<const _Key, _Tp>>
1742+
operator<=>(const map<_Key, _Tp, _Compare, _Allocator>& __x, const map<_Key, _Tp, _Compare, _Allocator>& __y) {
17461743
return std::lexicographical_compare_three_way(
17471744
__x.begin(),
17481745
__x.end(),
@@ -2351,12 +2348,10 @@ operator<=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
23512348

23522349
#else // #if _LIBCPP_STD_VER <= 17
23532350

2354-
template<class _Key, class _Tp, class _Compare, class _Allocator>
2355-
inline _LIBCPP_HIDE_FROM_ABI
2356-
__synth_three_way_result<pair<const _Key, _Tp>>
2351+
template <class _Key, class _Tp, class _Compare, class _Allocator>
2352+
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<pair<const _Key, _Tp>>
23572353
operator<=>(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
2358-
const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
2359-
{
2354+
const multimap<_Key, _Tp, _Compare, _Allocator>& __y) {
23602355
return std::lexicographical_compare_three_way(
23612356
__x.begin(),
23622357
__x.end(),

0 commit comments

Comments
 (0)