This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/59296] [c++11] ref-qualified member function is ambiguous


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59296

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
reduced:

struct Type
{
  void get() const& { }
  void get() const&& { }
};

int main()
{
  Type{}.get();
}

The ambiguity happens when both overloads are const-qualified and *this is an
rvalue


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]