Created on 2022-11-10.00:00:00 last changed 12 months ago
Proposed resolution:
This wording is relative to N4917.
Modify [coro.generator.promise] as indicated:
template<ranges::input_range R, class Alloc> requires convertible_to<ranges::range_reference_t<R>, yielded> auto yield_value(ranges::elements_of<R, Alloc> r) noexcept;-13- Effects: Equivalent to: […]
-14-
Remarks:[Note 1: A yield-expression that calls this function has type void ([expr.yield]). — end note]
[ 2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Immediate → WP. ]
[ Kona 2022-11-11; Move to Immediate ]
[ 2022-11-10 Casey provides wording ]
This is in resolution of US 56-118 ([coro.generator.promise] Redundant specification).
[Paragraph 14] is redundant given [paragraphs] 13 and 12. Remove it.
Paragraphs 12 and 14 are identical: "Remarks: A yield-expression that calls this function has type void ([expr.yield])." Paragraph 13 states that the overload of yield_value that accepts ranges::elements_of for arbitrary ranges has "Effects: Equivalent to:" calling the overload of yield_value that accepts specializations of generator, which paragraph 12 specifies. Per [structure.specifications] paragraph 4, the former overload "inherits" the Remarks of paragraph 12 making paragraph 14 redundant.
LWG is concerned that the redundancy is not immediately obvious — it depends on an understanding of how await expressions function — so we'd like to preserve comment despite that we agree that it is normatively redundant.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2022-11-17 00:42:33 | admin | set | messages: + msg13100 |
2022-11-17 00:42:33 | admin | set | status: immediate -> wp |
2022-11-12 00:58:30 | admin | set | messages: + msg13028 |
2022-11-12 00:58:30 | admin | set | status: new -> immediate |
2022-11-10 17:58:00 | admin | set | messages: + msg12992 |
2022-11-10 17:58:00 | admin | set | messages: + msg12991 |
2022-11-10 00:00:00 | admin | create |