plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
chromium
static7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static7.C
207
utf_8
eb951aea121806ff5e87bd2848d57e98
// PR c++/17530 // { dg-do link } typedef void (*Func) (); void f (Func) {} struct B { static void staticfunc () {} }; template <int> void C(){ f (B::staticfunc); } int main () { C<0>(); return 0; }
google
chromium
crash42
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash42.C
150
utf_8
7845da4d1b1384a76c0c0244fc45ef41
// { dg-do compile } // PR c++/22153 template<int> void foo(); template<int> struct A { template<> friend void foo<0>(); // { dg-error "" } };
google
chromium
explicit4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/explicit4.C
448
utf_8
3f7c086b1b4dd5261f5ced979a21b04b
// { dg-do compile } // Failed to spot specialization using a template-id expr template <typename n> class A {}; template <int m> class R {}; template <int n, int x> struct Trait { enum {m = n}; }; template <typename n, typename x> R<Trait<1,1>::m> f(A<x>); template <> R<Trait<1,1>::m> f<int>(A<int>) {return R<1>();}
google
chromium
overload6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/overload6.C
449
utf_8
7f57829f71261be5d8d5dd5abd19860a
template<typename T> void unique(T,T); // { dg-message "note" } struct A { int begin(); }; template<int> void foo() { unique(A().begin); // { dg-error "no matching function" "" } // { dg-message "candidate" "candidate note" { target *-*-* } 16 } }
google
chromium
typename8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typename8.C
125
utf_8
a991f3b843fb36ef428fd3261f7cd8d6
// PR c++/18738 namespace foo { typedef int my_type; } template<typename T> struct A { typename foo::my_type bar(); };
google
chromium
operator4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/operator4.C
135
utf_8
7e567ad662951a97d90d67420df1d001
// PR c++/17068 struct A { template<int> void operator()() {} }; template<typename> void foo() { A().template operator()<0>(); }
google
chromium
error16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error16.C
161
utf_8
709638c9b094e580ab80981a248856e2
// PR c++/18674 template <typename I> static void g() { enum I::t a; // { dg-error "" } (void) a; } struct B { typedef int t; }; void h() { g<B>(); }
google
chromium
crash43
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash43.C
212
utf_8
445602937029d55446b2a4e962079812
// PR c++/24687 extern "C" { template<typename _Tp> // { dg-error "C" } struct ___is_pod { enum { __value = (sizeof(__gnu_internal::__test_type<_Tp>(0)))}; // { dg-error "declared|expected" }
google
chromium
typedef5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef5.C
431
utf_8
c216b7fcf0f0612e246302001f5b0d6f
// PR c++/27572 // { dg-do compile } template<typedef,int> struct A1; // { dg-error "no type|typedef declaration|default argument" } template<typedef x,int> struct A2; // { dg-error "type|typedef declaration|default argument" } template<typedef x[],int> struct A3; // { dg-error "no type|typedef declarat...
google
chromium
vla1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/vla1.C
126
utf_8
94a0a165b65e3caa1af30d5a45bc1934
// PR c++/29226 // { dg-options "" } template <bool> static int label (int w) { sizeof(int[w]); } int a = label<false>(1);
google
chromium
const3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/const3.C
230
utf_8
9699a6b1794f9cdb818bfbe9da9ff6f3
// Origin PR c++/42251 // { dg-do compile } struct foo { static const bool b = false; }; template<bool x> struct S1 { }; template<bool x> struct S2 : S1<foo::b> { };
google
chromium
access1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/access1.C
400
utf_8
1c360b630dc5835068452f918bda8fb6
// { dg-do compile } // It is legal to specialize a template with a different class-key. template<typename T> class X; template<typename T> struct X<T *> { int i; }; template<> struct X<int> { int i; }; void foo () { X<int *> xip; X<int> xi; xip.i; xi.i; }
google
chromium
crash41
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash41.C
247
utf_8
0e53425dee35e3cd8bc31b131a4010d7
// PR c++/22464 template<typename T> void do_something(const T* A) // { dg-error "declared" } { struct helper_t{ helper_t() { A[0]; // { dg-error "use" } } } helper; } void sub1() { double A[7]; do_something (A); }
google
chromium
repo4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/repo4.C
292
utf_8
fda0c1ab651480c546b2e4e94922aebd
// PR c++/17775 // { dg-options "-frepo" } // { dg-final { cleanup-repo-files } } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } namespace { struct Foo {}; } template <typename Tp> void foo(Tp) {} int main() { foo(Foo()); }
google
chromium
func1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/func1.C
254
utf_8
d5d24fc94d133229a10c5b13f44c253b
template <typename T1,typename T2> inline void f(const T1&,const T2&) { } template <typename T1,typename T2,void F(const T1&,const T2&)> struct A { template <typename T> void g(T& i) { } }; int main() { int i; A<int,int,f> a; a.g(i); }
google
chromium
using2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/using2.C
538
utf_8
db25acee51905de7bb0fbafe42b1cb95
// { dg-do compile } // PR 9447. Using decls in template classes. template <class T> struct Foo { int i; // { dg-error "Foo" } }; struct Baz { int i; // { dg-error "Baz" } }; template <class T> struct Bar : public Foo<T>, Baz { using Foo<T>::i; using Baz::i; int foo () { return i; } // { dg-error "request fo...
google
chromium
access12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/access12.C
265
utf_8
20c6114a3d4d0119b052ef6635d54a2c
// { dg-do compile } // PR c++/10849: Incorrect access checking on class template partial // specialization. class X { private: template <typename T> struct Y; }; template <typename T> struct X::Y<T*> {};
google
chromium
pseudodtor2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/pseudodtor2.C
206
utf_8
632dfaf82a330021f820250c7641745b
// PR c++/32384 // { dg-do compile } template<typename S> struct D { typedef int T; S foo (); D () { foo ().~T(); } // { dg-error "is not of type" } }; struct Z { Z () {} ~Z () {} }; D<Z> d;
google
chromium
crash16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash16.C
308
utf_8
0b7b35a94bb1a8a5457b2c3bd299d5e2
// { dg-do compile } // PR c++/10079 template <bool> struct A {}; template <typename> struct B { enum { e }; }; template <typename T> A<(B<T>::e && 0)> foo(T) {} template <typename T> void foo(B<T>) {} void bar() { B<int> b; foo(b); }
google
chromium
typedef20
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef20.C
452
utf_8
7faab9101c09d7c36b9d0b53eea8002f
// Origin PR c++/40007 // { dg-do compile } class x { typedef int privtype; // { dg-error "is private" } protected: typedef int type; }; template<typename T> struct y : public x { typename x::type z; }; template<typename T> struct y<T*> : public x { typedef x::type good; typedef x::privtype bad; // { dg-error...
google
chromium
pr39425
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/pr39425.C
353
utf_8
65f61cad906468d3220688454e8f7d0c
// PR c++/39425 // { dg-do compile } class a { template<unsigned int s> struct _rec { static const char size = _rec< (s >> 1) >::size; }; template<> // { dg-error "explicit" } struct _rec <0> { static const char size = 0; }; static const unsigned int value = _rec < 1 >::size; } // { dg-...
google
chromium
dr408
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/dr408.C
705
utf_8
5df8658381333f348754c7590f128994
// DR 408 // { dg-do link } // Test that a size given in the out-of-class definition isn't used until // instantiation time. template<typename T> struct X { static char s[]; int c; }; template<typename T> char X<T>::s[sizeof(X<T>)]; #define sassert(EXP) int ar[(EXP)?1:-1] sassert(sizeof (X<char>::s) == sizeof (i...
google
chromium
crash87
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash87.C
314
utf_8
3bc6fcf9c80c2cc5aa0d5c1c4ec47445
// Origin: PR c++/38357 // { dg-do compile } class BUG { public: bool name() { return true; } }; template <bool T> struct BUG1_5 { }; template <bool name> class BUG2 : BUG { public: typedef BUG1_5<name> ptr; // { dg-error "could not convert template argument" } }; int main() { BUG2<false> b; return 0; }
google
chromium
array2-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array2-1.C
269
utf_8
b197e9f6e5275f99d9ff3c22fe947550
// { dg-do compile } // { dg-options "-fabi-version=1" } // PR c++/13494. ICE template<typename T> int foo(int d[][4]) { return d[0][0]; }
google
chromium
void4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/void4.C
187
utf_8
f52ef262006018fae2f9121ca966abcd
//PR c++/28638 template<void> struct A; // { dg-error "not a valid type" } template<template<int> class> struct B {}; B<A> b; // { dg-error "template|invalid type" }
google
chromium
dependent-name1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/dependent-name1.C
218
utf_8
f23d748a70179cdd1a4176b5cf3a3e9b
// { dg-do compile } // PR c++/10347: Dependent type checking of array new expression void bar (int *); template <int> void foo() { bar(new int[1]); }
google
chromium
conv6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/conv6.C
576
utf_8
a99117f536bfae5da72de6e056eca4b9
// { dg-do compile } // PR 9898, DR 322. Conversion to reference type. template <typename> struct Ref {}; template <typename> struct Val {}; struct Wrapper { template <typename U> operator Ref<U> & (); template <typename U> operator Val<U> (); }; void Foo (Wrapper l) { static_cast <Ref<int> &> (l); static_cast ...
google
chromium
spec17
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec17.C
182
utf_8
3aa4f9ac6e238807a3c568af3718bf62
// PR c++/16224 namespace io { template <typename> int foo(); // { dg-error "" } } using namespace io; template<> int foo<int>(); // { dg-error "" } int a = foo<int>();
google
chromium
ptrmem15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ptrmem15.C
193
utf_8
bb20547b52c722a6e10e888f3f6b8bc0
// PR c++/19894 template<typename T> struct A { T A::* p; // { dg-error "void" } }; A<void> a; // { dg-message "required" }
google
chromium
crash12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash12.C
293
utf_8
627140de004634696fc53c98684c31c2
// { dg-do compile } // PR c++/12495: ICE looking up class template in local class. template <typename> struct A {}; template <typename T> void foo() { struct B { B (const A<T>&); }; }
google
chromium
void9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/void9.C
156
utf_8
42bf2400e0a1970f537c01ac0e7a5a9f
//PR c++/28738 template<int,void> struct A {}; // { dg-error "not a valid type" } template<int N> struct A<N,0> {}; // { dg-error "not a valid type" }
google
chromium
typename18
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typename18.C
223
utf_8
281d5672faf3e37ce44792d24c1cc723
// { dg-do compile } // These typename should work as they are types. struct A { typedef int a; template <int> struct f {}; template<int> void foo(int i) { typename A::a(i1); typename A::f<0>(i2); } };
google
chromium
non-dependent6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/non-dependent6.C
137
utf_8
45dd220f658e86742366772757b041e2
// PR c++/15285 void foo(void (*func)()) {} template<typename T> void bar() {} template<typename T> void baz() { foo(&bar<long>); }
google
chromium
nontype2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype2.C
151
utf_8
00bcc57cb7d33b0250bf5efd8de34dbf
template <bool> struct A {}; template <bool> struct B { void foo() { const int i=0; typedef A< i<=1 > C; typedef A< i<=2 > C; } };
google
chromium
typedef30
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef30.C
554
utf_8
b530d5da183724034637ef2b351372d2
// Origin: PR c++/43206 // { dg-do compile } template<class A> struct NumericTraits{ typedef A TInputImage;}; template<class B> class CovariantVector{}; template<class C> struct Image{ typedef C PixelType;}; template<class H, class E, class D> class F { typedef H G; typedef typename NumericTraits<typename G::Pix...
google
chromium
operator2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/operator2.C
123
utf_8
08eba0ef43fd418e3505a0132a2e9c05
template <typename T> struct A {}; struct B { operator A<B>(); }; template <typename T> void f() { B::operator A<T>; }
google
chromium
deduce2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/deduce2.C
478
utf_8
3cc52990bce905a42f91a2dab1c65c77
template <typename T0> struct tuple { typedef tuple<int> tail; }; template <> struct tuple<int> { }; template <typename L> struct length { static const int i = length<typename tuple<L>::tail>::i; }; template<> struct length<tuple<int> > { static const int i = 1; }; template <int> struct M {}; template <...
google
chromium
spec27
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec27.C
124
utf_8
5549dda851b53530395009f544d09652
// PR c++/24139 template<typename T> struct O { struct I; }; template<> struct O<int>::I { I(); }; O<int>::I::I() {}
google
chromium
array8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array8.C
283
utf_8
9135445bfc294af3cf8b77142f5e8782
// PR c++/18121 // We were trying to layout the array // type but since the type/value of A<N>::i // was not known at template declation type, // we were crashing template<int> struct A { static int const i = 1; }; template<int N> struct B { typedef int (*p)[A<N>::i]; };
google
chromium
pseudodtor4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/pseudodtor4.C
212
utf_8
b2d3a32829fc6808db1b3b6f0e96ef74
// PR c++/34068 // { dg-do compile } template <typename> struct A { typedef int X; A () { T (). ~X (); } // { dg-error "there are no arguments to|fpermissive|was not declared in this scope" } }; A <int> a;
google
chromium
spec34
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec34.C
164
utf_8
1503455e6bff13911dd306082359dbdf
// PR c++/26988 struct B{}; struct Bar : virtual B { template <typename T> Bar( T const& cast ); }; template <> Bar::Bar( int const & cast ) {}
google
chromium
ntp1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ntp1.C
396
utf_8
72688e70f855e78a966cd593acf9f923
// { dg-do compile } // PR 35. We were default promoting template PARM_DECLs template <short B> class R {}; template <class T> class A { public: template <short B> void operator() (R<B> const &); }; int main() { A<int> a; R<1> r; a (r); return 0; }
google
chromium
crash19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash19.C
310
utf_8
f106c764c1ea09eba893e334ab4c71d8
// PR c++/15165 struct S { template <class T> S(const T &e); }; int operator *(const double, const S &); template <class T> struct X { enum { SIXTY_FOUR=64 }; struct node { unsigned char *ptr[sizeof(T)*SIXTY_FOUR]; void d() {} }; node *head; }; template struct X<int>;
google
chromium
typename1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typename1.C
153
utf_8
5608e09eb5e126cbf511d7b99a577ef4
// { dg-do compile } template <class T> class B : virtual T::A { typedef int INT; INT i; };
google
chromium
qualified-id2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualified-id2.C
934
utf_8
760d233b1e82d77a4e17829a3a0eb589
// PR c++/44587 // { dg-do run } template <const char *N> struct A { static const char *p; }; template <const char *N> const char *A<N>::p = N; template <class T> struct B { static const char c[1]; typedef A<B<T>::c> C; }; template <class T> const char B<T>::c[1] = ""; template <class T> struct D { static const char c...
google
chromium
crash49
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash49.C
78
utf_8
cf864ea56a274c6c9a392f3a5f2f5910
// PR c++/27102 template <typename T> void T::foo; // { dg-error "invalid" }
google
chromium
member3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/member3.C
355
utf_8
7485d7d4ac0efdee0b9c7fe84580e8a0
template<typename T> struct A { template<typename L> struct SubA { }; template<typename T1,typename L> void f(T1 & t1, SubA<L> & t2) { } template<typename U> void g(SubA<U> & suba) { } template<typename U> void h(SubA<U> & suba) { } }; int main(void) { int i; A<int> a; A<int>::SubA<int> suba; a.f(i,s...
google
chromium
spec37
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec37.C
123
utf_8
c634bc3cd5d70e255a55643ffffb70b2
// PR c++/28300 template<typename> struct A { template<typename T> struct A<T*>; // { dg-error "namespace scope" } };
google
chromium
spec23
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec23.C
552
utf_8
7d6018a91ea2deeb358268bd30c91847
struct Foo { template <typename T> Foo (const T &); // { dg-message "T = Bar" } }; struct Bar { template <typename T> operator T () const; // { dg-message "T = Foo" } }; Foo Quux (Bar const &b) { return b; // { dg-error "ambiguous" } // { dg-message "candidate" "candidate note" { target *-*-* } 22 } }
google
chromium
copy1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/copy1.C
282
utf_8
aa4d8b9bd5abd8810e68268afd1bb443
// { dg-do compile } // PR 5189 struct A { A(A&); // { dg-message "note" } template <class T> A(T); // { dg-message "note" } }; A a = 0; // { dg-error "no matching function" } // { dg-message "candidate" "candidate note" { target *-*-* } 13 }
google
chromium
typedef19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef19.C
340
utf_8
ec20f420bcfc33beb8df2d77cdb4fbc2
// Origin PR c++/40007 // { dg-do compile } class A { typedef int mytype; // { dg-error "'typedef int A::mytype' is private" } }; template <class T> class B : public A { }; template<class T> class B<T*> : public A { mytype mem; // { dg-error "within this context" } }; B<int*> b;
google
chromium
nontype9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype9.C
259
utf_8
5345b8ffaffe474e8bf43916398a25ef
// { dg-do compile } // { dg-prune-output "mangled name" } // Contributed by: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> int i; template <void (&FN)()> struct g { void foo(void) { FN (); } }; void h () { i = 7; } template struct g<h>;
google
chromium
arg3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/arg3.C
371
utf_8
f455d543dc6a4d6f270fe652fcc368e7
// { dg-do compile } // PR 10224. Rejected a valid constant argument. template <bool B> struct X { struct I {}; }; template <typename T> struct Y { static const bool selector = true; typedef typename X<selector>::I helper; }; Y<int> i;
google
chromium
error36
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error36.C
203
utf_8
a17a0188621ff6205e2133c232c6aa5f
// PR c++/37719.C template <typename T> class foo { void bar() throw(int); // { dg-error "throw \\(int\\)" } }; template <> void foo<int>::bar() throw(float) {} // { dg-error "throw \\(float\\)" }
google
chromium
instantiate9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/instantiate9.C
287
utf_8
af3470ca5b94b44392cb92a00a9fb40f
/* PR c++/14622. The invalid explicit instantiation was not reported. */ /* { dg-do compile } */ template<class T> class A { static T a; }; template<class T> T A<T>::a; struct B {}; template B A<int>::a; /* { dg-error "does not match declared type" } */ template float A<float>::a;
google
chromium
call1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/call1.C
251
utf_8
11d89720e8ea4a5f11553338c13ffab9
//PR c++/10804 // G++ was not emiting the function foo. // { dg-do run } template<class T> struct A { A() { const void (*a)() = foo; } static const void foo() {} }; int main(int argc, char *argv[]) { A<int> a; }
google
chromium
incomplete4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/incomplete4.C
301
utf_8
41949f71dcca319627a067f84a4c33a2
// PR c++/33501 // { dg-do compile } class A; // { dg-error "forward declaration" } template <typename T> struct X { static int f (T); // { dg-error "initializing" } static const T &make (); }; int main () { return X<A>::f (X<A>::make ()); // { dg-error "invalid use of incomplete type" } }
google
chromium
local5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/local5.C
206
utf_8
cdb30bf1f7ce096f5aff97aa15fa35ce
struct Attribute { }; template <class T> bool operator == (const Attribute &attr, const T &value); enum { anon = 123 }; void test(int foo) { if (foo == anon) ; /* { dg-bogus "anonymous type" } */ }
google
chromium
error27
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error27.C
96
utf_8
585707d1420049ffe49f33789d19dc53
// PR c++/27211 struct A {}; template<int> void A::foo() {} // { dg-error "member function" }
google
chromium
void12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/void12.C
121
utf_8
2a5a8ea7e9d97750e220094aef1a6168
// PR c++/28639 template<void> struct A // { dg-error "not a valid type" } { static const int i = 1; char a[i]; };
google
chromium
sfinae22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/sfinae22.C
1,007
utf_8
ba70b90a27c132c51709894b862a9fa7
// PR c++/44908 // { dg-options "-std=c++0x" } #include <utility> struct A { }; struct B : public virtual A { }; template<typename From, typename To> class mini_is_convertible { typedef char one; typedef struct { char arr[2]; } two; template<typename To1> static void test_aux(To1); temp...
google
chromium
error22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error22.C
191
utf_8
54b3e85a8d8f9bc805e7795860ec08ba
//PR c++/27821 struct A { template<void (A::*)()> struct B {}; void ::foo(); // { dg-error "invalid use" } B<&A::foo> b; // { dg-error "incomplete type|template argument" } };
google
chromium
member8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/member8.C
261
utf_8
0e4a3e1cc8686f6abd2b23333d6678de
// PR c++/35138 // { dg-do compile } namespace N1 { struct A { }; } namespace N2 { struct A { }; } using namespace N1; using namespace N2; template <typename T> int foo (T const &t) { return t.A; } struct B { int A; }; int main () { B b; foo (b); }
google
chromium
nontype21
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype21.C
178
utf_8
523cd29e1a9c6006086eba2e934e53d4
// PR c++/47705 template<char const * const x> class Something { }; extern char const xyz; class SomethingElse:public Something<xyz> { }; // { dg-error "xyz. is a variable" }
google
chromium
ttp16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp16.C
152
utf_8
93f5f30ce330a50c0d7dc80278b3e0d8
template <template <typename> class C> void f() {} template <typename T, typename U = int> struct S {}; template void f<S>(); // { dg-error "match" }
google
chromium
param1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/param1.C
257
utf_8
3b3b293347afc671ed1f1f11c850b223
// PR c++/22233 // { dg-do compile } template<int> struct A // { dg-error "declaration" } { A(); }; template<int N, char> A<N>::A() {} // { dg-error "invalid use of incomplete type" } A<0> a;
google
chromium
spec22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec22.C
636
utf_8
fbcb25d460c773d1b6a68ecba11d0fb9
template <typename T> class srp; template <typename T> struct ptr { template <typename U> ptr(const srp<U> &other); // { dg-message "ptr<T>::ptr" } }; template <typename T> struct srp { template <typename U> operator ptr<U>(void) const; // { dg-message "srp<T>::operator" } }; ptr<int> parent_get() { srp<int> pare...
google
chromium
dependent-expr6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/dependent-expr6.C
301
utf_8
0c0a12ab75ecc281ca68babd4d565ce5
// { dg-do compile } // PR C++ 34081 ICE class Foo; template < class Foo > class Bar { enum Status { OK, NO }; enum Status getStatus () { return status; } Status status; };
google
chromium
using11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/using11.C
89
utf_8
a3ac6b8050e3adf5b98b0e28e64070fc
struct X { void f(); }; template <typename T> struct S : public T { using X::f; };
google
chromium
typedef25
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef25.C
720
utf_8
7b7d7acd3f627bf5dad56718a978812f
// Origin PR c++/42225 // { dg-options "-std=c++0x" } // { dg-do compile } template<class T> struct A { typedef T I; static const char *i; }; template<class T, int> struct B { typedef T TT; typedef decltype(TT::i) TT_I0; typedef decltype(&TT::i) TT_I1; typedef decltype(*TT::i) TT_I2; typede...
google
chromium
ctor4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ctor4.C
1,083
utf_8
517013de9505a99dcece802cdd7f1c6d
// { dg-do compile } // Bug 16174, SFINAE failure. template <class T> struct K { K(); K(K<T> & rhs); K(K<T> const& rhs); template <class U> K(K<U> const& rhs); private: template <class U> struct A; template <class U> struct A< K<U> const> { typedef typename K<U>::compile_time_error type; }; // This is...
google
chromium
crash96
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash96.C
130
utf_8
b80f828624f99069397d41d1df746903
// PR c++/40406 template<int> struct A { template<int> template<int> void A::foo() {} // { dg-error "extra qualification" } };
google
chromium
ptrmem4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ptrmem4.C
403
utf_8
730a9854e0dabd1a65dcfa256defbcf2
// { dg-do compile } // PR c++/8849 // Pointer to member function template argument deduction ICE. template <class CONT> void queryAliases(CONT& fill_me); // { dg-message "queryAliases|no known conversion" } struct SpyExample { void ready(); void inputs(); }; void SpyExample::ready() { queryAliases(inputs); // { ...
google
chromium
error35
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error35.C
113
utf_8
7b9093b26f8920c628c47bed533cc022
// PR c++/33494 template<int> void foo(int(*f=0)()); // { dg-error "declared void|scope|erroneous-expression" }
google
chromium
builtin1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/builtin1.C
142
utf_8
479ce6c62d0ab31928edd3bcef27bd5c
// PR c++/26559 template<bool> struct cond; template<int> struct S { void f(int i) { cond<__builtin_constant_p(i)>(); } }; S<1> s;
google
chromium
ttp27
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp27.C
170
utf_8
052744e1f403dbb8b61873044725e659
// PR c++/35678 template<typename T, T> struct A; template<typename> struct B; template<template<typename T, T> class U> struct B<U<char, 'h'> > {}; B<A<char,'h'> > x;
google
chromium
crash56
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash56.C
354
utf_8
33e6f2d8b3773c0bca8704049deea0c9
// PR c++/28705 // DR 218 is debating whether this is well formed or not. We've never // accepted it (because we'd crash), so we continue to reject it, but // without crashing. namespace N { struct A { A (A*); }; } template<typename T> void g (N::A *p) { (void) A (p); // { dg-message "" "" } }
google
chromium
crash59
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash59.C
681
utf_8
1453e3b7b4d89a8e161a789b6ab2a65b
//PR c++/27329 template<int> struct A // { dg-error "forward declaration" } ! // { dg-error "expected unqualified-id" } ; template<int> struct A { int foo(); }; // { dg-error "not a template" } int i = A<0>().foo(); ...
google
chromium
crash90
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash90.C
185
utf_8
efaa2028c9ccfb1df47967a48a4b3431
// PR c++/39750 template < unsigned > struct A ; template < typename > struct B ; template < typename T , A < B < T > // { dg-error "initializer|parse error|valid type|expected" } { }
google
chromium
friend33
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend33.C
165
utf_8
ed2b58353effe4479fb3ba174d53040c
// { dg-do compile } // PR c++/18733: Validation of template headers in friends template<int> struct A { void foo(); }; struct B { friend void A<0>::foo(); };
google
chromium
array15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array15.C
156
utf_8
e9bc7a53116f8cc44a505ea2700b2054
// PR c++/28595 template<int> struct A { static const int i; }; template<int N> struct B { char c[A<N>::i], d; // { dg-error "constant" } }; B<0> b;
google
chromium
dependent-name5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/dependent-name5.C
1,171
utf_8
e11707dffcc625042f15f6d621ee1079
// PR c++/9634, c++/29469, c++/29607 // Contributed by: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR224: Make sure that a name is *truly* semantically dependent. struct D { typedef int K; }; template <typename T> struct A { typedef int Bar; template <typename> struct N {}; typedef Bar ...
google
chromium
pr23510
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/pr23510.C
549
utf_8
43d61d39072047e6370638fa5a83b076
// { dg-do compile } // { dg-options "-ftemplate-depth-15" } template<unsigned int nFactor> struct Factorial { enum { nValue = nFactor * Factorial<nFactor - 1>::nValue }; // { dg-error "depth exceeds maximum" } // { dg-message "recursively required" "" { target *-*-* } 6 } // { dg-error "incomplete type" "" { t...
google
chromium
param3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/param3.C
113
utf_8
9cdc0ea3c87c4634fd17c85b389758e3
// PR c++/49418 template <class T> void f (const T t) { t = 1; // { dg-error "" } } int main() { f(1); }
google
chromium
crash63
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash63.C
165
utf_8
aa734f014cf5d00d10906b6c35b3de27
// PR c++/29729 template<typename T> void foo(T) { struct A { template<int> struct B // { dg-error "local class" } { typedef B<0> C; } }; }
google
chromium
array3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array3.C
342
utf_8
353ce65cd4b47cb87d4a7e33038e372d
// { dg-do compile } // Origin: Graeme Prentice <gprentice at paradise dot net dot nz> // PR c++/13474: An array domain which is value-dependent must be folded // in time for deduction. template< int X, int Y, int (*array_ptr)[Y] > class A; int array[5]; template< int X > class A<X,5,&array> {}; int main() { ...
google
chromium
defarg3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/defarg3.C
542
utf_8
e55baeaf118c452b9f707b8236ee86b1
// { dg-do compile } // PR c++ 11596 template <int V, bool F = V < 1> struct A { enum { value }; }; template <int V> struct B { enum { value = A<1>::value }; }; int ary[!B<1>::value ? 1 : -1]; template <int V, bool F = V < 1> struct A1 { enum { value = 1}; }; template <int V> struct A1<V,false> { enum { value}; }; temp...
google
chromium
spec3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec3.C
326
utf_8
f5581de159c7b5592926840478d5c5fb
// PR c++/3870 // Test that performing a type instantiation in order to match up a // specialization doesn't clobber last_function_parms. template <class T> struct A { typedef int I; }; template <class T> inline typename T::I foo (typename T::I, const T*); template <> int foo (int i, const A<long>*) { return i +...
google
chromium
union1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/union1.C
294
utf_8
b60b7ba97d84900a03ad818e8de4f60d
// { dg-do run } extern "C" void abort (); void g (char c) { if (c != 'a') abort (); } void h (int i) { if (i != 3) abort (); } template <typename T> void f(T const &t) { union { char c; T t_; }; c = 'a'; t_ = 3; h (t_); } int main () { f (3); }
google
chromium
typedef14
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef14.C
220
utf_8
906e6fd9c2cee3f79fa553d5d06adfdb
// Origin: PR c++/26693 // { dg-do compile } template <class T> struct A { typedef int mytype; void foo () { mytype v = ~static_cast<mytype> (0); } };
google
chromium
canon-type-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/canon-type-1.C
322
utf_8
d7bcb12b4251a66478891aad1a8828b7
// Origin PR c++/39754 // { dg-do compile } template < typename > struct A ; template < typename T , typename = A < T > > struct B { } ; template < class W , class > struct D { typedef W X ; A<X*> a ; }; template < class Y > struct E { B<Y*> b ; } ; E<int> e ;
google
chromium
friend20
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend20.C
121
utf_8
9d4f5b3213673d62379489a71f82b196
template <class T> struct A { friend void bar(A<T> a) {} }; void bar(A<int>); int main() { A<int> a; bar(a); }
google
chromium
friend22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend22.C
290
utf_8
dbfcd529175cac71265e5dff4f4513fe
// { dg-do compile } // PR c++/641: Duplicate friend diagnostics template <class T> class iterator { }; template <class T> class item { friend class iterator<T>; friend class iterator<const T>; }; class A { }; item<const A> i;
google
chromium
crash70
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash70.C
193
utf_8
e7c65b521cffd29e1a3625614a4329be
// PR c++/32113 template<int> struct A; template<typename T> void foo (A<&T::template i>); // { dg-error "not a template" } template void foo<A<0> > (A<0>); // { dg-error "does not match" }
google
chromium
array4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array4.C
146
utf_8
3904f7cfd18135b5f8ef1dbb020648fc
// PR c++/14122 extern const char str[]; template <const char* P> struct A { template <const char* R> void foo(); }; template class A<str>;
google
chromium
nested1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nested1.C
326
utf_8
39db6def8c2ae0c295a9f6433ab39375
/* PR c++/4633 */ /* { dg-do compile } */ // The 'class X' inside the template used to escape (somehow), // so that the typedef claimed that it was redefining X. template <typename T> struct S ; template <> struct S<float> { template <class, class> struct R; template <class X> struct R<X, X> { }; typedef int ...
google
chromium
koenig9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/koenig9.C
827
utf_8
bfbdb882922a6f961a43d5bba458b127
// PR c++/29131 // int has no associated namespaces, so arg-dep lookup doesn't find g(int). template <class T> int f() { return g(T()); } // { dg-error "argument-dependent" } int g(int); // { dg-message "declared here" } int i = f<int>(); // PR c++/24163 // Unqualified lookup doesn't find names from dependen...
google
chromium
unify8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/unify8.C
479
utf_8
d04f9d4f8d36c0325245fb8a7df506ad
// { dg-do link } // PR 21799: deduction of cvqualifiers on member functions was wrong template <class T> void f (T &, void (T::*)() ); template <class T> void f (const T &, void (T::*)() const) {} struct X { void g() const {} }; const X *x; int main () { f (*x, &X::g); }
google
chromium
defarg11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/defarg11.C
512
utf_8
d4611f4846a0b498f17d4173fb4e9cfb
// { dg-do compile } // We used to reject this code as the extension // for default arguments being accepted as less the // needed template arguments. template<typename> struct match { }; template<template<typename> class t,typename T> struct match<t<T> > { typedef int type; }; template<template<typename,typ...
google
chromium
new10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/new10.C
742
utf_8
b4688d67c16095e2855630d6bf9633c2
// PR c++/46658 typedef unsigned short int uint16_t; typedef unsigned int uint32_t; template<class T> class scoped_array { void reset(T * p = 0) { } }; typedef uint16_t SequenceIndex; typedef uint32_t SequenceMapIndex; class Analyzer { template <typename READER> bool ReadDictionary( READER& reader...