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
unify6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/unify6.C
599
utf_8
64a0956716b0f07d4c38edfd9b83783a
void Baz (); template <typename T> void Foo1 (T *); // #1 template <typename T> void Foo1 (T const *a) {a (1);} // #2 template <typename T> T const *Foo2 (T *); template <typename T> void Foo3 (T *, T const * = 0); // { dg-message "note" } void Bar () { Foo1 (&Baz); // #1 Foo2 (&Baz); Foo3 (&Baz); Foo3 (&Baz, &...
google
android
crash43
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash43.C
212
utf_8
445602937029d55446b2a4e962079812
// PR c++/24687 extern "C" { template<typename _Tp> // { dg-error "C" } struct ___is_pod { enum { __value = (sizeof(__gnu_internal::__test_type<_Tp>(0)))}; // { dg-error "declared|expected" }
google
android
new8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/new8.C
263
utf_8
b24f740838d028187b26372fe5358fca
// PR c++/34336 // { dg-do compile } struct A; template <class T> struct S { T *m; T &operator* () { return *m; } }; struct B { B (const A &); }; template <class T> struct C { C (); S<A> c; }; template <class T> C<T>::C () { B *b = new B (*c); }
google
android
sfinae3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae3.C
334
utf_8
df17c39af3a33df1f3370cca4ca51b18
// PR c++/24671 // { dg-do compile } template<typename> struct A { typedef int X; static const int i = 0; }; template<typename> struct B { B(const B&); typedef typename A<char[A<B>::i]>::X Y; // { dg-error "forbids zero-size array" } template<typename T> B(T, Y); }; B<int> b(0,0); // { dg-message "required...
google
android
vtable2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/vtable2.C
497
utf_8
d55a534d0d8361d48d4f9895d5fb658a
// Use a small template instantiation depth to speed up testing // { dg-options "-ftemplate-depth-5" } // { dg-do compile } // PR c++/6749: Infinite loop generating vtable. template <class T> struct inner {}; template <class T> struct parent { virtual void f() // { dg-error "instantiation depth" } { parent<inn...
google
android
cond2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/cond2.C
207
utf_8
fb5e6068a2c2c7fc1354db6b8fcac37b
// PR c++/11962 // { dg-options "" } template<int X> class c; template<int X, int Y> int test(c<X ? : Y>&); // { dg-error "omitted" } void test(c<2>*c2) { test<0, 2>(*c2); // { dg-message "required" } }
google
android
static22
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static22.C
157
utf_8
bae55093a55e080f11929eea52536a38
// PR c++/26266 template<typename> struct A { static const int i = 1; static const int j = i; static const int k = int(j); int x[k]; }; A<char> a;
google
android
canon-type-13
.C
toolchain/gcc/gcc-4.8.3/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
android
nontype6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nontype6.C
452
utf_8
8d83959dfcae7f4db0064f352d0a81a3
// { dg-do compile } // Origin: <v dot haisman at sh dot cvut dot cz> // PR c++/13957: Improved error message for type in template (when non-type // is expected). template <class T> struct A { typedef int type; }; template <class T> void func(void) { (void)A<T>::type(); // { dg-error "non-type" "non-type" } // ...
google
android
error7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error7.C
145
utf_8
3eacbecd65bcd0b71a23a9e2127f6e27
// PR c++/13314 // { dg-options "-O2" } struct A { template <int> struct B; }; struct A::B {}; // { dg-error "" } A::B<0> b; // { dg-error "" }
google
android
error37
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error37.C
264
utf_8
34ab2aefdfc2ee66c4a1c5d1830304e9
// { dg-do compile } // PR C++/29388 // We used to ICE in is_ancestor because we would use int as the context of foo // but that is invalid. template<int> struct A { typedef int T; void foo(); }; template<int N> void A<N>::T::foo() {} // { dg-error "" }
google
android
explicit5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/explicit5.C
475
utf_8
bfbe469c91f678acc5c06f6a7a92f9c6
// { dg-do compile } // Failed to spot specialization using a template-id expr template <typename n> class A {}; template <int m> class R {}; template <typename n, typename x> struct Trait { enum {m = sizeof (n)}; }; template <typename n, typename x> R<Trait<n,x>::m> f(A<x>); template <> R<Trait<char,char>::m> f<char>(...
google
android
friend25
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend25.C
293
utf_8
39dede1aeda6ca93984f81431de77fb6
// { dg-do compile } // PR c++/12369: ICE for specialization of member function template // as friend in ordinary class. struct A { template<class T> T* make() { return new T(); } }; struct B { friend B* A::make< B >(); // (1) };
google
android
anonunion2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/anonunion2.C
75
utf_8
e24e587208bea5e0c0322cdeb130ec21
template <int i> struct S { S () { union { int a; }; a = 0; } }; S<0> s;
google
android
static8
.C
toolchain/gcc/gcc-4.8.3/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
android
crash20
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash20.C
322
utf_8
7d60f1e42e3a0cb9fb843525c06fc428
// { dg-do compile } // ICE with incompletable type. class INC; template <typename T> class B {}; template<typename T> void Foo (B<T> &); void Foo (INC &); void Baz (INC *p) { Foo (*p); }
google
android
crash50
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash50.C
148
utf_8
b775d6787ef17bc0e7018ea9b737dab4
// PR c++/27398 // { dg-do compile } struct A { template<int> void* foo(; // { dg-error "primary-expression|initialization|static|template" } };
google
android
canon-type-7
.C
toolchain/gcc/gcc-4.8.3/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
android
arg4
.C
toolchain/gcc/gcc-4.8.3/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
android
crash114
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash114.C
100
utf_8
9cf3fd890329936ea0594b310d9a64c1
// PR c++/34892 template<int=..., int=0> struct A {}; // { dg-error "expected primary" } A<0> a;
google
android
scope1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/scope1.C
126
utf_8
b8b893e1844c502297d1e4e9591779ef
// PR 8327 template <class T> class X { static const int a = 5; static T b[a]; }; template <class T> T X<T>::b[X::a];
google
android
using28
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using28.C
275
utf_8
cb0bcba86115588eec939f8284e3cf91
// PR c++/37140 struct C { static const int block_size = 1; }; template <typename T> struct A { typedef C type; }; template <typename T> struct B : public A<T> { using typename A<T>::type; static const int block_size = type::block_size; }; template class B<int>;
google
android
typedef28
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef28.C
476
utf_8
92286e7865372a4b9fb799f96e02fe6a
// Origin: PR c++/42820 // { dg-do compile } template <class T> struct vector{}; struct Traits{struct Primitive{struct Id{};};}; template <class Tree, class Polyhedron> struct Tree_vs_naive { typedef typename Tree::Primitive Primitive; void f() const { typedef vector<typename Primitive::Id> Id_vector; } ...
google
android
asm1
.C
toolchain/gcc/gcc-4.8.3/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
android
nontype3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nontype3.C
1,056
utf_8
2c3d3cb13e4af8be22483a8bb60a13d2
// { dg-do compile } // { dg-options -std=c++98 } // Origin: <drow at gcc dot gnu dot org>, // <giovannibajo at gcc dot gnu dot org> // c++/13243: Template parameters of non integral or enumeration type can't be // used for integral constant expressions. ADDR_EXPR and INDIRECT_REF are // invalid too. templat...
google
android
typedef19
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef19.C
340
utf_8
ec20f420bcfc33beb8df2d77cdb4fbc2
// Origin PR c++/40007 // { dg-do compile } class A { typedef int mytype; // { dg-error "'typedef int A::mytype' is private" } }; template <class T> class B : public A { }; template<class T> class B<T*> : public A { mytype mem; // { dg-error "within this context" } }; B<int*> b;
google
android
pr23510
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pr23510.C
576
utf_8
2508212bf0488ba173ec772a114e4626
// { dg-do compile } // { dg-options "-ftemplate-depth-15" } template<unsigned int nFactor> struct Factorial { enum { nValue = nFactor * Factorial<nFactor - 1>::nValue }; // { dg-error "depth exceeds maximum" "exceeds" } // { dg-message "recursively required" "recurse" { target *-*-* } 6 } // { dg-error "incomp...
google
android
dtor5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/dtor5.C
264
utf_8
6df398ccb1fe455e5493303db41ea421
// PR c++/23287 template <class T> struct A { int i; ~A(); }; template <class T> void f(A<T> *ap) { ap->~A(); } template <class T> void g(A<T> *ap) { ap->~B(); // { dg-error "destructor name" } } int main() { f(new A<int>); g(new A<int>); }
google
android
friend11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend11.C
341
utf_8
c1eab5b806b63596b0fa26a471273823
/* PR c++/53 */ /* { dg-do compile } */ template <class T> struct A { template <class U> class B; // Did not compile with gcc-2.95.2 (linux i686) :-( template <class S> template <class U> friend class A<S>::B; }; template <class S> template <class U> class A<S>::B { }; int main(){ A<double>::B<double>...
google
android
ref6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ref6.C
240
utf_8
be5ada7fe947b5c46a81b039d0695560
// PR c++/53816 template <typename T> struct S { int v () const; }; template <typename T> struct V : public S<T> {}; struct U { V<int> v; template<typename T> struct W { W (U const &x) { V<int> const &v = x.v; v.v(); } }; };
google
android
inline1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/inline1.C
484
utf_8
e11043be34a3a4669d6240f263aa30d2
// { dg-do compile } // { dg-options "-fno-default-inline -O0" } // { dg-final { scan-assembler-not "\n_?_ZN1X3FooIiEEvT_\[: \t\n\]" } } // PR 10047. bogus warning. struct X { template <typename T> static void Foo (T) {} }; extern template void X::Foo<int> (int); // extern, so don't emit it int main () { X::Foo (...
google
android
array16
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/array16.C
168
utf_8
53d279c2d582bce6b0ed40786c57eb25
// PR c++/28886 template<typename> struct A; template<typename T, int N> struct A<T[N]> {}; template<typename T, int N> struct A<const T[N]> {}; A<const int[1]> a;
google
android
typedef13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef13.C
333
utf_8
4cc56d549324ccc8454d729e8ff28a06
// Origin: PR c++/26693 // { dg-do compile } class A { typedef int mytype; // { dg-error "typedef int A::mytype' is private" } }; template <class T> class B : public A { mytype mem; // { dg-error "within this context" } }; B<int> b; // { dg-message "required from here" }
google
android
pr29633
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pr29633.C
360
utf_8
ddd54fa2d302cf8f37c4512b75025445
// PR c++/29633 template <typename T> struct Class1 { void testfn1(void); }; template <typename T> class Class2 { public: void testfn2(void) { Class1<T> * tc_a; do { int x = 0; } while (tc_a && tc_a->testfn1); // { dg-error "invalid use of member" } } }; int main(void) { Class2<i...
google
android
crash54
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash54.C
129
utf_8
dc113f6f407f869c16ea1bfd3923f2c0
//PR c++/28269 template<int> struct A; struct __attribute__((unused)) A<0<; // { dg-error "template argument|unqualified-id" }
google
android
unify8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/unify8.C
479
utf_8
d04f9d4f8d36c0325245fb8a7df506ad
// { dg-do link } // PR 21799: deduction of cvqualifiers on member functions was wrong template <class T> void f (T &, void (T::*)() ); template <class T> void f (const T &, void (T::*)() const) {} struct X { void g() const {} }; const X *x; int main () { f (*x, &X::g); }
google
android
qualttp17
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/qualttp17.C
455
utf_8
f6386fff12139cd2f16e3ef57915da43
// { dg-do compile } // { dg-options "-fno-inline -fabi-version=1 -Wno-abi" } struct A { template <class T> class B {}; }; template <template <class> class TT> struct X { }; template <class T> void f(X<T::template B>) { } int main() { X<A::B> x; f<A>(x); } // { dg-final { scan-assembler "\n_?_Z1fI1AEv1XIN1T1BEE\[: \...
google
android
crash68
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash68.C
328
utf_8
c1f00d9dd86a49d2de34225f9a691ce2
// PR c++/33035 template<class A> struct a { template<class B> struct b { template<class C> void f() { struct g { ~g() {} }; } ...
google
android
error9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error9.C
85
utf_8
6c82c4d5cc4e1f6f70e1b41aa6299b35
// PR c++/10926 struct Foo { template <int i> ~Foo(); // { dg-error "" } };
google
android
ptrmem21
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem21.C
627
utf_8
d789c4b198aaf983e81643a1d995a8da
// PR c++/43868 // { dg-options "-g" } struct Foo { virtual void do_something() = 0; }; template <typename T> struct Foo_impl; template <typename R, typename O> struct Foo_impl<R (O::*)() const> : public Foo { struct Helper { typedef int Some_type; operator Some_type () const { return 0; ...
google
android
memfriend8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memfriend8.C
340
utf_8
975bbbbf89c7ed7467afe0db4642b444
// { dg-do compile } // PR c++/5369: Member function of class template as friend template <class T> struct S { int foo () { return S<int>::bar (); } private: template <class U> friend int S<U>::foo (); static int bar () { return 0; } }; int main () { S<char>().foo (); }
google
android
pretty1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pretty1.C
691
utf_8
04907f98f8eab7c64ced6646f5140346
// { dg-do run } // PR 7768 template dtor pretty function wrong #include <string.h> static size_t current = 0; static bool error = false; static char const *names[] = { "X<T>::X() [with T = void]", "X<T>::~X() [with T = void]", 0 }; void Verify (char const *ptr) { error = strcmp (ptr, names[current++]); } te...
google
android
explicit3
.C
toolchain/gcc/gcc-4.8.3/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
android
crash67
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash67.C
91
utf_8
4d18a79ebe27fdc9fc1cfb181d77510d
// PR c++/32561 template<int N, int N> struct A; // { dg-error "redefinition|declared" }
google
android
operator8
.C
toolchain/gcc/gcc-4.8.3/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
android
init4
.C
toolchain/gcc/gcc-4.8.3/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
android
crash75
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash75.C
130
utf_8
3f3886cb6cade0a026bbcff85e44887b
// PR c++/34776 template<typename T> struct A { T::X<0> x; // { dg-error "non-template|T::template|base type" } }; A<int*> a;
google
android
subst1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/subst1.C
549
utf_8
65ffda86719727c560bb58b2ddc37078
// { dg-do compile } // PR 7718. ICE. template <typename OBJECT> void default_initializer(const OBJECT &) { } template <typename OBJECT, void init_function(const OBJECT &)> class cContainer { public: template <typename INITIALIZER> void Add(const INITIALIZER &initializer) { init_function(initializer); } }; ...
google
android
crash111
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash111.C
116
utf_8
f5c17c8c05a6c2d1d6b29054c88125a1
// PR c++/51398 template<void, int N> struct A // { dg-error "not a valid type" } { static const int i = N; };
google
android
friend26
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend26.C
216
utf_8
6013e213776d77767ad0de2ceddba65f
// PR c++/14359 template<typename> struct A {}; template<typename> struct B { template<typename T> friend void foo(const A<T>& a, const B&) { a; } }; void bar() { A<void> a; B<void> b; foo(a,b); }
google
android
linkage1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/linkage1.C
475
utf_8
9eed8ce0831bf0313cab105488a8b9f3
// PR c++/50372 // Test that a template instantiation has the same linkage as its argument. // { dg-final { scan-assembler "(weak|glob)\[^\n\]*_Z3fooIXadL_Z13external_funcvEEEvv" } } // { dg-final { scan-assembler-not "(weak|glob)\[^\n\]*_Z3fooIXadL_ZL11static_funcvEEEvv" } } template<void (*fptr)(void)> void foo() { ...
google
android
friend3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend3.C
520
utf_8
d4c8a44deef0bfb76c6964c75b741416
// { dg-do compile } // PR 775 friend classes with qualified names inside template classes. struct A { struct B { B () { } }; }; template <class T> struct C: A { friend A::B::B (); // 2.95.2 ICE friend struct A; friend struct A::B; // 2.97 error }; template class C<char>; template <typename T> class TPL {...
google
android
friend8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend8.C
223
utf_8
ceb858e95982ac0af2e9168f31aea229
template <int N> struct ivector { template <int r, int c> friend void mult_mv (); }; template struct ivector<3>; template <int r, int c> void mult_mv () { c; } void get_local_point_pos () { mult_mv<7, 3> (); }
google
android
friend48
.C
toolchain/gcc/gcc-4.8.3/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
android
void7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/void7.C
184
utf_8
507e9e60c4e8d6cbeaf93b654efa9b91
//PR c++/28741 template<void> struct A // { dg-error "not a valid type" } { static int i; }; A<0> a; // { dg-error "invalid type|not a valid type" }
google
android
dependent-args1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/dependent-args1.C
265
utf_8
3e39818cd75d670c263210d492e83fc2
// PR c++/27582 // { dg-do compile } struct A { template<int> void foo(); }; template<int N, void (A::*)() = &A::foo<N> > struct B {}; B<int> b; // { dg-error "type/value mismatch|expected a constant|invalid type" } // { dg-prune-output "could not convert" }
google
android
typename5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename5.C
445
utf_8
657b2e18e1c5bda47ab17e796163c009
// { dg-do compile } // PR c++/2513: typename handling when scope is dependent as // described in DR108. template <bool flag> struct Select { typedef int Result; }; template <template<class> class Pred> struct FindType { typedef typename Select<true>::Result Result; }; template <int bits> struct Int { template<ty...
google
android
conv10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/conv10.C
119
utf_8
2c3b429768e3e6f954114fbd126e3122
// PR c++/41994 template<typename T> struct A { operator T(); A() { T (A::*f)() = &A::operator T; } }; A<int> a;
google
android
error13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error13.C
113
utf_8
23d1d88880eac44a4f6c4209f4d1c9c0
// PR c++/15227 template<typename> struct A {}; template<typename T> void A<T>::B::foo() {} // { dg-error "" }
google
android
sizeof4
.C
toolchain/gcc/gcc-4.8.3/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
android
crash115
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash115.C
82
utf_8
4881f59a4fc92a1ba6f12240d924549d
// PR c++/56534 template < struct template rebind < > // { dg-error "expected" }
google
android
partial11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/partial11.C
793
utf_8
3dc2f7f38ec49323d6044ddb2bc2e191
// DR 115 // 14.8.1: In contexts where deduction is done and fails, or in contexts // where deduction is not done, if a template argument list is specified // and it, along with any default template arguments, identifies a single // function template specialization, then the template-id is an lvalue for // the functio...
google
android
pr54858
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pr54858.C
1,172
utf_8
6465acc359cf71ed791739a364127805
// PR c++/54858 // { dg-do compile } template <int> struct A {}; template <typename T, T *> struct B {}; template <typename D> struct C { A<0> c0; B<A<0>, &C::c0> d0; // { dg-error "could not convert template argument" } A<0> c1; B<A<0>, &C::c1> d1; // { dg-error "could not convert template argument" } A<0> c2; ...
google
android
mem_func_ptr
.C
toolchain/gcc/gcc-4.8.3/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
android
fnspec1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/fnspec1.C
389
utf_8
1581f9141ad183d6d31a009275ebf7a4
// PR c++/35146 template <typename T> struct S {}; template <typename R> struct ref; template <> struct ref<double> { typedef double result; }; template <typename T> void foo(typename ref<T>::result, S<T>*); template <> void foo(S<double>, S<double>*); // { dg-error "does not match" } templat...
google
android
array19
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/array19.C
364
utf_8
d6ed514093a999f1e4b15b3133a67692
// PR c++/33553 // { dg-do compile } template <class T> struct S { static const int sz = 2; }; template <class T> struct U { enum { sz = 2 }; }; template <class R> struct P { template <class T> void bar (int (&x)[S<T>::sz]); template <class T> void baz (int (&x)[U<T>::sz]); }; P<int> p; void foo (void) { int ...
google
android
crash112
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash112.C
247
utf_8
cafccb8ed409984b3ee5d4f9079957fa
// PR c++/51370 struct A { template<typename> void foo() {} }; template<void (A::*)()> struct B {}; template<int> struct C { B<&A::foo<int int> > b; // { dg-error "declaration|type" } }; C<0> c; // { dg-prune-output "could not convert" }
google
android
crash4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash4.C
189
utf_8
4565662b8ea1b02f11db4b1627917693
namespace NS { struct C {}; void foo(); } template <class T> struct X {}; template <class T> struct A { A() { foo (X<T>()); } void foo(X<T>); }; template struct A<NS::C>;
google
android
call7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/call7.C
283
utf_8
4430bc3c331103d5a2ee03d64056e256
// Origin: PR c++/17395 // { dg-do compile } template<int> struct X { }; void fu(int a, X<sizeof(a)>) { } template<class T> void bhar(T a, X<sizeof(a)>) { } int main() { int x; X<sizeof(int)> y; fu(x, y); bhar(x, y); }
google
android
arrow1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/arrow1.C
336
utf_8
70d28a064929f59e11b32dff9e4de1c5
// PR c++/49118 // { dg-do compile } template< int n > struct a { a< n+1 > operator->() { return a< n+1 >(); } }; int main() { a<0>()->x; // { dg-error "instantiation depth exceeds maximum" } } // { dg-prune-output "incomplete type" } // { dg-prune-output "declaration of" } // { dg-prune-output "used but n...
google
android
pr28284
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pr28284.C
242
utf_8
10a1cc60b3d92d61e1b34b9ac481d289
/* { dg-do compile } */ template<int> struct A { static const int i=x; /* { dg-error "was not declared in this scope" } */ static const int j, k; }; template<int N> const int A<N>::j = i; template<int N> const int A<N>::k = j; A<0> a;
google
android
operator7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/operator7.C
142
utf_8
98c4cd89cdbe74a78e512f93f452daa8
//PR c++/27493 // { dg-options "-std=gnu++98" } template<operator T> void foo() // { dg-error "before|template" } { struct A {}; }
google
android
union1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/union1.C
294
utf_8
b60b7ba97d84900a03ad818e8de4f60d
// { dg-do run } extern "C" void abort (); void g (char c) { if (c != 'a') abort (); } void h (int i) { if (i != 3) abort (); } template <typename T> void f(T const &t) { union { char c; T t_; }; c = 'a'; t_ = 3; h (t_); } int main () { f (3); }
google
android
crash10
.C
toolchain/gcc/gcc-4.8.3/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
android
decl1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/decl1.C
215
utf_8
140909eaa0a4dfe8770e4810e92571cc
// PR c++/3882 // Verify that variable initialization can be // self-referencing inside a template function. int foo(int); template <typename T> void bar(const T&) { int i = foo(i); } void quus() { bar(0); }
google
android
access18
.C
toolchain/gcc/gcc-4.8.3/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
android
friend50
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend50.C
157
utf_8
111cbc72ece5729acf873d2dfae640fd
// PR c++/34399 template<int> struct X { void foo(); }; struct Y { template<long N> friend void X<N>::X::foo(); // { dg-error "declared as friend" } };
google
android
non-dependent2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/non-dependent2.C
314
utf_8
3ce6c8331c1ddbc56b2c89ca07992343
//PR c++/11070 // Used to ICE template <bool b> struct X { template <typename T> static int* execute(int* x) { return x; } }; template <typename T> void foo() { static bool const same = true; X<same>::execute<int> (0); } template void foo<int> ();
google
android
qualttp11
.C
toolchain/gcc/gcc-4.8.3/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
android
dtor7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/dtor7.C
277
utf_8
4a814bc6794f74cc5cd4043a45a39370
// PR c++/40373 // { dg-do compile } struct A; namespace { struct A; } struct B {}; template <typename T> void foo (T t) { t.~A (); // { dg-error "does not match destructor name" } } void bar () { foo (B ()); // { dg-bogus "required from here" "" { xfail *-*-* } } }
google
android
init3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/init3.C
157
utf_8
64314d0aa5b3600547adc69b42ab8e3c
// PR c++/11027 template <class T> struct X { typedef void (X::*pfun)(); static pfun p[]; }; template <class T> typename X<T>::pfun X<T>::p[] = {};
google
android
template-id-3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/template-id-3.C
286
utf_8
e93f073f61a42e3c7ad372625dbf5491
// PR c++/48261 typedef double (*gaddType)(double,double); struct Foo2 { static gaddType add; }; template<typename T> struct Something { void work() { double x=T::template add<double>(5.0,6.0); // { dg-error "add" } } }; int main() { Something<Foo2> s2; s2.work(); }
google
android
typename1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename1.C
153
utf_8
5608e09eb5e126cbf511d7b99a577ef4
// { dg-do compile } template <class T> class B : virtual T::A { typedef int INT; INT i; };
google
android
typedef25
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef25.C
720
utf_8
7b7d7acd3f627bf5dad56718a978812f
// Origin PR c++/42225 // { dg-options "-std=c++0x" } // { dg-do compile } template<class T> struct A { typedef T I; static const char *i; }; template<class T, int> struct B { typedef T TT; typedef decltype(TT::i) TT_I0; typedef decltype(&TT::i) TT_I1; typedef decltype(*TT::i) TT_I2; typede...
google
android
arrow2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/arrow2.C
110
utf_8
588bddbb18429763190474bb78d16fb3
// PR c++/56639 struct A { int i; static A* f(); }; struct B { void g() { int (A::f()->i); } };
google
android
explicit4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/explicit4.C
448
utf_8
3f7c086b1b4dd5261f5ced979a21b04b
// { dg-do compile } // Failed to spot specialization using a template-id expr template <typename n> class A {}; template <int m> class R {}; template <int n, int x> struct Trait { enum {m = n}; }; template <typename n, typename x> R<Trait<1,1>::m> f(A<x>); template <> R<Trait<1,1>::m> f<int>(A<int>) {return R<1>();}
google
android
friend31
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend31.C
587
utf_8
ca5a98ee9de24f0adf4f6d6da6ea4315
// { dg-do compile } // PR c++/15410: Declaration of friend class template with wrong // template parameter. template <typename T, typename U> struct F; // { dg-message "previous declaration" } class W { template<int i> friend class F; // { dg-error "template parameter" } int x; // { ...
google
android
crash93
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash93.C
136
utf_8
6ce63664012487deb9533d83bc1200a8
// PR c++/40371 struct A { typedef void (&F)(); template<int> operator F(); }; void foo() { A()(); // { dg-error "no match" } }
google
android
scope2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/scope2.C
530
utf_8
1ffed1eba156ff05925971c1bb91cd3d
// { dg-do compile } // checked required bases in wrong scope. class Helper {}; template<class T> struct X { }; template<class T> class Base { protected: typedef Helper H; }; template<class T > struct Derived : Base<T> { typedef Base<T> Parent; typedef typename Parent::H H; class Nested : public X<H> {}; ...
google
android
crash66
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash66.C
389
utf_8
e29b7df66408269c2eaea4100f6227cf
// PR c++/29535 // { dg-do compile } template <class INDEX> struct SetRegion2D { struct FloodFillControl { struct Allocator{}; }; }; template <int DIM, class PIXELINDEX> struct MotionSearcher { typedef SetRegion2D<PIXELINDEX> Region_t; MotionSearcher (typename Region_t::FloodFillControl::Allocator &a_rAllo...
google
android
nontype15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nontype15.C
289
utf_8
e4e6038ded9c7ed667109894758cea89
struct foo { typedef int (*fun)(int); static int f(int); // overload between static & non-static int f(); static int g(int); // non-overloaded static }; template<foo::fun> struct f_obj { // something .. }; int foo::f() { f_obj<f> f1; f_obj<g> f2; return 0; }
google
android
crash76
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash76.C
167
utf_8
f1a8c42b37d318db77076e2f45ccbce5
// PR c++/34486 template<typename> struct A { typedef A* X; }; template<typename T> struct B { using A<T>::X::Y; // { dg-error "not a base type" } }; B<int> b;
google
android
ttp24
.C
toolchain/gcc/gcc-4.8.3/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
android
access13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/access13.C
332
utf_8
76f5c8b19b7f609c01aedaee827b1931
// { dg-do compile } // PR c++/13262: Access checking during instantiation of static data // member. template <typename T> class Aclass { private: Aclass() {} static Aclass instance; }; template <typename T> Aclass<T> Aclass<T>::instance; template class Aclass<int>;
google
android
non-type-template-argument-1
.C
toolchain/gcc/gcc-4.8.3/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
android
error41
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error41.C
170
utf_8
69ccae3809305b08d23a96a1e4730072
// PR c++/40370 // { dg-do compile } struct A { static int i; }; template <int> struct B { int x[A::i]; // { dg-error "array bound is not an integer constant" } };
google
android
sfinae9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae9.C
7,906
utf_8
a9f3ce4ee662be853b285ba58e2dfe52
// DR 339 // // Test of the use of various assignment 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<typenam...
google
android
decl2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/decl2.C
207
utf_8
05e0d875681f42cc0eb951378ac07bd0
// PR c++/16162 template <int N> struct O { struct I { template <typename T> struct II { void f(); }; }; }; template <int N> template <typename T> void O<N>::I::II<T>::f () {}
google
android
defarg1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/defarg1.C
100
utf_8
e56cdb80a6b4148add333d45d0d83d9a
struct Outer { template <int I, int J=I> struct Inner {}; }; void f() { Outer::Inner<2> i; }
google
android
incomplete1
.C
toolchain/gcc/gcc-4.8.3/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 ...