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++/77563] [5/6/7 Regression] explicit constructor breaks narrowing conversion overload resolution


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77563

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

struct A {
  A(int) {}
  A(unsigned) {}  // Comment to make it work

  explicit A(long) {}  // Comment to make it work
};

void f(A) { }

int main() {
  f(2);
  f(3l);
}

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