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
typename13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typename13.C
402
utf_8
ca4a61ed1c2da506a98ef392ad06676a
// { dg-do compile } template <typename T> struct A { struct B; typedef typename B::type type; }; template <typename T> struct A<T>::B { typedef typename A<T>::type type; type Foo (); }; template <typename T> typename A<T>::B::type A<T>::B::Foo () { return 0; }
google
chromium
init4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/init4.C
326
utf_8
e920cba477d63f2866ea0710ce55a2ce
// { dg-do compile } int f1(char); template <int t> void f(void) { const char* const suffixes = "plpv"; f1(suffixes[t]); }
google
chromium
static23
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static23.C
200
utf_8
55ffcdd6cb9d31737ce21132239b5d71
// PR c++/26266 template<typename> struct A { static const int i = 1; }; template<typename> struct B { static const int j = A<char>::i; static const int k = int(j); int x[k]; }; B<char> b;
google
chromium
canon-type-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/canon-type-2.C
325
utf_8
cb422094173e29b6267dd8e869190b16
// 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
static8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static8.C
139
utf_8
6dbdfa91bc4e4ea29a3ec7f4b44ba16f
// PR c++/17585 template <void (*p)(void)> struct S03 {}; class C03 { public: static void f(void) {} void g(void) { S03<&f> s03; } };
google
chromium
error3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error3.C
113
utf_8
0e96862a75ffea6e3b8357e5251534dd
// PR 12762 template <typename> struct A { A() {}}; typedef A<int> Ac; Ac<double> a; // { dg-error "template" }
google
chromium
crash80
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash80.C
190
utf_8
c9dc4ab7acea171537b7ea2d00500ffa
// PR c++/37087 namespace a { template <typename T> class Foo; } namespace b { template <> class ::a::Foo<double> {}; // { dg-error "global qualification of class name is invalid" } }
google
chromium
ptrmem5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ptrmem5.C
449
utf_8
c1d71028a4f69f5c3fcfd2fd8a35f919
// { dg-do compile } // PR 10119 (part). We failed to tsubst the args of a template-id-expr template <class T, void (T::* const U)()> struct Good { static int const value = 0; }; struct A { template <typename U> void good () { int s_id = Good<A, &A::good<U> >::value; } }; int main() { A().good<int>(); }
google
chromium
error40
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error40.C
664
utf_8
a73c78b9b0cb5a8fb837e7715821f660
// { dg-options "-fno-pretty-templates" } template <class T, int N=0, int X=1> struct A { struct AN; }; void foo(void) { A<void> a = 0; // { dg-error "A<void, 0, 1>" } } template <class T> T f(T); // { dg-message "int f<int>.int." } template <class T> T f(T, int = 0); // { dg-message "" } template <class T...
google
chromium
access5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/access5.C
417
utf_8
043c53bbc7cad60a3c72bfa79987f011
// { dg-do compile } // PR c++/7348 // Access control for typename in function return type class Outer { template <int dim> struct Inner { typedef int T; T foo (); }; public: Outer(); }; template <int dim> typename Outer::Inner<dim>::T Outer::Inner<dim>::foo () { return 1; } template st...
google
chromium
repo9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/repo9.C
1,205
utf_8
09c238973ea94f59ca87a7f64f81c0e8
// PR c++/36364 // { dg-options "-frepo" } // { dg-final { cleanup-repo-files } } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } template <typename C> struct A { static void assign (C &c1, const C &c2) { c1 = c2; } }; template <typename C, typename T> struct B { st...
google
chromium
qualttp14
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualttp14.C
436
utf_8
872b95cdec1729cec20c4f30444d01c5
// { dg-do link } struct A { template <class T> class B {}; }; template <template <class> class TT, class T> struct X { TT<int> y; T z; }; template <class T> struct X<T::template B, T> { typename T::template B<int> y; T z; }; template <class T> struct C { X<T::template B, A> x; }; int main() { C<A> c; }
google
chromium
friend18
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend18.C
377
utf_8
c8d90e11af5004983158fb9d1e72ccfc
// { dg-do run } // PR 10158. implicit inline template friends ICE'd template <int N> struct X { template <int M> friend int foo(X const &) { return N * 10000 + M; } }; X<1234> bring; int main() { return foo<5678> (bring) != 12345678; }
google
chromium
memfriend3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/memfriend3.C
669
utf_8
fb47ef062f1c0907f4bd591ea44dd1ea
// { dg-do compile } // Member function of class template as friend template<class T> struct A { void f(T); }; class C { int i; template<class T> friend void A<T>::f(T); }; template<class T> struct A<T*> { void f(T*); }; template<> struct A<char> { void f(char); }; template<class T> void A<T>::f(T) { C c; ...
google
chromium
pseudodtor3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/pseudodtor3.C
677
utf_8
a4f0590114aea315ae757507b2d7eab4
// PR c++/32241 // { dg-do compile } struct A { typedef int T; T &foo (); A () { foo.~T (); } // { dg-error "does not have class type|expected" } }; template <typename T> struct B { T &foo (); B () { foo.~T (); } // { dg-error "invalid use of member" } }; B<int> b; template <typename T, typename S> struct...
google
chromium
sfinae17
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/sfinae17.C
601
utf_8
2bc096ac62072d7fefd78642d341f372
// The conversion from D* to B* is ambiguous, but that should not produce // an error, it should remove the first f overload by SFINAE. #define static_assert(TEST,STR) \ do { int ar[(TEST)?1:-1]; } while (0); struct B {}; struct B1 : B {}; struct B2 : B {}; struct D : B1, B2 {}; template <class T> T create(); t...
google
chromium
access4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/access4.C
354
utf_8
7ea6af968e54287945d17d2352e36fd6
// { dg-do compile } // PR c++/7347 // Access control for typename during instantiation template <int dim> class Base { protected: typedef int T; }; template <int dim> class D : public Base<dim> { public: typedef typename Base<dim>::T T1; D (T1 t); }; D<2> d(1);
google
chromium
char1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/char1.C
132
utf_8
da6545b2d6ba666e74a516285717c0ed
template <class CharType, CharType line_terminator = 0> class String {}; String<signed char, 255> s; // { dg-warning "overflow" }
google
chromium
static28
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static28.C
215
utf_8
3f4fc4769c54c1f623ff36f774008e54
// PR c++/29518 template< bool C > int assertion_failed( int); template< class > struct N { static bool const okay = true; enum { t = sizeof( assertion_failed<okay>( 0)) }; }; int main() { N<int> n; }
google
chromium
nontype4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype4.C
341
utf_8
f725d274103ab74a7c16aa6087ab401f
// { dg-do compile } // PR c++/13797: ICE invalid nontype template parameter template <int> struct A { typedef A<0> B; // { dg-error "previous declaration" } template <B> struct B {}; // { dg-error "not a valid type|typedef" } }; A<0> a;
google
chromium
sfinae16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/sfinae16.C
697
utf_8
08b0ef5e9cafcaf9c2c1c8a333dce4de
// PR c++/41927 // { dg-options "-std=c++0x -Wall" } // We were getting a spurious ||/&& warning about the enable_if with the // source position of d1. template<typename Tp> struct is_int { static const bool value = true; }; template<bool, typename Tp = void> struct enable_if { }; template<typename Tp> st...
google
chromium
eh1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/eh1.C
59
utf_8
9c78ecb5ca87b2a81cbd9c1796b2c13e
template <class T> void foo() { try {} catch(T e) {} }
google
chromium
sfinae12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/sfinae12.C
1,504
utf_8
52f7c4200182090df187eb901e5e01fe
// DR 339 // // Test of the use of the ternary operator 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> str...
google
chromium
access19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/access19.C
549
utf_8
7e32e40681ed46393d75ffa788dfff19
/* PR c++/29475 The error diagnostic contained "U = U" instead of "U = char" */ /* { dg-do compile } */ template< class T > class explicit_t { public: explicit_t( const T& c ): value( c ) { } operator T&() { return value; } private: template< class U > explicit_t( U t ); /* {...
google
chromium
spec28
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec28.C
180
utf_8
d7344703a351e2d4d50cf9f8383b2013
// PR c++/25854 // Bad diagnostic // { dg-do compile } template<typename> struct A {}; // { dg-error "provided" } template<> struct A<> {}; // { dg-error "wrong number" }
google
chromium
spec5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec5.C
85
utf_8
ac4700345bbf0d5aafda66965305864b
template <int i> struct A; template <> struct A<0> { struct B; }; struct A<0>::B {};
google
chromium
static2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static2.C
153
utf_8
aa3092ca5ce677694305032fa51a9486
class A; template<int A::* P> class B { public: static int A::* const p = P; // { dg-error "" } }; class A { public: int dummy; B<&A::dummy> d; };
google
chromium
mem-partial2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/mem-partial2.C
512
utf_8
ddb3b643353af64559b17335859b3a54
// PR c++/14032 // { dg-do run } template <bool compare> struct outer { template <bool compare_with,bool second> struct inner // unspecialized compare != compare_with { static inline bool test() { return false; } }; template <bool second> // specialization compare == compare_with ...
google
chromium
error43
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error43.C
160
utf_8
d58d76bac4c95f750552f6b080278a6d
// PR c++/29363 template<int> void foo() { throw A(); // { dg-message "declar" } struct A {} a; } template void foo<0>(); // { dg-message "required" }
google
chromium
array22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array22.C
186
utf_8
21e1f968e0203fb50fece892480a4888
// PR c++/48029 template <class T> struct A { }; template <class T, class U> struct B { struct N { }; typedef U u; }; typedef B<int, A<int>(*)[2]> btype; A<int> v1[2]; btype v2;
google
chromium
arg4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/arg4.C
109
utf_8
c306ff6eb2399c47b955c0f32952ba01
// PR c++/23437 template <void (*p)()> struct S { static const int i = 10; }; void g(); int a[S<g>::i];
google
chromium
static9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static9.C
156
utf_8
015388506c66b2ace5fdc5fdfb038d4a
// PR c++/17524 template<typename T> struct A { static const T i = 0; // { dg-error "declared void" "void" } }; A<void> a; // { dg-message "required" }
google
chromium
void3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/void3.C
133
utf_8
30d3ef85884811b1e84895da90d2a724
//PR c++/28637 template<void> struct A {}; // { dg-error "not a valid type" } A<0> a; // { dg-error "type" }
google
chromium
error6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error6.C
193
utf_8
8f931fa8690071fcefc2b1d1d7483bfc
template<int n> struct tento { enum {value = 10*tento<n-1>::value}; }; struct tento<0> { // { dg-error "" } enum {value=1}; }; int main() { if (tento<4>::value != 10000) return -1; }
google
chromium
nontype10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype10.C
246
utf_8
e9af055ac6a0774b7565e0722c861adb
// { dg-do compile } // Contributed by: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> #include <cstddef> template <int T> struct A {}; template <void* T> struct B {}; A<NULL> a; // { dg-warning "NULL" } B<NULL> b; // { dg-error "" }
google
chromium
static5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static5.C
318
utf_8
e5538275a590133055e80d957d76fab1
// { dg-do compile } // PR c++/12932: ICE address of static function as template argument struct Test { static void fun(); }; template <void (*fun)()> void foo () { (*fun)(); } template void foo<Test::fun> ();
google
chromium
static3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static3.C
469
utf_8
7df73f11db0cd12460178945538e192f
template <class data> class foo { public: static const int a; static const int b; static const int c; static const int d; }; template <class data> const int foo<data>::a = 1; template <class data> const int foo<data>::b = a; template <class data> const int foo<data>::c = b; template <class data> const int foo<...
google
chromium
class3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/class3.C
81
utf_8
478acfe8108cf9d573a8ff95d3dcf91d
// PR c++/25634 template<int> template<int> struct A; // { dg-error "too many" }
google
chromium
crash77
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash77.C
166
utf_8
f24a600e43d06d3cdd9d3eca14cb1abc
// PR c++/34603 template<typename> struct A; // { dg-error "declaration" } template<typename T> A<T>::A( struct A; // { dg-error "definition|expected|incomplete" }
google
chromium
repo7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/repo7.C
368
utf_8
c0415f4bc7bd91e896315de4d85326fe
// PR c++/34340 // { dg-options "-frepo" } // { dg-final { cleanup-repo-files } } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } struct A { int a; }; template <typename T> struct D { static const A b; }; template<typename T> const A D<T>::b = { 2 }; template class...
google
chromium
crash32
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash32.C
204
utf_8
b17b6f8116ba3725c4d80f6dcdfb1f41
// PR c++/19667 struct integral_constant { }; template<typename _Tp> struct is_function : public integral_constant { }; template<> struct is_function : public integral_constant { }; // { dg-error "" }
google
chromium
explicit7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/explicit7.C
312
utf_8
9710691c4af4b589e4831b829d124e2e
// PR c++/22263 // { dg-do link } template <class T> struct S { T foo (); T bar (); }; template <class T> T S<T>::foo () { return bar (); } template struct S<int>; template <class T> T S<T>::bar () { return T (); } #if !__GXX_WEAK__ template int S<int>::bar (); #endif int main () { return S<int>().foo (); }
google
chromium
using3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/using3.C
607
utf_8
2131f7be9d523457118116995b368d74
// { dg-do run } // PR 9447. Using decls in template classes. template <class T> struct Foo { int i (int) {return 1;} }; struct Baz { int k (int) {return 2;} }; template <class T> struct Bar : public Foo<T> , Baz { using Foo<T>::i; using Baz::k; int i (float) {return 3;} int k (float) {return 3;} int ...
google
chromium
error11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error11.C
109
utf_8
92cc57f022fdde0a0e1d5b1eb3c129b3
// PR c++/12132 inline template <int> void foo () {} // { dg-error "<" } void abort (); // { dg-error ";" }
google
chromium
ptrmem7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ptrmem7.C
447
utf_8
71bf635a4274ef3549d8487b25847e94
// { dg-do compile } // Origin: <togawa at acm dot arg> // c++/2094: unsupported 'ptrmem_cst' in type unification struct R { int i; }; struct S { int i; int j; }; struct S2 : S {}; template<int S::*p, typename> struct X { X (); template<typename U> X(const X<p,U> &); }; X<&S::i,S> x = X<&S::i,S>(); X<&S...
google
chromium
overload8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/overload8.C
90
utf_8
cb3fd3ad47dd95cf7f0463be80d0a9b3
// PR c++/24915 struct A { template<int> void foo() {} template<int> int foo() {} };
google
chromium
memfriend9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/memfriend9.C
716
utf_8
6602e9e6cba784386891556ebd44b430
// { dg-do compile } // Nested class of class template as friend template<class T> struct A { struct B { void f(); }; }; 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> { struct B { void f(...
google
chromium
ttp11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp11.C
335
utf_8
7bb81c37796ee57799e21215b653e144
// { dg-do compile } // PR c++/14429: Matching of template template parameter containing // non-type parameter with type that depends on earlier parameter. template <template <typename U, U* p> class T> struct X {}; template <template <typename U, U* p> class T> struct Y { X<T> x; };
google
chromium
ttp12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp12.C
472
utf_8
40c193a789a7cdd7cf2b6550ea810505
// { dg-do compile } // Check the type of non-type parameter in template template parameter // only if it is dependent. template <template <int* p> class T> struct X {}; template <typename U, template <U* p> class T> struct Y { X<T> x; }; template <int* p> struct Z {}; Y<int, Z> y1; Y<char, Z> y2; // { dg-error "m...
google
chromium
nontype8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype8.C
439
utf_8
2db8591db13ac8e8cf2e26468f9d18e3
// { dg-do compile } // Origin: C++ standard, [temp.arg.nontype]/3 template<int* p> class X { }; int a[10]; struct S { int m; static int s; } s; X<&a[2]> x3; // { dg-error "" } address of array element X<&s.m> x4; // { dg-error "" } address of non-static member X<&s.s> x5; ...
google
chromium
array7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/array7.C
175
utf_8
579905889abdf110f78879708a88d557
// PR c++/16246 template <typename T> void foo (T, T); template <unsigned N, unsigned M> int bar( const char(&val)[M] ) { foo (N,M); } int i = bar<10>("1234");
google
chromium
static21
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/static21.C
392
utf_8
2f60676fe6640df70e647dc7565eebca
// PR c++/24389 // { dg-additional-sources "static21-a.cc" } // { dg-do link } 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 + ...
google
chromium
error45
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error45.C
346
utf_8
7671645c3f9a57016a5fee9111ddb609
// PR c++/47125 template < bool, typename > struct enable_if {}; template < typename T > struct enable_if< true, T > { typedef T type; }; template < typename T > struct enable_if< true, T >::type f( T x ); // { dg-error "not a class type" } void g( void ) { f< int >( 0 ); // { dg-error "no match" } } // {...
google
chromium
non-dependent10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/non-dependent10.C
345
utf_8
c573cd5de2d4d269cb4df23ea0a36f4d
// { dg-do compile } // Two-phase name lookup for address of member: // Detecting overloading function error during parsing struct S { int f(char); int f(int); }; template<int (S::*p)()> struct X {}; template <class T> struct Foo { X<&S::f> x; // { dg-error "convert|no matches" } };
google
chromium
typedef15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef15.C
390
utf_8
b9875172b6e849d858fc2d69a332444c
// Origin: PR c++/26693 // { dg-do compile } template<class T> struct C0; struct Foo { typedef int TypedefedFoo; typedef C0<Foo> TypedefedC0; }; template<class T> struct C0 { typedef Foo TypedefedFoo; typename T::TypedefedC0::TypedefedFoo m; }; template<class U> struct C1 { typedef C0<Foo> TypedefedC0; }; C0<...
google
chromium
instantiate11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/instantiate11.C
386
utf_8
8095fd8717b385911f23d51f2a4cad60
// PR c++/42608 // { dg-do compile } template <class U, class V> struct A; template <class V> struct A<int, V> { void f (); }; template struct A<int, int>; int main () { A<int, int> a; a.f (); return 0; } // Make sure we get undefined reference error if // A<int, int>::f () isn't instantiated elsewhere. //...
google
chromium
explicit-args3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/explicit-args3.C
193
utf_8
d334f5ab9fec554290ec55f268b9b8bf
// PR c++/37177 template <class T> struct A { }; template <class T> void operator+(T, T); // { dg-error "class or enum" } int main() { operator+<int>; // { dg-error "cannot resolve" } }
google
chromium
arg7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/arg7.C
304
utf_8
9fda611eb6ff85fc5c7bbaaf0b553563
// PR c++/27425, 34274 template<typename T> struct A { template<template<T> class> struct B {}; // { dg-error "void|mismatch|expected" } // { dg-bogus "not supported" "" { target *-*-* } 5 } template<T> struct C; // { dg-error "void" } B<C> b; }; A<void> a; // { dg-message "required" }
google
chromium
incomplete1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/incomplete1.C
533
utf_8
43017cf348a37638085196f74ac68fe3
// { dg-do compile } // Origin: Ivan Godard <igodard at pacbell dot net> // PR c++/17447: Detect parameters of dependent types even in templates struct B; // { dg-error "forward declaration" } template<typename T> struct A { friend A& operator <<(A& a, B b) { return a; } // { dg-error "incomplete" } friend ...
google
chromium
partial12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/partial12.C
681
utf_8
de5b350b4a291d22a6e427de9a0c69fc
// PR c++/46105 template< typename T > struct empty { // support class is like stripped-down enable_if typedef void type; }; template< class T, typename v = void > // v is always void! struct element { typedef typename T::value_type type; }; template< class T > // T in deduced context, T::element_type is SFI...
google
chromium
typedef38
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef38.C
309
utf_8
d24128561e0a5f57f0d65415db34a3ac
// Origin: PR c++/46394 // { dg-options "-std=c++0x" } // { dg-do compile } template<class T> struct S0 { typedef T type; }; template<class... X> struct S1 { typedef int I; }; struct A { template<class...U, class V=typename S1<typename S0<U>::type...>::I> A(U...u); }; int main() { A a(1, 2); }
google
chromium
ttp3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/ttp3.C
745
utf_8
dae42b78445fb03f0f7c80954fe880b4
// { dg-do compile } // PR 5213. We failed to spot that class List was a template, rather // than a non-template or specialization template <class T> class vector { }; class OUTER { public: template <class T> class List { }; vector<class List> data; // { dg-error "invalid|required|ISO C" "" } }; template <cl...
google
chromium
spec26
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec26.C
762
utf_8
db213be2f1542903882424960efec00b
// dg-do run struct A { template<class T> int operator+(T&) { return 1;} }; template<class T> struct B { int operator-(A&) {return 2;} template<typename R> int operator*(R&) {return 3;} }; template <typename T, typename R> int operator-(B<T>, R&) {return 4;} template<class T> int operator+(A&, B<T>&) { return 5...
google
chromium
crash57
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash57.C
254
utf_8
e8689f24f46b2d103e7556f1cd9fe1e3
//PR c++/27397 template<int(> struct A; // { dg-error "token" } template<typename> struct B { template<int(> struct C; // { dg-error "token" } }; A<char> a; // { dg-error "type/value mismatch|constant|declaration" }
google
chromium
defarg4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/defarg4.C
190
utf_8
64d2588370b2c020d9d5828deadfc7dc
// PR c++/14763 struct A { int get() const {} static A *foo(); }; template<bool> struct S { S(unsigned int = A::foo()->get()) ; }; void foo() throw() { S<false> f; }
google
chromium
qualttp21
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualttp21.C
290
utf_8
d7668570c380f7a54655435e409395c9
// { dg-do compile } template <class A> class foo { int _foo; public: foo() {} protected: ~foo() {} // { dg-error "~foo" } }; int main() { foo<int> a; // { dg-error "context" } }
google
chromium
error-recovery2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error-recovery2.C
131
utf_8
b3e2bbd8608c9f9206f9850201803c3c
// PR c++/43621 template <typename T> class A { template <typename> A<T> A<T>::f(); // { dg-error "extra qualification" } };
google
chromium
template-id-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/template-id-2.C
372
utf_8
f649fc7c28d9ba28b0bda4f6c531b3f9
// { dg-do compile } // PR c++/12924 template<typename> struct A {}; template<> struct A<void> { template<typename T> void foo() { A<T> a; a.template foo<int>(); // { dg-error "no member" } } }; void bar() { A<void> a; a.foo<int>(); // { dg-message "required" } }
google
chromium
friend37
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend37.C
194
utf_8
19ae206b65ef32c57066f4c9d603d478
// PR c++/22147 template<typename> struct A; template<typename T> void foo(A<T>* p) { *p; } template<typename> struct A { friend void foo<class X>(A<X>*); }; void bar() { foo<int>(0); }
google
chromium
non-dependent1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/non-dependent1.C
247
utf_8
da1df58fc40e198de8f0c5d88494d89e
//PR c++/8222 // { dg-do run } struct Foo { template <class> void func() {} }; template <class> void Bar(Foo* p) { p->func<int>(); } int main() { Foo c; Bar<int>(&c); }
google
chromium
non-type1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/non-type1.C
911
utf_8
c68d85d18e13eca7b98c51e07b278cf0
// PR c++/4377 template < int I1, int I2 > class unit { public: typedef unit<I1,I2> my_type; 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 >(); } template< int Q1, int ...
google
chromium
error21
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error21.C
244
utf_8
d8c534ccbad9bbbc650685d274b0d2ca
// PR c++/20173 template<typename AT> struct A{ template<typename T> void function(T){} }; template<> template<typename T> void A<int>::function(T){} template<> template<typename T> void A<double>::function(T*){} // { dg-error "match" }
google
chromium
nontype22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/nontype22.C
264
utf_8
5d60f10438f4dc879514632ec85475d3
// PR c++/44629 // The proper mangling is unclear. template<typename T> int cmp1(T a, T b); template<typename T, int (*cmp)(T, T) = cmp1> struct A { }; template <typename T> void f (A<T> &); // { dg-bogus "" "" { xfail *-*-* } } void g() { A<char> a; f(a); }
google
chromium
canon-type-7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/canon-type-7.C
343
utf_8
d4dd1fcb5ba5fa6c770548eb750325c0
// Origin PR c++/39754 // { dg-do compile } struct Foo {}; template<typename> struct A ; template<typename T ,typename = A<T> > struct B { } ; template<class W, class> struct D { typedef W X; A<X (Foo::*) (X)> a ; }; template<class Y> struct E { B<Y (Foo::*) (Y)> b ; }; E<int> e ;
google
chromium
cond4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/cond4.C
244
utf_8
8e0316960b82711ee5f56b8b469d01b1
// PR c++/14369 struct A { }; template<class T> struct X : A { const A* bar() const { return this; } const A& foo() const; }; template<class T> const A& X<T>::foo() const { const A* t = bar(); return *(t ? t : throw 0); }
google
chromium
union2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/union2.C
113
utf_8
c2e897b56a387a0b82db1f4b163a868c
/* PR c++/40557 */ /* { dg-do compile } */ struct A { typedef int X; }; template<int> union B { A::X x; };
google
chromium
const5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/const5.C
197
utf_8
42ba21e587db92d23dbd323c32e26350
// PR c++/49176 // { dg-options -std=c++0x } struct A { static int a(); }; template<int> struct B { static int const b; }; int f() { return B<0>::b; } template<int I> int const B<I>::b=A::a();
google
chromium
lookup6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/lookup6.C
142
utf_8
90ee492e747c2328ed39e4f06ad61d36
struct S { template<typename T> static void g(); }; template<typename T> void f() { return S::template g<T>(); } void g() { f<int>(); }
google
chromium
lookup5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/lookup5.C
230
utf_8
3ab3f4b8b6e13f0c873ee865529608c0
// PR c++/13925 namespace N { template <class T> void f(T); namespace M { class A { friend void f<int>(int); }; } template <class T> void f(T) {} template <> void f<int>(int ) { f<long>(0); } }
google
chromium
friend
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend.C
582
utf_8
6f230782f9a15653eb504597dbf0ad0b
class ostream; extern ostream& cout; template <class T> struct s; template <class T> ostream& operator<<(ostream &o, const typename s<T>::t &x) // { dg-message "note" } { return o; } template <class T> struct s { struct t { friend ostream& operator<<<T>(ostream&, const typename s<T>::t &); }; t x; }; ...
google
chromium
dependent-name6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/dependent-name6.C
339
utf_8
a2d8358dfed423c4946dd5255b3cc157
// PR c++/26261 // { dg-final { scan-assembler "_ZN1YIiE1fIiEE1XILi1EEv" } } template <int dim> class X {}; template <class T> struct Y { static const unsigned int dim = 1; template <class U> X<Y<T>::dim> f(); }; template <class T> template <class U> X<Y<T>::dim> Y<T>::f() { return X<dim>(); } int main() { Y<...
google
chromium
explicit3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/explicit3.C
499
utf_8
3b0207ca15de6320946949f657d95b9a
// { dg-do compile } // Failed to spot specialization using a template-id expr template <int n> class A {}; template <int m> class R {}; template <int n, int x> struct Trait { enum {m = n}; }; template <int n, int x> R<Trait<n,x>::m> f(A<x>); template <> R<Trait<1,1>::m> f<1>(A<1>) {return R<1>();} void Baz () { R<Tr...
google
chromium
lookup3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/lookup3.C
196
utf_8
0287287b4b02081228b1429a9526248d
// PR c++/12397 struct foo { }; template <typename T> struct bar { bar(){} int i; bar (const bar<T>& foo) : i (foo.i) {} }; int main() { bar<int> b1; bar<int> b2(b1); }
google
chromium
function1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/function1.C
865
utf_8
a5ecff5cba84cd71c83879e1437f0497
// PR c++/38647 // { dg-do compile } // { dg-prune-output "note" } template<const char *, int> struct A {}; const char func[] = "abc"; template<int N> struct A<func, N> {}; // { dg-error "cannot appear|is invalid|not a valid|constant expression" } char a1[1]; A<a1, 0> a; template<const char *, int> struct B {}; temp...
google
chromium
qualified-id3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/qualified-id3.C
440
utf_8
6d37864350adc940f0c6508c544aa7bf
// PR c++/44587 template <const int N> struct A { }; template <class T> struct B { static const int c; // { dg-message "not initialized with a constant expression" } typedef A<B<T>::c> C; // { dg-error "constant expression|template argument" } }; template <class T> const int B<T>::c = sizeof (T); template <const ...
google
chromium
crash58
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash58.C
230
utf_8
d723188e66b53d1b47c72e45d36126b7
//PR 26938 template<int, int = 0> struct A; // { dg-message "previous declaration" } template<int> struct A // { dg-error "template" } { A(); }; A<0> a; // { dg-error "incomplete type" }
google
chromium
memfriend1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/memfriend1.C
635
utf_8
57fc8e37f6a64f03e3bea12e44f46909
// { dg-do compile } // Member function of class template as friend template<class T> struct A { void f(); }; class C { int i; template<class T> friend void A<T>::f(); }; template<class T> struct A<T*> { void f(); }; template<> struct A<char> { void f(); }; template<class T> void A<T>::f() { C c; c.i = 0;...
google
chromium
operator8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/operator8.C
131
utf_8
008f8ee400a759592c959c78c66d11b2
//PR c++/27494 struct A { template<operator+> void foo() {} // { dg-error "identifier|non-function|template arguments" } };
google
chromium
error39
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/error39.C
132
utf_8
20b72e33a910404fc40a48eb851375f6
// PR c++/14912 template <class T, int N=0, int X=1> struct A { }; void foo(void) { A<void> a = 0; // { dg-error "A<void>" } }
google
chromium
crash45
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash45.C
143
utf_8
427cd25234ee759c72800281459c7270
// PR c++/26365 struct A {}; namespace N { template<int> void foo(); } void bar(A *p) { p->N::foo<0>; // { dg-error "not a member" } }
google
chromium
crash100
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash100.C
348
utf_8
71cd4d9bd2cbdcf3dca414dbf7f1b2af
// PR c++/44628 template <typename T> class Temp { int Val; public: operator T&(void) { return Val; } virtual T& operator=(T a ) // { dg-error "overriding" } { Val = a; return Val; } }; class Int : public Temp<int> { public: Int& operator=(int a) // { dg-error "conflicting return type" } {...
google
chromium
dtor3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/dtor3.C
130
utf_8
c46251d092a454420a2658cd0fcc8c15
// PR c++/19762 template<int> struct A { ~A(){} }; // { dg-error "" } template A<>::~A(); // { dg-error "template|declaration" }
google
chromium
friend48
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/friend48.C
121
utf_8
5087337546b38ddcc68287f9759e1504
// PR c++/29020 template<int> struct A { void foo(); }; struct B { template<int N> friend void A<N>::A::foo(); };
google
chromium
init-list
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/init-list.C
295
utf_8
9783cba5cd0e48e50ecc5c42ed1dd282
// { dg-do compile } template<typename T> struct Base { Base(int) { } }; template<typename T> struct Derived : Base<T> { Derived(); }; template<typename T> Derived<T>::Derived() : Base(4) { } // { dg-error "have any field" "" }
google
chromium
type1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/type1.C
221
utf_8
d7a01e97d99f1b74700f8e173b381e7e
// Test for helpful error messages on invalid nested-name-specifiers. struct A { template <class T> struct B { static int c; }; }; int A::B::c; // { dg-error "parameters" } int A::C::d; // { dg-error "declared" }
google
chromium
op1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/op1.C
216
utf_8
585425c7c24e913a9ccd6656bd75e83e
template <class T> struct X { typedef int type; }; template <class T> struct O { struct I { operator typename X<T>::type (); }; }; template <class T> O<T>::I::operator typename X<T>::type () {}
google
chromium
access18
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/access18.C
391
utf_8
913e0afca93ad603d70132a5830f11c1
// DR 401 class X { typedef int a; // { dg-error "private" } static const int b = 5; // { dg-error "private" } template <typename> struct c; // { dg-error "private" } }; template <typename = X::a> // { dg-error "context" } struct A; template <int = X::b> // { dg-error "context" } struct B; template <templat...
google
chromium
crash97
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/crash97.C
267
utf_8
4fbad0efac9328e3b0dab3da811770e7
// PR c++/34272 template<typename> struct A {}; template<typename> struct A<int> // { dg-error "not used|template\\-parameter" } { template<int> void foo(); }; void bar() { A<int> a; // { dg-error "incomplete type" } a.foo<0>(); // { dg-error "expected" } }
google
chromium
spec11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/spec11.C
380
utf_8
641e90d3e3434fc264671bb60336331b
// { dg-do compile } // PR c++/13635: ICE explicit specialization of member function template template <class foo> class bar { public: template <class baz> int func(baz *x); }; template <> template <class baz> int bar<double>::func(baz *x) { return 5;} template <> template <> int bar<double>::func(int *...
google
chromium
typedef2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/template/typedef2.C
164
utf_8
91560e6058fa7ce0edbd4239eb12b810
// PR c++/18155 template<int> typedef struct A; // { dg-warning "'typedef' was ignored" } // { dg-error "" "" { target *-*-* } 3 }