145
|
1 // PR c++/89622
|
|
2 // { dg-do compile { target c++11 } }
|
|
3 // { dg-options "-Wno-system-headers -w" }
|
|
4 // { dg-bogus "says that these are ambiguous" "" { target *-*-* } 0 }
|
|
5 // { dg-bogus "candidate 1" "" { target *-*-* } 0 }
|
|
6 // { dg-bogus "candidate 2" "" { target *-*-* } 0 }
|
|
7
|
|
8 # 3 "pr89622.h" 3
|
|
9 template<typename T>
|
|
10 struct X
|
|
11 {
|
|
12 X() { }
|
|
13 template<typename U> X(int, U&&) { }
|
|
14 template<typename U> X(char, const X<U>&) { }
|
|
15 };
|
|
16
|
|
17 template<typename T>
|
|
18 X<T> wrap_X(X<T> x)
|
|
19 {
|
|
20 return X<T>('a', x);
|
|
21 }
|
|
22
|
|
23 int main()
|
|
24 {
|
|
25 X<void> x;
|
|
26 wrap_X(x);
|
|
27 }
|