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
void10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/void10.C
180
utf_8
b98f8ca68199027ec91aea21199d5807
//PR c++/28736 template<void> struct A // { dg-error "not a valid type" } { template<typename> friend struct B; }; template<typename> struct B {}; B<int> b;
google
chromium
sizeof4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/sizeof4.C
319
utf_8
70e0faea5b000e5fbde589a89ad950bd
// { dg-do compile } // Origin: <anthwil at nortelnetworks dot com> // c++/4933: using sizeof with comma operator as template argument template<unsigned F> struct Foo {}; template<typename T> T makeT(); template<typename T,typename U> struct Bar { typedef Foo < sizeof((makeT<T>(), makeT<U>())) > Type; };
google
chromium
enum1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/enum1.C
129
utf_8
7c10af58e57cd68a834ce883259ef847
// PR c++/15554 template <int n> struct T1 { enum { N = 3 }; }; template <int n> struct T2 { enum { N = 3, N1 = T1<N>::N }; };
google
chromium
array6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array6.C
174
utf_8
294448858892b33e7116237b86ab785a
// PR c++/15287 struct S {}; struct Array { S operator[](int); } array; void (S::*mem_fun_ptr)(); template <int> void foo() { (array[0].*mem_fun_ptr)(); }
google
chromium
sfinae21
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/sfinae21.C
1,089
utf_8
abf4b7082d84a2ae41fd379ae916c34a
// PR c++/44908 struct A { }; struct B : public virtual A { }; template<bool, typename T = void> struct enable_if { typedef T type; }; template<typename T> struct enable_if<false, T> { }; template<typename From, typename To> class mini_is_convertible { typedef char one; typedef struct { char arr[2]; } t...
google
chromium
spec19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec19.C
405
utf_8
f5d160027a38c58d8d22ae4a510839c8
// PR c++/18962 template<class T1,int N1> class Klasse { public: template <class T2,int N2> void function( const Klasse<T2,N2>& ); }; template<> template<class T2,int N2> void Klasse<int,1>::function( const Klasse<T2,N2>& param ) { param; // make sure we use the argument list from the definition. } int main()...
google
chromium
unify2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/unify2.C
518
utf_8
4559d27962ac65b887c6f4a3a42dc70f
// { dg-do compile } template<int I> void f1 (char [][I+1]) {} template<int I> void f2 (char [][I+0]) {} template<int I> void f3 (char [][I]) {} template<int I> void f4 (char [][I-0]) {} template<int I> void f5 (char [][I-1]) {} template void f1 (char [][6]); // { dg-error "does not match" } template void f2 (char []...
google
chromium
array18
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array18.C
162
utf_8
8287a01c520c57028e25ecbe9d2cc181
// PR c++/30924 template<typename T> struct x {}; template<typename T, unsigned N> struct x<T*[N]> {}; int main() { x<int> a; x<int*[10]> b; return 0; }
google
chromium
spec8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec8.C
424
utf_8
3add5756f52354ea441e418ac77ff8cf
// { dg-do compile } // Specialization of member class template. template<class T1> struct A { template<class T2> struct B {}; template<class T2> struct C {}; }; template <> template <> struct A<int>::B<int>; template <> template <class U> struct A<int>::B {}; A<int>::B<int> ab; // { dg-error "incomplete" } A...
google
chromium
static15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static15.C
3,226
utf_8
c3b36a59772fbeeb2232e39c7ec7b99c
// PR c++/23667 // { dg-options "-std=gnu++98" } template<int dummy> struct X { static const int n_primes = 256; static const unsigned long primes[n_primes + 1]; }; template<int dummy> const int X<dummy>::n_primes; template<int dummy> const unsigned long X<dummy>::primes[n_primes + 1] = { 2ul...
google
chromium
array10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array10.C
412
utf_8
2960ad36eda739b652d2efa379834c5c
template<class T> struct Vec { T* data; T& operator[](int i) const; }; template<class T> inline T& Vec<T>::operator[](int i) const { return (&data[0])[i]; } inline double foo(Vec<double> v) { return v[0]; }
google
chromium
ttp6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp6.C
415
utf_8
ede8e95c1aeeeb0cf1c4cfb0fd860e07
// { dg-do compile } // PR c++/10552: Member class template as template template argument // substitution issue. template <template <typename> class A, typename> struct B { typedef typename A<int>::t t; }; template <typename D> struct E { template <typename> struct F { typedef int t; }; typedef typename B<F, D>::...
google
chromium
pr35240
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/pr35240.C
206
utf_8
547209b5f092ec3d4f61a634c6253d56
// PR c++/35240 // { dg-do compile } template<int> struct A {}; template<int N> A<sizeof(new int[N][N])> foo(); // { dg-message "unimplemented" } void bar() { foo<1>(); // { dg-message "required" } }
google
chromium
non-type-template-argument-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/non-type-template-argument-1.C
298
utf_8
30d31ed2484da393d79f5ad4a32e80cf
struct A { static const bool b=false; }; struct B { typedef A X; }; template <bool> struct C {}; template <typename T> struct D { C<T::X> c; // { dg-error "parsed as a non-type|if a type is meant" } }; D<B> d; // { dg-message "required from here" }
google
chromium
array17
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array17.C
272
utf_8
d745bc63c8c200e57c116976bd79e9b1
// { dg-do compile } template <typename T> struct V { T& operator[](int); }; struct S { S operator +(int); template <typename T> T value(); }; template <typename T> void R (T v) { v[(S() + 0).template value<int>()][0] = 0; } int main () { R(V<V<int> >()); }
google
chromium
friend38
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend38.C
133
utf_8
9c94dec5b4c21f6f788aa68c4cbf6ae7
// PR c++/22352 template <class A> class s { typedef int d; template <class s, typename s::d> friend class t; }; s<int> t1;
google
chromium
defarg8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/defarg8.C
196
utf_8
5a9ab10f62078b4d20766a00362fa933
// PR c++/27094 // { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } struct A { ~A(); }; struct B : A { B(); }; template<int> struct C { C(const B& = B()); }; C<0> c;
google
chromium
canon-type-13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/canon-type-13.C
303
utf_8
cd9ee9fa890caf720c7949acb76887b6
// { dg-do compile } template<class T> struct S0 { }; template<class T> struct S1 { }; template<class T, template<class T> class A, template<class T> class B = A> struct C { B<T> m; }; void foo() { C<int, S0> s; S0<int> s0; s.m = s0; }
google
chromium
access2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/access2.C
425
utf_8
bd880d8d2c138019357fe824987745e3
// { dg-do compile } // PR c++/5387 // Enforcing access of typename type. template <class T> struct A { typename T::X x; // { dg-error "this context" } int f() { return T::i; } // { dg-error "this context" } }; class B { typedef int X; // { dg-error "private" } static int i; // { dg-error "private" }...
google
chromium
qualttp18
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualttp18.C
334
utf_8
bbfca58649b8b1342b8f444ed2a5f1fd
// { dg-do compile } struct A { template <class T> class B {}; }; template <template <class> class TT> struct X { TT<int> y; }; struct C { X<A::template B> x; // { dg-error "" } }; int main() { C c; }
google
chromium
canon-type-10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/canon-type-10.C
390
utf_8
ad0e0128dad7b2d09241fb6a378fc1d5
// { dg-do compile } template<class T> struct C { }; template<class T, template<class TT_T0, template<class TT_T1> class TT_TT> class TT, class U = TT<int, C> > struct S { void foo(TT<T, C>); }; template<class T, template<class TT_T0, template<class TT_T1> class TT_TT> class TT, class U> void S<T, TT, U>::foo...
google
chromium
spec15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec15.C
1,060
utf_8
290d2d2975a01e2cf3eea77f1000b57e
// { dg-do compile } // Contributed by Wolfgang Bangerth <bangerth at ticam dot utexas dot edu> // PR c++/509: Make sure specializations of member templates match correctly // between template and non-template overloads. template <class T> struct A { template <class U> void f (U); void f2 (int); template <clas...
google
chromium
nested3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nested3.C
486
utf_8
52b0f019597b920ac1d5bfc3bea783d0
template <class T1, class T2> class A { template <class S> class SubA { int _k; }; T1 _t1; T2 _t2; }; template <class U> class B { class SubB1 { B _i; }; class SubB2 { int _j; }; A<U,SubB1>::SubA<SubB2> _a; // { dg-error "not a base type" "not base" } // { dg-message "note" "note" { ...
google
chromium
ttp24
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp24.C
116
utf_8
23d3457f42057bd9e65058bbe00e779f
// PR c++/30897 template<template <typename T, typename = T > class U> struct A { template<int> U<int> foo(); };
google
chromium
local1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/local1.C
512
utf_8
b7860e67547fa0e658cae5b27a73d61b
// PR c++/4286: We were crashing when trying to set up the class bindings in // g(), because xref wanted the mangled name, which breaks inside a template. // Of course, the offending code is actually ill-formed anyway, so check // for the error. Also check that it's formatted properly. struct A { template<class T>...
google
chromium
friend45
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend45.C
240
utf_8
e3a0414fe5ccc0a10aa6656eadd87cec
// PR c++/28025 class BaseSubmit { template<class T> friend class PeriodicSubmit; }; template<class ID> class ValuesSubmit { template<class T> friend class PeriodicSubmit; }; class A; class MultiSubmit : public ValuesSubmit<A> { };
google
chromium
partial13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/partial13.C
629
utf_8
60cae52d36e0a429fcd673ddc92f855f
// PR c++/45012 template <bool B, class T=void> struct enable_if; template <class T> struct enable_if<true,T> { typedef T type; }; enum { RUNTIME = 0 }; // it compiles with the previous line commented out and the next commented in // static const int RUNTIME=0; template <class T, class U, class EN=void> struct fo...
google
chromium
crash61
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash61.C
128
utf_8
da9e80228953353af5459e8d0d689e84
// PR c++/29733 template<typename T> void foo() { T t = 0; // { dg-error "function type" } } void bar() { foo<int()>(); }
google
chromium
inherit5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/inherit5.C
106
utf_8
c617d0614fa2c65ab23502fc466e2592
struct A { template<int> void foo(); }; template<int N> struct B : A { B() { foo<N>(); } }; B<0> b;
google
chromium
qualttp11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualttp11.C
328
utf_8
07ba931fb2075a068c2bb8f171d57bb1
// { dg-do link } struct A { template <class T> class B {}; }; template <template <class> class TT> struct X { TT<int> y; }; template <class T> struct C { X<T::template B> x; }; int main() { C<A> c; }
google
chromium
crash40
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash40.C
157
utf_8
0e9a3be86c767d4c26ffb432816872ef
// PR c++/22180 struct A {}; template<typename T> void foo() { T::~T(); // { dg-error "member" } } template void foo<A>(); // { dg-message "required" }
google
chromium
ttp20
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp20.C
193
utf_8
e418b0b8fa3fa6c89ea62a249937f9c4
// PR c++/27424 // Bug: failing to substitute the 'int' into C template<typename T> struct A { template<template<T> class> struct B {}; template<T> struct C; B<C> b; }; A<int> a;
google
chromium
dependent-expr8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/dependent-expr8.C
234
utf_8
0ade4127acffdc0e663f612bf4d1cb93
// Origin PR c++/48574 // { dg-options "-std=c++0x" } // { dg-do compile } struct A { virtual int foo(); }; void baz (int); template <typename T> void bar(T x) { A &b = *x; baz (b.foo ()); } void foo() { A a; bar(&a); }
google
chromium
ptrmem10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ptrmem10.C
251
utf_8
aa534276e0095c6eef1fe985651eee58
// PR c++/15096 template <typename T_> class C1 { public: C1 (); ~C1 (); const int C1<T_>::* getPtr () const; private: int x; T_ y; }; template <typename T_> const int C1<T_>::* C1<T_>::getPtr () const { return &C1<T_>::x; }
google
chromium
injected1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/injected1.C
677
utf_8
109bd17883c054f1198cb583e3ecf56d
// PR c++/13950, DR 176 template <class T> struct Base { }; // { dg-error "" } candidate struct D1: Base<void> { D1::Base* p1; D1::Base<double>* p2; Base *p3; Base<double>* p4; }; struct D2: Base<void>, Base<void*> { D2::Base* p1; // { dg-error "" } D2::Base<double>* p2; Base *p3; // { dg-error "" ...
google
chromium
asm1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/asm1.C
160
utf_8
b8d7ae2a709e06f2d49e19cfb00e77d3
// PR c++/24761 // { dg-do compile } template <int> int f (int i) { asm ("# %0 %1" : "+r" (i)); return i; } int main () { return f<0> (0) + f<1> (0); }
google
chromium
non-dependent7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/non-dependent7.C
278
utf_8
545ef1f20e531a9708266594092c6d03
// { dg-do compile } // PR c++/13092: ICE taking address of member which is non-dependent struct S { int i; }; template<int S::*p> struct X {}; template <class T> struct Foo { X<&S::i> x; }; template struct Foo<void>;
google
chromium
conv8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/conv8.C
224
utf_8
ecc224a37ac009f350fab0ef1e1594a5
// { dg-options "-fabi-version=1 -Wno-abi" } template <typename T> struct S { struct I{}; operator I* (); }; template <typename T> struct S2 : S<T> { operator typename S<T>::I* (); }; template struct S2<int>;
google
chromium
unify1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/unify1.C
439
utf_8
450c0b9e346d4201c85d9055f20ebf1a
// Test non-type template argument folding. // { dg-do compile } template < int I1, int I2 > class unit { public: unit() {} unit( const unit<I1,I2>& ) {} template< int Q1, int Q2 > unit< I1 - Q1, I2 - Q2 > operator / ( const unit< Q1, Q2 >& rhs ) const { return unit< I1 - Q1, I2 - Q2 >(); } }; int m...
google
chromium
memfriend5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/memfriend5.C
580
utf_8
b29c5ddfeb79a3077e908d0877024b79
// { dg-do compile } // Member template function of member class template as friend template <class T> struct A { template <class U> struct B { template <class V> void f(V); }; }; class X { int i; template <class T> template <class U> template <class V> friend void A<T>::B<U>::f(V); }; template <class T...
google
chromium
conv2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/conv2.C
521
utf_8
383f6618c1ccaddea23b36ff23d6d35e
// { dg-do run } // PR 4361. Template conversion operators were not overloaded. class C { public: operator float () {return 2;} operator int () { return 0; } template<typename T> operator int () { return 1; } }; int main () { C p; int r; r = p.operator int (); if (r) return r; r...
google
chromium
memfriend12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/memfriend12.C
750
utf_8
3efbba635759c97e9b452f6d5ba9696a
// { dg-do compile } // Nested class of class template as friend template<class T> struct A { struct B { void f(); }; }; template <class U> class C { int i; template<class T> friend struct A<T>::B; }; template<class T> struct A<T*> { struct B { void f(); }; }; template<> struct A<char> { struc...
google
chromium
crash15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash15.C
112
utf_8
e50e217f7da35dc497156675b2547e44
// PR c++/13310 struct A {}; template <typename> void foo() { A a; a.foo<int>(); // { dg-error "" } }
google
chromium
template-id-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/template-id-1.C
474
utf_8
2f6494bf04dd960a886f4ba09c1a1bcf
// { dg-do compile } struct A { typedef int Y; typedef double Z; }; struct B { template<typename T> void func(typename T::Y, typename T::Z) { } }; template<typename T> struct X { void gunc(); }; template<typename T> void X<T>::gunc() { B b; b.func<A>(0, 3.); } int main() { X<int> x; x.gunc();...
google
chromium
ctor9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ctor9.C
153
utf_8
391626574e567f5a13e98f2a2884c8fc
// PR c++/9050, DR 147, 318 struct Y { template <typename T> Y (T); template <typename T> void foo (T); }; template <> Y::Y<int> (int) { }
google
chromium
typename7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typename7.C
211
utf_8
9108fc5e479d002dfe1d6280ab3a8e35
// PR c++/17501 template<int> struct A; template<> struct A<0> { struct B { struct C { typedef int D; }; }; }; template<int I> struct E { typename A<I>::B::C::D i; };
google
chromium
dependent-expr4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/dependent-expr4.C
342
utf_8
b4bc25a86f512c4a58cc90654edd346f
// { dg-do compile } // PR c++/12573: COMPONENT_REFs must be inspected for dependness. // Or, more specifically OFFSETOF. template <bool> struct S; template <typename K> struct Y { int x; }; template <class T> struct Z { S< (bool)(__builtin_offsetof (Y<T>*, x) == 0) > s; };
google
chromium
void8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/void8.C
213
utf_8
d7375b6b148303af73024b27635ad7cd
//PR c++/28737 template<void> struct A; // { dg-error "not a valid type" } template<typename> struct B; template<void N> struct B<A<N> > {}; // { dg-error "not a valid type|declared|invalid" }
google
chromium
friend5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend5.C
183
utf_8
c9137614e9385e52c606c2d6e976e585
// { dg-do compile } namespace NS { template <typename number> class C; } template <typename T> class X { template <typename N> friend class NS::C; }; template class X<int>;
google
chromium
crash10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash10.C
355
utf_8
245c3c3a69c27117dfcc4b6588677c7d
//PR c++/11432 // The mainline ICE on this one between 2003-01-16 and 2003-07-29. // { dg-do compile } extern "C" void abort(); template <int A> struct a { static int const value = A - 1; }; template <int B> struct b { static int foo() { return a<L>::value; } static int const L = a<B + 1>::valu...
google
chromium
canon-type-8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/canon-type-8.C
1,604
utf_8
14a090fd842facce354c55bdb935647d
// PR c++/45984 // We were getting different canonical types for matching types because // TYPE_ALIGN wasn't propagated to all the variants fast enough. // { dg-options "" } typedef __SIZE_TYPE__ size_t; enum { chunk_size = 16 }; typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); typedef float...
google
chromium
crash27
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash27.C
97
utf_8
6ef1f361b05f74553ccdc456e5d76ea9
// PR c++/18586 template <int> struct A { template <int N> int A<N>::i; // { dg-error "" } };
google
chromium
new5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/new5.C
138
utf_8
1a15a65a0d144c0881e658ac6436ea42
// PR c++/27210 template <class foo> class junk { void bar(int a) { unsigned char *c = new unsigned char[a*sizeof(foo)]; } };
google
chromium
typedef17
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef17.C
338
utf_8
1b0cfbee8f3caf6029a657e5011d2adc
// PR c++/37806 extern "C" int printf (const char *, ...); template <typename T> struct S1 { typedef void (function_type)(int) const; }; struct S2: public S1<int> { virtual function_type f = 0; }; struct S3: public S2 { void f (int i) const { printf ("Hello world: %d\n", i); } }; int main() { ...
google
chromium
friend9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend9.C
442
utf_8
59b5bf61b7f6210d3cf3b9b45692794a
// { dg-do compile } // PR c++/8099 // Partial specialization as friend class template <int N, typename T> struct X; template <typename T> struct X<1,T>; template <typename P> class Y { static int i; template <int N, typename T> friend struct X; friend struct X<1,P>; }; template <typename T> struct X...
google
chromium
sfinae6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/sfinae6.C
1,947
utf_8
2622d4a8e2409cf748878b7d2db89477
// DR 339 // // Test of the use of the function call operator with SFINAE typedef char yes_type; struct no_type { char data[2]; }; template<typename T> T create_a(); template<typename T> struct type { }; template<bool, typename T = void> struct enable_if { typedef T type; }; template<typename T> struct enable_if<fal...
google
chromium
non-dependent5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/non-dependent5.C
153
utf_8
7e000c3eaeb33b0cda5191bb78ee313d
// PR c++/15299 template <class T> void fun_ptr(T (*)()); template <class T> T bar(); template <class> void foo () { fun_ptr(bar<int>); }
google
chromium
typedef26
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef26.C
503
utf_8
4b7b5ad8691fed069cf0e029ff4382dc
// Origin: PR c++/42225 // { dg-do compile } struct A { typedef int TI; }; template<class T0> struct S0 { int i; }; template<class _T, int> struct S1 { typedef _T T; typedef typename T::TI TTI; typedef S0<TTI> TT0; typedef S0<typename T::TI> TT1; }; template<class T> void foo(const T&) { typ...
google
chromium
crash30
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash30.C
268
utf_8
4a6fae58852a7d58b5b482d48d97d11f
// PR c++/19034 template< bool C > struct B { }; template<typename S> int foo(); template<typename S> int foo1(); template<typename T> struct bar : public B <(sizeof(foo<T>()) == 1)> { }; template<typename T> struct bar1 : public B <(sizeof(foo1<T>()) == 1)> { };
google
chromium
operator1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/operator1.C
519
utf_8
b690784559e05afd43e95b8cf36b03eb
class test { public: float operator[]( int index ) { return testFloat[index]; } private: float testFloat[3]; }; template < class typeA > float operator*( typeA a, float b ) { return a[0] * b; } template < class typeB > float operator*( float a, typeB b ) { return a * b[0]; } template < class typeA, class...
google
chromium
incomplete2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/incomplete2.C
297
utf_8
e8b18c9093eb547e76b1598e177671b2
// PR c++/27427 // { dg-do compile } struct A; template<A&> void foo(); // { dg-message "note" } A a; // { dg-error "incomplete type" } void bar() { foo<a>(); // { dg-error "(no matching function|could not convert)" } // { dg-message "candidate" "candidate note" { target *-*-* } 12 } }
google
chromium
complit1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/complit1.C
168
utf_8
d8eeedb4ae11ac620e9e3c21e5ce29ae
// { dg-options "" } template <int D> struct C { int d[3]; C(); }; template<int D> C<D>::C() : d((int[]){1,2,3}) {} // { dg-error "array" } template class C<1>;
google
chromium
ttp10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp10.C
555
utf_8
3ef16395deaff8acf9155525bf631589
// { dg-do compile } // PR c++/16175: Missing cv qualifier in error message output template <typename> struct Template {}; template<template<typename> class D> struct B { static void foo1(const D<void> *); // { dg-error "const" } static void foo2(volatile D<void> *);// { dg-error "volatile" } }; class E...
google
chromium
crash46
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash46.C
80
utf_8
933d195d117ede217f70567360e6e511
// PR c++/27102 template <class T> void T::foo() {} // { dg-error "invalid" }
google
chromium
init2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/init2.C
225
utf_8
76f88c13708d18ca711ab8287d1caac9
// PR c++/9820 template <typename T> struct X { template<typename> static int test(...); template<typename> static int test(int *); static const int i = sizeof(X<T>::template test<int>(0)); }; template class X<int>;
google
chromium
spec13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec13.C
207
utf_8
e9df140ef024c36c2a7761c13a353434
// { dg-options "-w" } template <typename T> struct S { int i; template <typename U> void f(U) {} }; template<> template <typename U> void S<int>::f(U) { i; } void f() { S<int> s; s.f<int>(3); }
google
chromium
static30
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static30.C
189
utf_8
916a608bb6377983e85912d2e9354f46
// PR c++/31992 template <int> struct A { static const int i1; static const int i2; }; template <int N> const int A<N>::i1(A<N>::i); template <int N> const int A<N>::i2(3, A<N>::i);
google
chromium
spec33
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec33.C
152
utf_8
a9180d3ef512a022c9b825693df2bc57
//PR c++/27667 struct A { template<int> static void foo () {} template<> static void foo<0>() {} // { dg-error "explicit|template" } };
google
chromium
qualttp7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualttp7.C
322
utf_8
3efab71e896874774c80630cb0888d5a
// { dg-do compile } template <template <class> class TT> class C { }; template <class T> struct D { C<T::template B> c; // { dg-error "no class template" } }; D<int> d; // { dg-message "required" }
google
chromium
friend42
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend42.C
157
utf_8
8f75af1c73180eecafb9d5d27f306dd5
// { dg-do compile } template <class T> void foo (int); template <class T> class Q { friend void foo<T> (int = 3); // { dg-error "default argument" } };
google
chromium
pseudodtor6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/pseudodtor6.C
108
utf_8
3db5c6a0f3565dd475506157d06e140a
// PR c++/47971 template <typename> struct S { typedef double T; S () { T ().~T (); } }; S<double> s;
google
chromium
static27
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static27.C
169
utf_8
1b82adb3481fed24cf9d4678fad7ec3a
// PR c++/28235 template<typename> struct A { static const bool i = true; template<bool = i> struct B {}; B<> b; }; void f() { A<int> a1, a2; a1.b = a2.b; }
google
chromium
inherit2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/inherit2.C
344
utf_8
13bd5309700c34e9e01c5bd7fd620d7b
// PR c++/5658 struct A { typedef int iterator; }; template <typename T> struct B: public A { template <typename U> struct iterator { }; B() { } }; int main() { B<int> a; }
google
chromium
nontype14
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype14.C
209
utf_8
937af4e6ac2cefe2dff1503c7819130f
// PR c++/23789 template <int W> struct X { template <int W2> X< (W+(W&&W) > 1 ? W+(W&&W) : 1)+1> operator + (const X<W2>&) const; }; template <int dummy> void foo() { X<6> A,B; A + B; }
google
chromium
friend40
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend40.C
216
utf_8
e91add4174f6722fc0ed3c0bbd420d70
// PR c++/24173 // { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } template <int> struct A; void foo(A<0>); template<int> struct A { friend void foo(A<0>); }; void bar() { foo(A<0>()); }
google
chromium
friend19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend19.C
396
utf_8
599c6765352974ba5694506637bc1ea3
// { dg-do compile } // PR c++/11030: Template substitution of friend class that is // a specialization. template <int S> struct A { void func(void); }; template <class T> class C { static void private_func(void) {} public: friend class A<512>; }; template <int S> void A<S>::func(void) { C<void>::private_func()...
google
chromium
defarg10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/defarg10.C
326
utf_8
1f7a92340a1c2a7cf7f4bb987f326111
// PR c++/28363 // { dg-do compile } template<typename T, template<int> class = T> // { dg-error "invalid use of type" } struct A; typedef int I; template<template<int> class = I> // { dg-error "invalid use of type" } struct B; struct S; template<template<int> class = S> // { dg-error "invalid use of type" } stru...
google
chromium
nontype17
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype17.C
121
utf_8
6938006fe193f5813dbc894a73ef554f
// PR c++/35282 template<int> struct A { template<int> void foo(); }; template<> template<int> void A<0>::foo() {}
google
chromium
init6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/init6.C
515
utf_8
65a281c41b82251552faaf8359766e91
// PR c++/25836 template <class T> class Iter {}; template <class T> class SubIter : public Iter<T> { void insert(T); }; class GraphBase { public: class Node; }; template<class T> class Graph : public GraphBase { class Inner { Iter<typename Graph<T>::Node*> *get(); }; }; template<class T> Iter<typename...
google
chromium
sfinae10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/sfinae10.C
7,323
utf_8
5568b793e3a2a52d26d851871c8261c0
// DR 339 // // Test of the use of various unary operators with SFINAE // Boilerplate helpers typedef char yes_type; struct no_type { char data[2]; }; template<typename T> T create_a(); template<typename T> struct type { }; template<bool, typename T = void> struct enable_if { typedef T type; }; template<typename T> ...
google
chromium
member6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/member6.C
205
utf_8
ed593b0ea0c7885cd94106b4b24d1173
// PR c++/29105 struct Observer { template < typename T > void observeComponent (); }; template < typename T > struct TagFilter : Observer { TagFilter () { observeComponent < int > (); } };
google
chromium
mem_func_ptr
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/mem_func_ptr.C
1,683
utf_8
08ee485d4a84252ae107afcbd8bb4b13
// { dg-do compile } template<typename T> struct takes_member_ptr; template<typename T, typename Klasse> struct takes_member_ptr<T Klasse::*> {}; template<typename T, typename Klasse> void fun_takes_member_ptr(T Klasse::*) {} template<typename T> struct order_member_ptrs; template<typename T, typename Klasse> struct...
google
chromium
crash78
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash78.C
114
utf_8
63aa4ea81419f0f2436d71c62bb543c3
// PR c++/35077 template<typename=int struct A __attribute((aligned(4))); // { dg-error "declaration|expected" }
google
chromium
instantiate2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/instantiate2.C
255
utf_8
88e1ec74b340410f99e5bf69122404bd
// { dg-do compile } // PR c++/2862 // Default function argument and template instantiation. template <int dim> void f (int=0) {} template void f<1> (); // { dg-error "not match" }
google
chromium
typedef9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef9.C
823
utf_8
779a641261850a2aeef3d242e02f0a9b
// PR c++/34846 template<typename, typename> struct __are_same { enum { __value = 0 }; }; template<typename _Tp> struct __are_same<_Tp, _Tp> { enum { __value = 1 }; }; template<typename, bool> struct __enable_if { }; template<typename _Tp> struct __enable_if<_Tp, true> { typedef _Tp __type; }; template<typename _Itera...
google
chromium
qualttp22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualttp22.C
803
utf_8
3b637cecee1acb45f1c7f752a8c7732d
// { dg-do compile } // PR c++/13520: Default template template argument that is a qualified id // with dependent scope. template<typename regular_type> class Policy {}; template <typename regular_type, template<typename> class OriginalPolicy> class ChangedPolicy_impl {}; template <template<typename> class OriginalPoli...
google
chromium
nontype11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype11.C
282
utf_8
9ba9723e8601b19208ac3f8350ee6695
// { dg-do compile } // Origin: <fsm at robots dot ox dot ac dot uk> // PR c++/18354: Unary plus should not be wrapped in NON_LVALUE_EXPR template <int N> struct X { }; const int n = 1; void f() { X< 1> a; X<-1> b; X<+1> c; } void g() { X< n> a; X<-n> b; X<+n> c; }
google
chromium
enum2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/enum2.C
129
utf_8
5fb321d2debea87feaa0815b488d0835
// PR c++/15877 template <int n> struct T1 { enum { N = 3 }; }; template <int n> struct T2 { enum { N = n, N1 = T1<N>::N }; };
google
chromium
friend47
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend47.C
131
utf_8
b4e412d8986f5c28376eafc85c4b56e2
// PR c++/19809 template<int i> struct n{ friend void foo(){ } // { dg-error "defin" } }; int main(){ n<1> n1; n<2> n2; }
google
chromium
spec32
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec32.C
118
utf_8
f2a0b8ac9757fbcaba8addb591bb1e06
//PR c++/28861 struct A { template<template<int> class B> struct B<0>; // { dg-error "name of class shadows" } };
google
chromium
spec36
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec36.C
322
utf_8
1ff4e553eeebbb6941b32728ea24e2cf
/* PR c++/38089 */ /* { dg-do compile } */ struct basic_string { basic_string(const int __s); }; namespace MyNS { class MyClass { template <typename T> T test() { } /* { dg-error "from definition" } */ }; } template <> basic_string MyNS::MyClass::test() /* { dg-error "specialization of" } */ { return 1; ...
google
chromium
overload1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/overload1.C
456
utf_8
6cba2353f6c7917dd350506e390d9379
// { dg-options "-w" } // PR c++/9420 // Bug: We were instantiating B<int> during overload resolution for E<0. // This is wrong; the contents of B<int> are not relevant, since we can't // use its constructors (because we'd already be using a constructor for // C). enum { E }; template <typename T> struct A { static...
google
chromium
qualttp12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualttp12.C
348
utf_8
f5d74cc14dee1391fe409d4d0258396e
// { dg-do link } struct A { template <class T> class B {}; }; template <template <class> class TT> void f() { TT<int> y; } template <class T> struct C { void g() { f<T::template B>(); } }; int main() { C<A> c; c.g(); }
google
chromium
anon4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/anon4.C
153
utf_8
66a2a8fd730ed0d9822656e2f45bc924
// PR c++/28407 // A declaration in the anonymous namespace still has external linkage. template <int *P> class A { }; namespace { int i; } A<&i> a;
google
chromium
Wshadow-6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wshadow-6.C
1,255
utf_8
35f05df31afcba4dd04d31031932ab94
// Test the declaration of nested lambda function shadows // a parameter or previous local. // { dg-do compile } // { dg-options "-std=c++0x -Wshadow" } struct S {}; int f1(int x) // { dg-warning "shadowed declaration" } { int t = 0; int m = 0; // { dg-warning "shadowed declaration" } [&t] (int x) { // { dg-w...
google
chromium
miss-format-5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/miss-format-5.C
1,043
utf_8
e8e1065301c5aeeb1cd383514614b891
/* { dg-do compile } */ /* { dg-options "-Wmissing-format-attribute" } */ /* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */ #include <stdarg.h> typedef void (*noattr_t) (const char *, ...); typedef noattr_t __attribute__ ((__format__(__printf__, 1, 2))) attr_t; typedef void (*vnoattr_t) (co...
google
chromium
noeffect4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/noeffect4.C
1,660
utf_8
78cf893a8741490107d3cc3c403c9528
// { dg-do compile } // { dg-options "-Wall" } // PR 12037. struct X { int operator+(int); int operator-(int); int operator*(int); int operator/(int); int operator%(int); int operator>>(int); int operator<<(int); int operator&(int); int operator|(int); int operator^(int); int operator&&(int); in...
google
chromium
Wparentheses-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-2.C
734
utf_8
ea3c2716291fc812b8d00190b207f31b
// Test operation of -Wparentheses. Warnings for assignments used as // truth-values shouldn't apply other than for plain assignment. // Essentially the same as gcc.dg/Wparentheses-10.c. // { dg-do compile } // { dg-options "-Wparentheses" } int foo (int); int a, b, c; bool d; void bar (void) { if (a += b) foo (...
google
chromium
Wuninitialized-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wuninitialized-2.C
1,134
utf_8
21fc5ac0f1ee255b648d071723254d87
/* { dg-do compile } */ /* { dg-options "-O -Wuninitialized" } */ struct S8 { template<typename T> S8(T) { } }; template<typename T> struct S10; template<typename T> struct S10<T()> { typedef T S12; typedef S8 S1(); }; template<typename T> struct S3 { }; template<typename T> struct S11 { S11(S3<T>); }; struct S2 { ...
google
chromium
Wunused-var-11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-var-11.C
260
utf_8
16cd18b051568e2b0d1ed53dfcd6fc38
// PR c++/44412 // { dg-do compile } // { dg-options "-Wunused" } struct S { int foo (); static int bar (); }; int S::foo () { return 5; } int S::bar () { return 6; } int f1 () { S s; return s.foo (); } int f2 () { S s; return s.bar (); }