aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias15.C
blob: db615faf8e24375cac1b02f5cd136c27c9ac7c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/102529
// { dg-do compile { target c++20 } }

template <typename T>
struct C {
    template <typename U>
    C(U);
};

template <typename U>
C(U) -> C<U*>;

template <typename T>
    requires true
using A = C<T>;

C ok(1);   // ok, a is a C<int*>
A bad(2);  // fails