Date
2015-03-27.00:00:00
Message id
5515

Content

There are overload tiebreakers that order reference/nonreference and base/derived conversions, but how they relate is not specified. For example:

  struct A { A(); };
  struct B : A {};
  struct C : B {};

  void f1(B&);
  void f1(A);

  void f2(B);
  void f2(A&);

  int main()
  {
     C v;
     f1(v); // all compilers choose f1(B&)
     f2(v); // all compilers choose f2(B)
  }

The Standard does not appear to specify what happens in this case.