aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction105.C
blob: 73a9c6b676a7c527c1b508aa9171d5c4e7894c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/82632
// { dg-do compile { target c++17 } }

template<class T, int = 1>
struct Foo {
  Foo() = default;
  Foo(const Foo&) = delete;

  template<int I>
  Foo(const Foo<T, I>&);
};

template<class T, int I>
Foo(Foo<T,I>) -> Foo<T,I+1>;

Foo<int> a;
Foo b = a;