https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121771
Bug ID: 121771
Summary: [13/14/15/16 Regression] std::tuple CTAD fails for
lvalue reference to function type
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
Split out from Bug 110853:
#include <tuple>
void func() {}
std::tuple t(func);
std::tuple<void (*)()>& r = t;
This fails since r13-54 which was backported as r12-8379 so this fails with
12.2 and later.
The explicit deduction guide should mean the function decays to a pointer:
template<class... UTypes>
tuple(UTypes...) -> tuple<UTypes...>;