Created on 2022-08-31.00:00:00 last changed 12 months ago
Proposed resolution:
This wording is relative to N4910.
Modify [refwrap.general], class template reference_wrapper synopsis, as indicated:
// [refwrap.invoke], invocation
template<class... ArgTypes>
constexpr invoke_result_t<T&, ArgTypes...> operator()(ArgTypes&&...) const
noexcept(is_nothrow_invocable_v<T&, ArgTypes...>);
Modify [refwrap.invoke] as indicated:
template<class... ArgTypes> constexpr invoke_result_t<T&, ArgTypes...> operator()(ArgTypes&&... args) const noexcept(is_nothrow_invocable_v<T&, ArgTypes...>);-1- Mandates: T is a complete type.
-2- Returns: INVOKE(get(), std::forward<ArgTypes>(args)...). ([func.require])
[ 2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Voting → WP. ]
[ 2022-09-23; Reflector poll ]
Set status to Tentatively Ready after six votes in favour during reflector poll.
Already implemented in MSVC and libstdc++.
The following assertion does not hold, making the type less capable than the function pointers.
void f() noexcept; std::reference_wrapper fn = f; static_assert(std::is_nothrow_invocable_v<decltype(fn)>);
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: + msg13070 |
2022-11-17 00:42:33 | admin | set | status: voting -> wp |
2022-11-08 03:46:49 | admin | set | status: ready -> voting |
2022-09-23 15:43:32 | admin | set | messages: + msg12785 |
2022-09-23 15:43:32 | admin | set | status: new -> ready |
2022-09-03 17:25:47 | admin | set | messages: + msg12736 |
2022-08-31 00:00:00 | admin | create |