| 1 |
// PR c++/82632 |
| 2 |
// { dg-do compile { target c++17 } } |
| 3 |
|
| 4 |
template<class T, int = 1> |
| 5 |
struct Foo { |
| 6 |
Foo() = default; |
| 7 |
Foo(const Foo&) = delete; |
| 8 |
|
| 9 |
template<int I> |
| 10 |
Foo(const Foo<T, I>&); |
| 11 |
}; |
| 12 |
|
| 13 |
template<class T, int I> |
| 14 |
Foo(Foo<T,I>) -> Foo<T,I+1>; |
| 15 |
|
| 16 |
Foo<int> a; |
| 17 |
Foo b = a; |