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

Reply via email to