This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively Ready status.
function_ref of data member pointer should produce noexcept signatureSection: 22.10.17.6.5 [func.wrap.ref.deduct] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2025-10-20 Last modified: 2025-10-21
Priority: Not Prioritized
View all issues with Tentatively Ready status.
Discussion:
Addresses PL-005.
For data member pointer M C::* dmp, template argument deduction in form
std::function_ref fr(std::nontype<dmp>, x) results in
std::function_ref<M&()>, that returns a reference to designated
member. As accessing a data member can never throw exception and function_ref
support noexcept qualifed function types, the deduction guide should be
updated to produce noexcept-qualified signature.
[2025-10-21; Reflector poll.]
Set status to Tentatively Ready after six votes in favour during reflector poll.
Proposed resolution:
This wording is relative to N5014.
Modify 22.10.17.6.5 [func.wrap.ref.deduct] as indicated:
template<class F> function_ref(nontype_t<f>, T&&) -> function_ref<see below>;Let
Fbedecltype(f).-6- Constraint:
- (6.1) —
Fis of the formR(G::*)(A...) cv &opt noexcept(E)for typeG, or- (6.2) —
Fis of the formM G::*for typeGand object typeM, in which case letRbeinvoke_result_t<F, T&>,A...be an empty pack, andEbefalsetrue, or- (6.3) —
Fis of the formR(*)(G, A...) noexcept(E)for typeG.-7- Remarks: The deduced type is
function_ref<R(A...) noexcept(E)>.