-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
documentationRelated to documentation or commentsRelated to documentation or commentsfixedSomething works now, yay!Something works now, yay!good first issueGood for newcomersGood for newcomers
Description
Our implementation of swappable_with speculatively implemented the proposed resolution for LWG-3175 (a Library Issue, which is a bug report against the C++ Standard):
Lines 183 to 195 in e034296
| template <class _Ty1, class _Ty2> | |
| concept swappable_with = | |
| #if 1 // Implement the PR of LWG-3175 | |
| common_reference_with<_Ty1, _Ty2> | |
| #else // ^^^ LWG-3175 / N4810 vvv | |
| common_reference_with<const remove_reference_t<_Ty1>&, const remove_reference_t<_Ty2>&> | |
| #endif // select LWG-3175 vs. N4810 | |
| && requires(_Ty1&& __t, _Ty2&& __u) { | |
| _RANGES swap(static_cast<_Ty1&&>(__t), static_cast<_Ty1&&>(__t)); | |
| _RANGES swap(static_cast<_Ty2&&>(__u), static_cast<_Ty2&&>(__u)); | |
| _RANGES swap(static_cast<_Ty1&&>(__t), static_cast<_Ty2&&>(__u)); | |
| _RANGES swap(static_cast<_Ty2&&>(__u), static_cast<_Ty1&&>(__t)); | |
| }; |
At the February 2020 meeting in Prague, LWG-3175 was resolved for C++20. Therefore, we should keep line 186 here, but remove lines 185 and 187-189.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationRelated to documentation or commentsRelated to documentation or commentsfixedSomething works now, yay!Something works now, yay!good first issueGood for newcomersGood for newcomers