Created on 2020-01-03.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4842.
Modify [stopsource], class stop_source synopsis, as indicated:
namespace std { […] class stop_source { public: […] [[nodiscard]] friend bool operator==(const stop_source& lhs, const stop_source& rhs) noexcept;[[nodiscard]] friend bool operator!=(const stop_source& lhs, const stop_source& rhs) noexcept;friend void swap(stop_source& lhs, stop_source& rhs) noexcept; }; }
Modify [stopsource.cmp] and [stopsource.special] as indicated:
32.3.4.3 Non-member functions
Comparisons[stopsource.nonmemberscmp][[nodiscard]] bool operator==(const stop_source& lhs, const stop_source& rhs) noexcept;-1- Returns: true if lhs and rhs have ownership of the same stop state or if both lhs and rhs do not have ownership of a stop state; otherwise false.
[[nodiscard]] bool operator!=(const stop_source& lhs, const stop_source& rhs) noexcept;
-2- Returns: !(lhs==rhs).
32.3.4.4 Specialized algorithms [stopsource.special]friend void swap(stop_source& x, stop_source& y) noexcept;-1- Effects: Equivalent to: x.swap(y).
[ 2020-01-14 Status set to Tentatively Ready after six positive votes on the reflector. ]
Just like stop_token (see LWG 3254), stop_source in [stopsource] declares an operator!= friend that is unnecessary in light of the new core language rules and should be struck.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: immediate -> wp |
2020-02-14 06:37:09 | admin | set | status: ready -> immediate |
2020-01-14 12:59:29 | admin | set | messages: + msg10930 |
2020-01-14 12:59:29 | admin | set | status: new -> ready |
2020-01-03 04:31:29 | admin | set | messages: + msg10904 |
2020-01-03 00:00:00 | admin | create |