[Bug c++/125559] New: address of parenthesized qualified template-id resolving to non-static member incorrectly accepted
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 1 20:47:38 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125559
Bug ID: 125559
Summary: address of parenthesized qualified template-id
resolving to non-static member incorrectly accepted
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppalka at gcc dot gnu.org
Target Milestone: ---
struct A {
void f();
template<class T> void g();
};
int main() {
&(A::f); // correctly rejected by [expr.unary.op]/4
&(A::g<int>); // incorrectly accepted
}
More information about the Gcc-bugs
mailing list