// PR c++/89622 // { dg-do compile { target c++11 } } // { dg-options "-Wno-system-headers -w" } // { dg-bogus "says that these are ambiguous" "" { target *-*-* } 0 } // { dg-bogus "candidate 1" "" { target *-*-* } 0 } // { dg-bogus "candidate 2" "" { target *-*-* } 0 } # 3 "pr89622.h" 3 template struct X { X() { } template X(int, U&&) { } template X(char, const X&) { } }; template X wrap_X(X x) { return X('a', x); } int main() { X x; wrap_X(x); }