Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/alias-decl-80.C

raw
1 // PR c++/120224
2 // { dg-do compile { target c++11 } }
3
4 template<class> using void_t = void;
5
6 template<class T>
7 void f(void*); // #1
8
9 template<class T>
10 void f(void_t<typename T::type>*) { } // { dg-error "not a class" } defn of #1
11
12 template<class T>
13 void g(int, void*); // #2
14
15 template<class T>
16 void g(int, void_t<typename T::type>*) { } // { dg-error "not a class" } defn of #2
17
18 int main() {
19 f<int>(0); // { dg-error "no match" }
20 g<int>(0, 0); // { dg-error "no match" }
21 }