[Bug c++/48078] accepts-invalid: taking address of private member function from template function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48078 Jonathan Wakely changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #9 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #7) > This seems fixed in GCC 11+, maybe by the patch which fixed PR 41437. Yes, GCC started to reject it with r11-1350 *** This bug has been marked as a duplicate of bug 41437 ***
[Bug c++/48078] accepts-invalid: taking address of private member function from template function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48078 Andrew Pinski changed: What|Removed |Added CC||awise.gcc.bug at gmail dot com --- Comment #8 from Andrew Pinski --- *** Bug 70984 has been marked as a duplicate of this bug. ***
[Bug c++/48078] accepts-invalid: taking address of private member function from template function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48078 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=41437 --- Comment #7 from Andrew Pinski --- This seems fixed in GCC 11+, maybe by the patch which fixed PR 41437.
[Bug c++/48078] accepts-invalid: taking address of private member function from template function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48078 fkostenzer at live dot at changed: What|Removed |Added CC||fkostenzer at live dot at --- Comment #6 from fkostenzer at live dot at --- This can also be triggered on gcc 9 using ``` class A { int foo() const { return 42; } }; template struct B : public A { static constexpr auto member_fn = &B::foo; }; int main() { return (A().*B<>::member_fn)(); } ``` running `g++ -std=c++17 -O2 -Wall -Wextra` produces main: mov eax, 42 ret