Section: 22.2.4 [forward] Status: WP Submitter: Jiang An Opened: 2022-08-24 Last modified: 2022-11-15 15:43:02 UTC
Priority: Not Prioritized
View all other issues in [forward].
View all issues with WP status.
Currently the return type of std::forward_like is specified by the following bullet:
— Let V beOVERRIDE_REF(T&&, COPY_CONST(remove_reference_t<T>, remove_reference_t<U>))
where T&& is not always valid, e.g. it's invalid when T is void.A strait forward reading may suggest that there is a hard error when T is not referenceable (which is currently implemented in MSVC STL), but this seems not clarified. It is unclear to me whether the intent is that hard error, substitution failure, or no error is caused when T&& is invalid.
[2022-09-23; Reflector poll]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
[2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Voting → WP.]
This wording is relative to N4917.
Modify 22.2.4 [forward] as indicated:
template<class T, class U> [[nodiscard]] constexpr auto forward_like(U&& x) noexcept -> see below;