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
android
error39
.C
toolchain/gcc/gcc-4.8.3/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
android
ptrmem8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem8.C
697
utf_8
9d78085e54c695bfed1f05bcd67e42e8
// { dg-do compile } // Origin: <marco dot franzen at bigfoot dot com> // PR c++/10126: Handle ptmf default conversions while matching a template // argument struct B { int I () const; int I (); }; struct D : B {}; template <int (D::*fun)() const> int Get(); // { dg-message "note" } int main () { Get<&B:...
google
android
spec25
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec25.C
198
utf_8
ef8ae4f57ac3ac5d77c3bdca8c7ef5f1
namespace N { template <typename T> struct S { void f() {} // { dg-error "definition" } }; } namespace K { template <> void N::S<char>::f() {} // { dg-error "different namespace" } }
google
android
explicit-args2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/explicit-args2.C
649
utf_8
7da1155f45a6042d3c0c9f0a0717590f
// PR c++/37177 // { dg-options -std=c++0x } #include <typeinfo> namespace N1 { template<class T> bool foo(); } struct S { template <class T> static bool foo(); template <class T> bool bar(); }; template<class T> bool foo(); int main() { (void)(&S::bar<int>); decltype(&S::bar<int>) a; typeid(&S::b...
google
android
koenig2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/koenig2.C
233
utf_8
5e527c865bacdb52386cdb2f216a99d4
namespace nsp_foo { struct A {}; struct foo {}; } namespace nsp_bar { void foo(nsp_foo::A) {} template <class T> void bar(T t) { nsp_bar::foo(t); // line 16 } } int main() { nsp_bar::bar(nsp_foo::A()); }
google
android
qualttp14
.C
toolchain/gcc/gcc-4.8.3/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
android
error27
.C
toolchain/gcc/gcc-4.8.3/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
android
call1
.C
toolchain/gcc/gcc-4.8.3/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
android
ttp21
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ttp21.C
130
utf_8
54aa5e13e0b421f81c0decbd0545680e
// PR c++/28853 // { dg-do compile } template<template<int> class A> int A<0>::i; // { dg-error "template template parameter" }
google
android
offsetof2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/offsetof2.C
174
utf_8
4c88b26d0d4ab5c6ea7cbb37f1f8bbf4
// PR c++/49085 template <class T> struct A // { dg-error "declaration" } { int i, j; int ar[__builtin_offsetof(A,j)]; // { dg-error "incomplete type" } }; A<int> a;
google
android
non-dependent7
.C
toolchain/gcc/gcc-4.8.3/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
android
sizeof6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sizeof6.C
324
utf_8
8d7b68da161169ea74382da5f4a8c8fb
// { dg-do compile } // Contributed by Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // PR c++/13683: bogus warning about passing non-PODs through ellipsis struct B {}; struct NonPOD : B {}; struct A { static int check(...); static NonPOD GetNonPOD(void); enum { value = sizeof(A::check(A::GetNonPOD())) };...
google
android
qualttp1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/qualttp1.C
324
utf_8
b21ab1ce79ce2d2e11762d15de7d8e95
// { dg-do compile } struct A { template <class T> class B {}; }; template <class T> struct X { }; template <class T> struct C { X<T::template B> x; // { dg-error "type" } }; int main() { C<A> c; }
google
android
spec35
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec35.C
881
utf_8
cd8f83c943abc866c1492c441fa0144d
// PR c++/31923 // C++ DR 605 -- "...the linkage of an explicit specialization must be that of // the template." // { dg-require-weak "" } // { dg-do compile { target i?86-*-* x86_64-*-* } } template<class T> static void f1 (T) { } // { dg-final { scan-assembler-not ".glob(a|)l\[\t \]*_?_Z2f1IfEvT_" } } template<> v...
google
android
crash109
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash109.C
119
utf_8
b3167df4bc44e634fce27a27e383e9a4
// PR c++/51328 template<typename T> struct A { void foo(A<T::~T>); // { dg-error "invalid use of destructor" } };
google
android
recurse3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/recurse3.C
207
utf_8
a5be65b82f1aef08aa55aeaa5da0c8d4
// PR c++/44609 // { dg-options -ftemplate-depth=10 } template<int N> void f() { 0 = 0; // { dg-error "lvalue required" } f<N+1>(); // { dg-bogus "instantiation depth" } } int main() { f<0>(); }
google
android
crash94
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash94.C
390
utf_8
ea031f0eed2506b6add80fa9a5f38b85
// Origin: PR c++/42697 // { dg-do compile } template<class Value_t> class fparser { template<bool Option> void eval2(Value_t r[2]); public: void evaltest(); }; template<> template<bool Option> void fparser<int>::eval2(int r[2]) { struct ObjType {}; } template<class Value_t> void fparser<Value_t>::e...
google
android
friend24
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend24.C
408
utf_8
c81920c34b3ea8295fc494118d9e89af
// { dg-do compile } // PR c++/495: Fail to locate primary class template that is // injected by friend declaration. template <int N> struct X { template <int dim> friend struct Y; }; X<2> x; template <int dim> struct Y { void f (Y); void g (Y); }; template <int dim> void Y<dim>::f (Y) { } template <int dim> void...
google
android
overload12
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/overload12.C
571
utf_8
f1c7ecb7e178c68814982e97bdc5ecf1
// { dg-do compile } struct S {int x; int y;}; template<typename T> int foo(T a, T b) {return a + b;} // { dg-message "template" } template<typename T, typename T2> int foo(T a, T2& b, T2 c) {return a + b;} // { dg-message "template" } int foo(char*, S&); // { dg-message "foo" } // { dg-message "candidate expects 2 a...
google
android
operator9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/operator9.C
280
utf_8
531b9dd05d20385dc30e947b3b6af083
//PR c++/27670 template<operator+> void foo(); // { dg-error "before|non-function|template" } void bar() { foo(); // { dg-error "no matching function" } // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 7 } }
google
android
inherit7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/inherit7.C
242
utf_8
512af16a8d227668dfd611f18408ff34
// Origin: PR c++/48656 // { dg-options "-std=c++0x" } // { dg-do compile } struct A { int f(); int f(int); }; template <typename> struct B : A { }; template <typename T> struct C : B<T> { void g() { A::f(); } };
google
android
crash16
.C
toolchain/gcc/gcc-4.8.3/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
android
non-dependent3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/non-dependent3.C
312
utf_8
9c0fc4f566e5de8ff0339df3c3ef274d
//PR c++/11071 // Used to ICE template <bool b> struct X { template <typename T> static int* execute(T* x) { return x; } }; template <typename T> void foo() { static bool const same = true; X<same>::execute ((int*)0); } template void foo<int> ();
google
android
delete1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/delete1.C
172
utf_8
08e2480f72bcb72f3f0c69f74625bd4c
// PR c++/15890 template < typename T > void operator delete ( void* raw ) { // { dg-error "" } delete raw; } class A { }; int main() { A* a = new A; delete a; }
google
android
delete2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/delete2.C
300
utf_8
f64b5dcbfa3d3051a358c8d1c1e8a878
// PR c++/58119 template <class T> struct A { operator T*(); template <class U> operator A<U>(); }; template <class T> struct B { operator T*(); template <class U> operator A<U>*(); }; int main() { A<int> a; delete a; B<int> b; delete b; // { dg-error "template|delete" } }
google
android
nested5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nested5.C
223
utf_8
73ab67ac2716db374ac0d80e7ae5b200
// PR c++/33959 template <typename T> struct A { struct C { template <typename U> struct D {}; }; template <typename S> static C::D<S> bar (S const &); }; struct E {}; int main () { E e; A<E>::bar (e); }
google
android
qualttp12
.C
toolchain/gcc/gcc-4.8.3/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
android
ntp1
.C
toolchain/gcc/gcc-4.8.3/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
android
typename2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename2.C
632
utf_8
e157ec339365093c9f152c565a72d172
// { dg-do compile } // { dg-options "" } // PR 5507. Overzealous implicit typename warning template<typename _CharT> class __ctype_abstract_base { typedef int mask; }; template<typename _CharT> class ctype : public __ctype_abstract_base<_CharT> { typedef typename ctype::mask mask; }; template<typename _CharT> clas...
google
android
typedef11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef11.C
453
utf_8
b78c82a7750916aed5380fcb3deb8b10
// Origin: PR c++/26693 // { dg-do compile } class Alpha { typedef int X; // { dg-error "'typedef int Alpha::X' is private" } }; template<int> class Beta { typedef int Y; // { dg-error "'typedef int Beta<0>::Y' is private" } }; template <int> int bar () { Beta<0>::Y i = 0; // { dg-error "within this context" }...
google
android
repo4
.C
toolchain/gcc/gcc-4.8.3/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
android
sfinae1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae1.C
484
utf_8
d4a6fe33f1456d026d068d25f316aa9c
// PR c++/14337 template <bool> struct Constraint; template <> struct Constraint<true> { typedef int Result; }; template <typename T> struct IsInt { static const bool value = false; }; template <> struct IsInt<int> { static const bool value = true; }; template <typename T> typename Constraint<IsI...
google
android
explicit7
.C
toolchain/gcc/gcc-4.8.3/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
android
spec5
.C
toolchain/gcc/gcc-4.8.3/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
android
static17
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static17.C
225
utf_8
a65d6e5ddc2f69a204f701eb15bc324b
// PR c++/23896 template <int> struct X {}; template <typename T> struct length { static const int value = 2; }; template <typename T> void foo () { sizeof(X<length<T>::value>); } template void foo<int>();
google
android
injected1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/injected1.C
679
utf_8
59eb525ce48c5e31b50c37c8d6c5f08e
// PR c++/13950, DR 176 template <class T> struct Base { }; // { dg-message "" } 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
android
complit1
.C
toolchain/gcc/gcc-4.8.3/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
android
sizeof5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sizeof5.C
201
utf_8
3732e9c01b98ba779d2beb4a94b1f1a4
// PR c++/9907 // sizeof(foo()) was not considered constant. template <unsigned n> struct bar {}; int foo(); template <class T> void baz() { bar<sizeof(foo())> b; }
google
android
debug1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/debug1.C
305
utf_8
884d79169a3e45dac3ed1c397aba8ac9
// PR c++/40274 // { dg-options "-g" } template <class T> struct valuelist_types { struct null { }; template <T V, class next=null> struct list { }; }; template <unsigned D> void foo() { typename valuelist_types<unsigned>::template list<D> v; } void bar() { valuelist_types<unsigned>::list<2> v; }
google
android
repo8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/repo8.C
347
utf_8
7aaeeff16027161d626d21273f9ac79c
// 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 }; const A *x = ...
google
android
crash21
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash21.C
915
utf_8
e11ee09376a4af9fd0b4e8a0131f1ad5
// { dg-do compile } // PR c++/16706: Dependent type calculation during access checking template <typename> struct B { B() throw() {} struct S { }; static int i; typedef unsigned short int dummy; }; template <typename _Tp> struct allocator: B<_Tp> { template<typename _Tp1> struct rebind ...
google
android
error11
.C
toolchain/gcc/gcc-4.8.3/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
android
nontype11
.C
toolchain/gcc/gcc-4.8.3/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
android
friend19
.C
toolchain/gcc/gcc-4.8.3/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
android
redecl3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/redecl3.C
221
utf_8
49436cd5609a16d69d797b84c7f00598
// PR c++/19980 // { dg-do compile } int foo; // { dg-error "previous declaration" } template<int> void foo() {} // { dg-error "redeclared" }
google
android
defarg12
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/defarg12.C
161
utf_8
7c114463066844468387ccd37081c2dd
// PR c++/35828 // { dg-options "-std=c++0x" } template < typename > struct A ; template < template < typename > class = A > void test () { test (); }
google
android
fn-ptr2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/fn-ptr2.C
369
utf_8
bf4059583f0cb76eb21c8462cd632142
// PR c++/56095 int *a(void) { return 0; } typedef void voidfn(void); template <voidfn* b> void z1(void) {} template <voidfn& b> void z2(void) {} int main() { z1<(voidfn*)a>(); // { dg-error "" } z1<reinterpret_cast<voidfn*>(a)>(); // { dg-error "" } z2<(voidfn&)a>(); // { dg-error "" } z2<reint...
google
android
error-recovery1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error-recovery1.C
179
utf_8
96f7108f863832f018e00d40ac665c3e
// PR c++/43076 struct S; template < typename > struct T { template < typename > template < bool > struct T < S > // { dg-error "" } { void f () { // { dg-error "" }
google
android
sfinae18
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae18.C
233
utf_8
c69bb3273ce27c4b44754551d50caaf4
// PR c++/41468 typedef int Ft(int); struct A { operator Ft*(); }; struct B { operator Ft*(); }; struct C : A, B { }; template<typename C> void f(int (*a)[sizeof(C()(0))]); template<typename C> void f(...); int main() { f<C>(0); }
google
android
overload1
.C
toolchain/gcc/gcc-4.8.3/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
android
template-id-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/template-id-2.C
369
utf_8
ecf0de18eacd09d8644abc4030d2c8f0
// { 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 "member" } } }; void bar() { A<void> a; a.foo<int>(); // { dg-message "required" } }
google
android
char1
.C
toolchain/gcc/gcc-4.8.3/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
android
crash3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash3.C
94
utf_8
18fc9fd079fbcb8ff4e2ad941df67718
struct S { }; extern S i[]; void g (S*); template <typename T> void f () { g (&i[2]); }
google
android
using18
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using18.C
517
utf_8
cfc21cabe74fa837433fc899f5f5211c
// PR c++/23211 // { dg-do compile } template<class T> struct foo { typedef int jtype; struct bar { using typename foo<T>::jtype; // { dg-error "not a base type" } using foo<T>::jtype; // { dg-error "not a base type" } }; }; template <class T> struct A : T { using T::i; using typename T::typ...
google
android
nested3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nested3.C
457
utf_8
ef7f36711851ed451f4f826a28d9fadd
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
android
qualttp3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/qualttp3.C
392
utf_8
91db5b2e9413146a0519b8347dce2dea
// { dg-do compile } struct A { template <class T, class U> class B {}; }; template <template <class> class TT> struct X { TT<int> y; }; template <class T> struct C { X<T::template B> x; // { dg-error "type" } }; int main() { C<A> c; // { dg-message "required" } }
google
android
ptrmem22
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem22.C
597
utf_8
1deaba7f1445a234a33b8d445f9ce048
// PR c++/44778 enum Healpix_Ordering_Scheme { RING, NEST }; class Healpix_Base { protected: Healpix_Ordering_Scheme scheme_; int nest2ring (int pix) const; int ring2nest (int pix) const; typedef int (Healpix_Base::*swapfunc)(int pix) const; }; template<typename T> class Healpix_Map: public He...
google
android
enum4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/enum4.C
118
utf_8
118d8ffd607a579db3ddbc9662179566
// PR c++/18020 template <typename> struct bar { enum { e1 = 1, e2 = ~e1 }; }; template struct bar<int>;
google
android
ttp16
.C
toolchain/gcc/gcc-4.8.3/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
android
friend34
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend34.C
290
utf_8
861190a2944f470305adf84080e394bd
// { dg-do compile } // PR c++/9783: Forward declaration of class in template. template <typename T> struct C { void foo (struct X *); }; struct X {}; template <typename T> void C<T>::foo(struct X *) {}
google
android
memfriend11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memfriend11.C
966
utf_8
63a099d4fd981493045dce1eefbf9723
// { dg-do compile } // Nested class template of class template as friend template<class T> struct A { template <T t> struct B { void f(); }; }; class C { int i; template<class T> template <T t> friend struct A<T>::B; }; template<class T> struct A<T*> { template <T* t> struct B { void f(); }; };...
google
android
pr35240
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pr35240.C
142
utf_8
8b412f982420deb1ea42c0e8ebcbb0b4
// PR c++/35240 // { dg-do compile } template<int> struct A {}; template<int N> A<sizeof(new int[N][N])> foo(); void bar() { foo<1>(); }
google
android
ttp26
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ttp26.C
209
utf_8
441677b54d35c8c2843c3ae2399b893b
// PR c++/34052 template<typename T = int, typename U> class C; // { dg-error "no default argument" } template<template<typename T = int, typename U> class C> struct X; // { dg-error "no default argument" }
google
android
repo3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/repo3.C
324
utf_8
8a2e51baf8c1d282bb93044b215b3c77
// { dg-options "-frepo -DF='a'" } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } template <typename A, typename B> void f () {} template <typename A, typename B> void g () { f<int,int>(); } int main () { g<int,int>(); } char c = F; // { dg-final { cleanup-repo-files ...
google
android
spec9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec9.C
414
utf_8
03e26c658592047cdea1d686aa9cfacf
// { dg-do compile } // PR c++/10956: Incorrect template substitution for member template // specialization inside template class. template <int> struct C { template<typename T> void pre_add(T); }; template<> template<typename T> void C<32>::pre_add(T) { T pre; } int main() { C<32>().pre_add<int>(1); }
google
android
memfriend9
.C
toolchain/gcc/gcc-4.8.3/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
android
typedef34
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef34.C
564
utf_8
b2cb2daaa093a2320aa6fa022b544e0b
// Origin PR c++/45200 // { dg-do compile } template<typename T> struct remove_reference { typedef T type; }; template<typename TestType> struct forward_as_lref { }; template<typename Seq, typename N> struct apply1 { typedef typename remove_reference<Seq>::type seq; typedef forward_as_lref<typename seq::seq_ty...
google
android
crash13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash13.C
400
utf_8
2fcd941d4dd7debb10ded9602271ab54
// { dg-do compile } // PR c++/11076: ICE for invalid access declaration containing typename. template<typename, typename T=void> struct A { typedef A<T,T> B; }; template <typename T> struct C { typedef typename A<T>::B X; X::Y; // { dg-error "not a base type" } // { dg-warning "deprecated" "" { target *-...
google
android
lvalue1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/lvalue1.C
621
utf_8
c0214387b51fcbd1778447a0a4a88720
// PR c++/38877 template<class _T1, class _T2> struct pair { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; pair () : first(), second() { } pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } }; template<class _T1, class _T2> inline pair<_T1, _T2> make_pair(_T1 ...
google
android
static16
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static16.C
533
utf_8
ad55298cbb7ecb4c0c032a17f174564f
// PR c++/23691 namespace std { class type_info { bool operator==(const type_info& __arg) const; }; } template <class T, T val> struct integral_constant { static const T value = val; }; template< typename T > struct is_integral : integral_constant<bool,false> {}; template <bool B> struct enable_if_c {}; te...
google
android
typename20
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename20.C
138
utf_8
9e947348c80b5b375430f354424dbea6
// PR c++/56543 template <typename> struct S; template <typename T> struct U { typedef typename S <T>::template V <> W; S <W> x; };
google
android
koenig5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/koenig5.C
524
utf_8
02dae2280971fe5ff910e6472b7a407a
// { dg-do compile } // Contributed by David Abrahams <dave at boost-consulting dot com> // PR c++/14143: Koenig lookup should only look into template arguments only // if the argument is a template-id. namespace fu { template <class T> struct bar { struct baz {}; }; } namespace axe { struct handle ...
google
android
error45
.C
toolchain/gcc/gcc-4.8.3/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
android
partial-specialization
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/partial-specialization.C
295
utf_8
e187a317d102d915368fe357726202ba
// { dg-do compile } struct B { int i; }; template <class _T, class _M, _M _T::* _V> struct A; template <class _T, int _T::* _V> struct A<_T, int, _V> { }; int main() { A<B, int, & B::i> a; }
google
android
error42
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error42.C
375
utf_8
0f72e7f5b78f19b4c40b2fd681e5db21
// PR c++/40372 // { dg-do compile } template <int> struct A { int i; // { dg-error "invalid use of non-static data member" } friend void foo () { int x[i]; // { dg-error "from this location" } } }; struct B { int j; // { dg-error "invalid use of non-static data member" } friend int bar () { ...
google
android
new9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/new9.C
223
utf_8
d9f77d8b87ad7fd06a4f1856e8f33024
// PR c++/46277 class ggRGBE { public: ggRGBE(); }; template <class T> class ggIO { void readbody(int); ggRGBE *scanline; }; template <class T> void ggIO<T>::readbody(int width) { scanline = new ggRGBE[width]; }
google
android
explicit6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/explicit6.C
297
utf_8
0f1992cf38a7f4a3d4febc06bbe2dc39
// Bug 19895: ICE on invalid struct A; template A<>::A(); // { dg-error "(not a template)|(explicit qualification)" "" }
google
android
friend35
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend35.C
347
utf_8
e1e2f22ab1205ab9d092f2b388d3e071
// { dg-do compile } // PR c++/4403: Incorrect friend class chosen during instantiation. template <typename T> struct A { struct F; }; template <typename T> struct B : A<T> { friend struct F; private: int priv; }; struct F { void func(void) { B<int> b; b.priv = 0; } };
google
android
memfriend7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memfriend7.C
2,480
utf_8
10bc6d2f48ce4d0b74af144a4996ddfa
// { dg-do compile } // Member function of class template as friend // Erroneous case: mismatch during specialization template <class T> struct A { template <class U> void f(U); void g(); void h(); void i(int); template <T t> void j(); }; class C { int ii; // { dg-error "private" } template <class U> t...
google
android
error24
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error24.C
113
utf_8
6c54776e760954055280860b689859b0
// PR c++/30863 template <typename T> struct s {}; void f() { unsigned s<int> x; // { dg-error "invalid" } }
google
android
crash6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash6.C
199
utf_8
503d2ceca1151ace69073bc94b2e3181
template <class> struct A { static const int n = 1; } ; template <int> struct B; template <class S> struct restype_order { static const int s = A<S>::n; typedef typename B<(s > 0)>::t t; };
google
android
access16
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/access16.C
214
utf_8
2f37ed40bca28851af33f3bafa4181d9
// PR c++/23842 struct S; extern S *p; template <class T> int f(T*, int y = ((T*)p)->x) { return y; } struct S { private: int x; template <class U> friend int f(U*, int); }; int g() { return f(p); }
google
android
qualified-id2
.C
toolchain/gcc/gcc-4.8.3/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
android
error16
.C
toolchain/gcc/gcc-4.8.3/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
android
vla1
.C
toolchain/gcc/gcc-4.8.3/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
android
type2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/type2.C
346
utf_8
7bd261d29e895f70198d2995a62cbd35
// { dg-do compile } // PR c++/8442 // Type template parameter incorrectly treated as template template // parameter. template <typename T> struct A {}; template <typename T> struct B { template <typename U> struct C {}; template <typename U> A<C<U> > foo(U); }; B<void> b;
google
android
pseudodtor4
.C
toolchain/gcc/gcc-4.8.3/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
android
sfinae15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae15.C
342
utf_8
dec4c005e2519f91c25afec0479ecb02
// PR c++/40944 // { dg-options -std=c++0x } // { dg-do run } template<typename T> struct make { static T&& it(); }; void (*pf)(int&) = 0; template< typename T > int bar(T const& x, decltype( pf(make<T const&>::it()) )* = 0 // SFINAE! ) { return 1; } int bar(...) { return 0; } int main() { ...
google
android
sfinae8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae8.C
7,169
utf_8
6f91239bd167bb9f6b68f4d27c340176
// DR 339 // // Test of the use of various boolean binary 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<typ...
google
android
error26
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error26.C
148
utf_8
4193d6f584da90f2fe4c2e4cc8ef6c43
// PR c++/32112 template<typename> struct A; template<typename T> void foo (A<&T::template i>); // { dg-error "T:: ?template i|mismatch|& T::i" }
google
android
access9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/access9.C
401
utf_8
7834be58b513cdde90c14c885e21ae63
// { dg-do compile } // Template instantiate during deferred access check template <void (*)(int)> struct C { typedef int Y; }; template <class T> void f(typename T::X) { } class A { typedef int X; template <class T> friend void f(typename T::X); }; C<&f<A> >::Y g(int);
google
android
dependent-name2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/dependent-name2.C
359
utf_8
18d61b100652dfe4816b8b9c6cefa923
// { dg-do compile } // PR 10530. Thought a type was dependent. template <typename T> struct Foo { struct Inner { typedef int type; }; }; template <typename A> struct Bar { typedef typename Foo<int>::Inner::type type; };
google
android
crash104
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash104.C
394
utf_8
1225a54926913e691b51137aef8b5d33
// PR c++/46046 template <class T> struct foo { template <class U, class V = void> struct type {}; template <class V> struct type< typename T::template some_type<int>, V > {}; }; template <class T> class bar {}; int main() { typedef foo<bar<i...
google
android
new5
.C
toolchain/gcc/gcc-4.8.3/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
android
inherit8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/inherit8.C
215
utf_8
25ec4783042b53fc8562540bbe248d82
// PR c++/52685 template <typename T> struct A { template <typename U> struct B : public A <B<U> > // { dg-error "declaration" } { struct C : public B<U> // { dg-error "incomplete" } { }; }; };
google
android
crash73
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash73.C
184
utf_8
b6d335f5ace93b3d4a0fd5d2614a2df2
// PR c++/34100 // { dg-do compile } template<typename T> struct A { typedef typename T::X Y __attribute__((vector_size(8))); // { dg-error "is not a class, struct" } }; A<int> a;
google
android
ttp4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ttp4.C
334
utf_8
ab6711e26bfa413d472fc55475e7cc75
// { dg-do compile } // PR c++/6723 // ICE when default template argument contains instantiation of // template template parameter. template <typename A, typename B, template <typename,typename> class Predicate, bool _matches=Predicate<A,B>::answer> struct helper { };
google
android
member4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/member4.C
582
utf_8
7f0db13593e12c1671ab63412653ea6c
// { dg-do compile } // Contributed by Matty T. <mattyt-bugzilla at tpg dot com dot au> // PR c++/13813 [DR206]: Check semantic constraints of members of // non-dependent type at instantiation time. // DR206 explains that this is ill-formed, no diagnostic required. We emit // a diagnostic instead. class E; templ...
google
android
crash26
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash26.C
240
utf_8
c422942e29cb019f6814e83fa47ae512
// { dg-do compile } // PR c++/18471: ICE redeclaration of typedef as class template typedef int X; // { dg-message "previous" } template<X> struct X {}; // { dg-error "typedef-name" }
google
android
using6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using6.C
168
utf_8
6bc8a704452336d9d0ee978fef2a7f60
namespace foo { template<typename T> struct A {}; } namespace bar { template<typename T> struct A {}; } namespace foo { using bar::A; // { dg-error "" } }