This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


2077. Overload resolution and invalid rvalue-reference initialization

Section:  [over.ics.ref]     Status: drafting     Submitter: Richard Smith     Date: 2015-01-29

The resolution of issue 1604 broke the following example:

  struct A {};
  struct B { operator const A() const; };
  void f(A const&);
  void f(A&&);

  int main() {
    B a;

Overload resolution selects the A&& overload, but then initialization fails. This seems like a major regression; we're now required to reject

   std::vector<A> va;
   B b;

Should we update [over.ics.ref] to match the changes made to 9.4.4 [dcl.init.ref]?

See also issue 2108.