This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofResolved status.
std::apply() is required to beconstexpr, butstd::invoke() isn'tSection: 22.10.5[func.invoke]Status:ResolvedSubmitter: Great BritainOpened: 2017-02-03Last modified: 2020-09-06
Priority:3
View all otherissues in [func.invoke].
View all issues withResolved status.
Discussion:
Addresses GB 51The function templatestd::apply() in 22.4.6[tuple.apply] is required to beconstexpr, butstd::invoke() in 22.10.5[func.invoke] isn't. The most sensible implementation ofapply_impl() is exactly equivalent tostd::invoke(), so this requires implementations to have aconstexpr version ofinvoke() for internal use, and the public APIstd::invoke, which must not beconstexpr even though it is probably implemented in terms of the internal version.
Proposed change: Addconstexpr tostd::invoke.
[2017-02-20, Marshall adds wording]
[Kona 2017-03-01]
We think this needsCWG 1581 to work; accepted as Immediate to resolve NB comment.
Friday: CWG 1581 was not moved in Kona. Status back to Open.
[2017-07 Toronto Tuesday PM issue prioritization]
Priority 3
[2020-01 Resolved by the adoption ofP1065 in Cologne.]
Proposed resolution:
This wording is relative toN4640.
Modify 22.10.5[func.invoke] as indicated:
template <class F, class... Args>constexpr result_of_t<F&&(Args&&...)> invoke(F&& f, Args&&... args);