Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp2a/nontype-class28.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // PR c++/92948 - Fix class NTTP with template arguments. | |
2 // { dg-do compile { target c++2a } } | |
3 | |
4 struct A { | |
5 constexpr A(int) { } | |
6 }; | |
7 | |
8 template<A> | |
9 struct B { | |
10 using U = unsigned; | |
11 }; | |
12 | |
13 template<A a> | |
14 using U = B<a>; | |
15 | |
16 template<int X, typename Y = typename B<X>::U> | |
17 void foo() | |
18 { | |
19 } | |
20 | |
21 template<int X, typename Y = typename U<X>::U> | |
22 void foo2() | |
23 { | |
24 } | |
25 | |
26 template<typename Y = typename B<1>::U> | |
27 void foo3() | |
28 { | |
29 } | |
30 | |
31 void | |
32 g () | |
33 { | |
34 foo<1>(); | |
35 foo2<1>(); | |
36 foo3<>(); | |
37 } |