File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -1208,12 +1208,12 @@ public:
1208
1208
_Nodeptr* _Tail;
1209
1209
};
1210
1210
1211
- auto remove(const _Ty& _Val) { // erase each element matching _Val
1211
+ _LIST_REMOVE_RETURN remove(const _Ty& _Val) { // erase each element matching _Val
1212
1212
return remove_if([&](const _Ty& _Other) -> bool { return _Other == _Val; });
1213
1213
}
1214
1214
1215
1215
template <class _Pr1>
1216
- auto remove_if(_Pr1 _Pred) { // erase each element satisfying _Pr1
1216
+ _LIST_REMOVE_RETURN remove_if(_Pr1 _Pred) { // erase each element satisfying _Pr1
1217
1217
_Flist_node_remove_op _Op(*this);
1218
1218
auto _Firstb = _Unchecked_before_begin();
1219
1219
size_type _Removed = 0;
@@ -1235,12 +1235,12 @@ public:
1235
1235
#endif
1236
1236
}
1237
1237
1238
- auto unique() { // erase each element matching previous
1238
+ _LIST_REMOVE_RETURN unique() { // erase each element matching previous
1239
1239
return unique(equal_to<>{});
1240
1240
}
1241
1241
1242
1242
template <class _Pr2>
1243
- auto unique(_Pr2 _Pred) { // erase each element satisfying _Pred with previous
1243
+ _LIST_REMOVE_RETURN unique(_Pr2 _Pred) { // erase each element satisfying _Pred with previous
1244
1244
_Flist_node_remove_op _Op(*this);
1245
1245
auto _First = _Unchecked_begin();
1246
1246
size_type _Removed = 0;
Original file line number Diff line number Diff line change @@ -1662,12 +1662,12 @@ public:
1662
1662
_Nodeptr* _Tail;
1663
1663
};
1664
1664
1665
- auto remove(const _Ty& _Val) { // erase each element matching _Val
1665
+ _LIST_REMOVE_RETURN remove(const _Ty& _Val) { // erase each element matching _Val
1666
1666
return remove_if([&](const _Ty& _Other) -> bool { return _Other == _Val; });
1667
1667
}
1668
1668
1669
1669
template <class _Pr1>
1670
- auto remove_if(_Pr1 _Pred) { // erase each element satisfying _Pred
1670
+ _LIST_REMOVE_RETURN remove_if(_Pr1 _Pred) { // erase each element satisfying _Pred
1671
1671
auto& _My_data = _Mypair._Myval2;
1672
1672
_List_node_remove_op _Op(*this);
1673
1673
const auto _Last = _My_data._Myhead;
@@ -1688,12 +1688,12 @@ public:
1688
1688
#endif
1689
1689
}
1690
1690
1691
- auto unique() { // erase each element matching previous
1691
+ _LIST_REMOVE_RETURN unique() { // erase each element matching previous
1692
1692
return unique(equal_to<>{});
1693
1693
}
1694
1694
1695
1695
template <class _Pr2>
1696
- auto unique(_Pr2 _Pred) { // erase each element satisfying _Pred with previous
1696
+ _LIST_REMOVE_RETURN unique(_Pr2 _Pred) { // erase each element satisfying _Pred with previous
1697
1697
_List_node_remove_op _Op(*this);
1698
1698
const _Nodeptr _Phead = _Mypair._Myval2._Myhead;
1699
1699
_Nodeptr _Pprev = _Phead->_Next;
Original file line number Diff line number Diff line change @@ -2649,6 +2649,12 @@ _STD_END
2649
2649
#define _CONTAINER_EMPLACE_RETURN void
2650
2650
#endif // ^^^ !_HAS_CXX17 ^^^
2651
2651
2652
+ #if _HAS_CXX20
2653
+ #define _LIST_REMOVE_RETURN size_type
2654
+ #else // ^^^ _HAS_CXX20 ^^^ / vvv !_HAS_CXX20 vvv
2655
+ #define _LIST_REMOVE_RETURN void
2656
+ #endif // ^^^ !_HAS_CXX20 ^^^
2657
+
2652
2658
#pragma pop_macro("new")
2653
2659
_STL_RESTORE_CLANG_WARNINGS
2654
2660
#pragma warning(pop)
You can’t perform that action at this time.
0 commit comments