Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/var-templ21.C

raw
1 // PR c++/64455
2 // { dg-do compile { target c++14 } }
3
4 template<typename Type>
5 constexpr bool IsType = true;
6
7 template <bool b, class T> struct Test
8 {
9 };
10
11 template <class T>
12 struct Test<true, T>
13 {
14 typedef T type;
15 };
16
17 template<class T>
18 struct X {
19 typedef typename Test<IsType<T>,T>::type type;
20 };
21
22 int main()
23 {
24 X<int>::type t;
25 }