OSDN Git Service

PR c++/44157
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / variadic-crash2.C
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin: PR c++/39637
3 // { dg-options "-std=gnu++0x" }
4 // { dg-do "compile" }
5
6 template<class... Types>
7 void
8 f(Types...)
9 {
10   enum {e = sizeof(Types)}; // { dg-error "parameter packs not expanded with '...'" }
11   enum {e1 = sizeof...(Types)};
12 }
13
14 int
15 main()
16 {
17     f(0);
18 }
19
20 // { dg-message "note" "Types" { target *-*-* } 10 }