aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction104.C
blob: a34dea04675a9bfdf5e62644a1493b66b8522b83 (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> struct Optional {
  template<class U> Optional(U&&);
};

template<class A> Optional(A) -> Optional<A>;

Optional opt(1729);
Optional dupe(opt);

using ty1 = decltype(opt);
using ty1 = Optional<int>;

using ty2 = decltype(dupe);
using ty2 = Optional<int>;