This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70097] New: Cannot assign ref-qualified non-static member function
- From: "ldionne.2 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 Mar 2016 18:50:52 +0000
- Subject: [Bug c++/70097] New: Cannot assign ref-qualified non-static member function
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70097
Bug ID: 70097
Summary: Cannot assign ref-qualified non-static member function
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ldionne.2 at gmail dot com
Target Milestone: ---
The following code fails to compile on GCC trunk:
struct F { void member() & { } };
using Member = void()&;
Member F::* fptr = &F::member;
The error is:
[...]: error: cannot convert âvoid (F::*)() &â to âvoid (F::*)()â in
initialization
Member F::* fptr = &F::member;
^~~~~~
Live example: http://melpon.org/wandbox/permlink/kizV7mkIaHTnMTkd