gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1558.C
raw| 1 | // DR 1558 still applies when using void_t as a template-argument. |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-additional-options "--param hash-table-verification-limit=10000" } |
| 4 | |
| 5 | template<typename...> using void_t = void; |
| 6 | template<class T> struct A { }; |
| 7 | struct B { typedef int foo; }; |
| 8 | template<typename T> A<void_t<typename T::foo>> f(); // { dg-error "int" } |
| 9 | template<typename T> A<void> g(); |
| 10 | int main() |
| 11 | { |
| 12 | f<B>(); |
| 13 | g<int>(); |
| 14 | f<int>(); // { dg-error "no match" } |
| 15 | } |