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
operator11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/operator11.C
394
utf_8
eb35e1face3b65b2aae71fc55558b420
// PR c++/48594 // Test for uses of (X->*Y)() that don't actually involve a // pointer to member function. struct A { } a; struct B { } b; struct C * cp; struct Func { void operator()(); }; Func operator->* (A, int); typedef void (*pfn)(); pfn operator->* (B, int); pfn C::*cpfn; Func C::*cfunc; template <class T> ...
google
android
repo6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/repo6.C
432
utf_8
936f4808a4e8d1dca305df8e8a638a2a
// PR c++/34178 // { dg-options "-frepo" } // { dg-final { cleanup-repo-files } } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } template<typename T> class A { private: static const int x; static int y; public: int getX () { return x + y; } }; template<typename ...
google
android
strlen1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/strlen1.C
119
utf_8
3a8d2192bd70af17c62b2fedd505e1e1
template <typename A1> void monk2 (A1) {} unsigned int strlen (const char*); void monk () { monk2 (strlen ("")); }
google
android
access4
.C
toolchain/gcc/gcc-4.8.3/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
android
friend41
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend41.C
131
utf_8
7fe00e3075eb0a577c681969f5282929
// PR c++/26912 struct Foo { template<class T> int func() const; }; class Bar { friend int Foo::func<int>() const; };
google
android
error38
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error38.C
1,086
utf_8
ef729125b542acc67fddf740325e1903
// Testcase for printing typename/typedef bindings as well as template args // in diagnostics (PR c++/25185) template <class T> struct A { typename T::type f(); // { dg-message "typename T::type = void*" } void f(int i = 0); // { dg-message "" } typedef typename T::type mytype; mytype g(); // { dg-message...
google
android
lookup6
.C
toolchain/gcc/gcc-4.8.3/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
android
error4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error4.C
245
utf_8
767c10eb63bc3c8f259a1f247aad4fe4
template<class T> struct C1 { template<class U> struct C2 { class Type { }; }; }; template<class T, class U> void foo(typename C1<T>::C2<U>::Type *) { } // { dg-error "template" "error " } // { dg-message "note" "note" { target *-*-* } 8 }
google
android
array17
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/array17.C
272
utf_8
d745bc63c8c200e57c116976bd79e9b1
// { dg-do compile } template <typename T> struct V { T& operator[](int); }; struct S { S operator +(int); template <typename T> T value(); }; template <typename T> void R (T v) { v[(S() + 0).template value<int>()][0] = 0; } int main () { R(V<V<int> >()); }
google
android
virtual1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/virtual1.C
111
utf_8
574d531cbef985e82a8a2c3a60d75a38
// PR c++/51029 struct A { void foo(); }; struct B : virtual A { template<int> B() { foo(); } };
google
android
typedef29
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef29.C
537
utf_8
9b9621e40fbf5b850fdc826d2bc3ea2f
// Origin: PR c++/42820 // { dg-do compile } template <class T> struct vector{}; template<class T>struct Traits{struct Primitive{struct Id{};};}; template <template<class T> class Tree, class Polyhedron> struct Tree_vs_naive { typedef typename Tree<int>::Primitive Primitive; void f() const { typedef vector...
google
android
lvalue2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/lvalue2.C
197
utf_8
8772fb1af327a84b88b8190f6c94ee33
// PR c++/50835 struct A {}; struct B { explicit B(A &); operator A&() const; }; void should_be_lvalue(A&); template <typename> void f() { A v; should_be_lvalue(true ? B(v) : v); }
google
android
spec19
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec19.C
405
utf_8
f5d160027a38c58d8d22ae4a510839c8
// PR c++/18962 template<class T1,int N1> class Klasse { public: template <class T2,int N2> void function( const Klasse<T2,N2>& ); }; template<> template<class T2,int N2> void Klasse<int,1>::function( const Klasse<T2,N2>& param ) { param; // make sure we use the argument list from the definition. } int main()...
google
android
memfriend5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memfriend5.C
580
utf_8
b29c5ddfeb79a3077e908d0877024b79
// { dg-do compile } // Member template function of member class template as friend template <class T> struct A { template <class U> struct B { template <class V> void f(V); }; }; class X { int i; template <class T> template <class U> template <class V> friend void A<T>::B<U>::f(V); }; template <class T...
google
android
nontype16
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nontype16.C
167
utf_8
efe778ec780ff5ae0b39781a917ca677
//PR c++/27962 template<int> struct A { template<typename> void foo(); }; template<> template<struct T> void A<0>::foo() {} // { dg-error "not a valid type" }
google
android
typedef4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef4.C
266
utf_8
2ffbcc1ef99f24c2acacaeb4f1276cb4
// PR c++/27572 // { dg-do compile } template<typedef> void foo(); // { dg-error "no type|typedef declaration|template" } void bar() { foo<int>(); // { dg-error "matching" } // { dg-message "candidate" "candidate note" { target *-*-* } 8 } }
google
android
param3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/param3.C
113
utf_8
9cdc0ea3c87c4634fd17c85b389758e3
// PR c++/49418 template <class T> void f (const T t) { t = 1; // { dg-error "" } } int main() { f(1); }
google
android
static29
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static29.C
115
utf_8
e9b1989c04a7b26eeb97573f87c42c52
// PR c++/29570 template<int> struct A { static const int i; }; template<int N> const int A<N>::i = { A<N>::i };
google
android
spec8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec8.C
424
utf_8
3add5756f52354ea441e418ac77ff8cf
// { dg-do compile } // Specialization of member class template. template<class T1> struct A { template<class T2> struct B {}; template<class T2> struct C {}; }; template <> template <> struct A<int>::B<int>; template <> template <class U> struct A<int>::B {}; A<int>::B<int> ab; // { dg-error "incomplete" } A...
google
android
qualttp2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/qualttp2.C
322
utf_8
e1b6f19153852a341aae2955eb8ea280
// { dg-do compile } struct A { template <class T> class B {}; }; template <int i> struct X { }; template <class T> struct C { X<T::template B> x; // { dg-error "type" } }; int main() { C<A> c; }
google
android
ptrmem6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem6.C
195
utf_8
0142354fd9237d4486fb0edc36ef39cc
struct S {}; void g(int S::**); template <typename T> void f (int T::* volatile *p) { g(p); // { dg-error "conversion" } } template void f(int S::* volatile *); // { dg-message "required" }
google
android
friend
.C
toolchain/gcc/gcc-4.8.3/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
android
overload5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/overload5.C
511
utf_8
71fab915b19ad597865cbe790d6ee455
// PR c++/22621 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 .. }; f_obj<&foo::f> a; // OK f_obj<foo::f> b; // OK (note: a and b are of...
google
android
static18
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static18.C
255
utf_8
edf490d7a540447062e06ed56692070f
// PR c++/23914 template <class T> struct foo_template { static const unsigned complexity = 0; }; template <int x> struct STATIC_ASSERTION {}; void gcc_402_problem_minimal() { sizeof(STATIC_ASSERTION< foo_template<int>::complexity >); }
google
android
overload4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/overload4.C
176
utf_8
7d2609e7f82311b3100345f65467e041
// PR c++/20679 template <class T> struct foo { struct bar { int m; }; void m() const {} void m() {} bool n() const { return b->m < 42; } bar *b; };
google
android
array10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/array10.C
412
utf_8
2960ad36eda739b652d2efa379834c5c
template<class T> struct Vec { T* data; T& operator[](int i) const; }; template<class T> inline T& Vec<T>::operator[](int i) const { return (&data[0])[i]; } inline double foo(Vec<double> v) { return v[0]; }
google
android
explicit-args4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/explicit-args4.C
241
utf_8
423c767a5a26b27f06ba2a9e2443961a
// PR c++/48883 // { dg-do link } template<typename T> T myMax(T a, T b) { if(a < b) return a; return b; } int main() { bool even = true; int (*fp)(int, int); fp = even ? myMax<int> : myMax<int>; /* yields link error */ }
google
android
init10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/init10.C
124
utf_8
7c6a96d0550437ed561f8825ad2bc25e
template <int N> struct A { }; template <int Q> void g() { const int M ( Q ); A<M> a; } void h() { g<3>(); }
google
android
lookup7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/lookup7.C
115
utf_8
863f99213222c2c03bf6c2f03bfc91c6
class S; template<class T> int f(T, S); class S { template<class T> friend int f(T t, S) { t; return 0; } };
google
android
defarg8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/defarg8.C
196
utf_8
5a9ab10f62078b4d20766a00362fa933
// PR c++/27094 // { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } struct A { ~A(); }; struct B : A { B(); }; template<int> struct C { C(const B& = B()); }; C<0> c;
google
android
canon-type-10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/canon-type-10.C
390
utf_8
ad0e0128dad7b2d09241fb6a378fc1d5
// { dg-do compile } template<class T> struct C { }; template<class T, template<class TT_T0, template<class TT_T1> class TT_TT> class TT, class U = TT<int, C> > struct S { void foo(TT<T, C>); }; template<class T, template<class TT_T0, template<class TT_T1> class TT_TT> class TT, class U> void S<T, TT, U>::foo...
google
android
ptrmem23
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem23.C
538
utf_8
4ef19b43e68f9107adafd0216878f062
// PR c++/56247 struct Base { void method() {} }; typedef void (Base::*MemPtr)(); // Template with a member function pointer "non-type parameter". template<MemPtr func> struct Wrapper {}; template<class C> struct Child : public Base { // Templated derived class instantiates the Wrapper with the same paramet...
google
android
cast2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/cast2.C
204
utf_8
e37c2b4d718f2648117dc43cd2edf39d
// PR c++/56238 class A { template < typename T > T& get (); template < typename T > class B { void RemovePoint (A& value) { static_cast < double >(value.get < T > ()); } }; };
google
android
typedef38
.C
toolchain/gcc/gcc-4.8.3/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
android
conv7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/conv7.C
215
utf_8
94bd39b4081e21725b306825863ab68b
// { dg-options "-fabi-version=0" } template <typename T> struct S { struct I{}; operator I* (); }; template <typename T> struct S2 : S<T> { operator typename S<T>::I* (); }; template struct S2<int>;
google
android
error48
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error48.C
319
utf_8
afa89a3122c9da6cc0dd12ddd6d1fe41
// PR c++/54416 template < typename T > struct foo; template <> struct foo < int >; template < typename T > struct bar { template <> struct foo < int > // { dg-error "non-namespace scope" } { void baz (); }; }; void foo < int >::baz () { } // Don't be picky about error-recovery. // { dg-prune-output "." }
google
android
spec2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec2.C
371
utf_8
1133f61b139dcbae6d0d62799d821c00
// { dg-do compile } // Bug: Overloading of ordinary and template member function // which enclosing class is specialized is not handled correctly. template <class T> struct A { void f(T) {} }; template<> struct A<int> { void f(int) {} template <class T> void f(T) {} }; template void A<int>::f(int);
google
android
conv6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/conv6.C
576
utf_8
a99117f536bfae5da72de6e056eca4b9
// { dg-do compile } // PR 9898, DR 322. Conversion to reference type. template <typename> struct Ref {}; template <typename> struct Val {}; struct Wrapper { template <typename U> operator Ref<U> & (); template <typename U> operator Val<U> (); }; void Foo (Wrapper l) { static_cast <Ref<int> &> (l); static_cast ...
google
android
restrict1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/restrict1.C
147
utf_8
9e9322d04add76d1f767de02d143704b
// PR c++/6392 // Bug: We tried to make the array restricted, which doesn't make sense. template <class T> class bob { T * __restrict a[50]; };
google
android
elab1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/elab1.C
288
utf_8
318b45c84de8e1474d71ee390dc7b68c
// { dg-do compile } // Elaborate type specifier of class template template <class T> class A { class B; }; template <class T> class A<T>::B { friend class A; };
google
android
using10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using10.C
198
utf_8
342a3559277f60c5966b80ac4ea673fa
// PR c++/22136 struct B { void foo(); }; template <typename T> class I : public B {}; template <typename T> class D : private I<T> { I<T>::B::foo; // { dg-warning "deprecated" } };
google
android
sfinae16
.C
toolchain/gcc/gcc-4.8.3/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
android
spec21
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec21.C
554
utf_8
b03d3fac8b47ebc0e95fe00fc6b76bb1
// { dg-do run } // DR214 template <class T> T f(int) {return 0;} template <class T, class U> T f(U){return 1;} template <typename T, typename R> T checked_cast (R const &) {return 0;} template <typename T, typename R> T checked_cast (R *) {return 1;} int main () { int i = 0; if (f<int>(1)) return 1; if (c...
google
android
spec15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec15.C
1,060
utf_8
290d2d2975a01e2cf3eea77f1000b57e
// { dg-do compile } // Contributed by Wolfgang Bangerth <bangerth at ticam dot utexas dot edu> // PR c++/509: Make sure specializations of member templates match correctly // between template and non-template overloads. template <class T> struct A { template <class U> void f (U); void f2 (int); template <clas...
google
android
class1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/class1.C
127
utf_8
706f2857327f695c7b984df9d14be0b0
extern const int a; template <const int&> class X {}; template <typename> struct Y { X<a> x; }; template struct Y<int>;
google
android
crash69
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash69.C
228
utf_8
2fe8caf6bfc48e5dbc0d295b6d6b0cf0
// PR c++/31132 template<typename T> class A { static int i; // { dg-error "is private" } friend int T::foo(); // { dg-error "does not match" } }; struct B { void foo() { A<B>::i; } // { dg-error "within|candidate" } };
google
android
spec23
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec23.C
552
utf_8
7d6018a91ea2deeb358268bd30c91847
struct Foo { template <typename T> Foo (const T &); // { dg-message "T = Bar" } }; struct Bar { template <typename T> operator T () const; // { dg-message "T = Foo" } }; Foo Quux (Bar const &b) { return b; // { dg-error "ambiguous" } // { dg-message "candidate" "candidate note" { target *-*-* } 22 } }
google
android
sizeof15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sizeof15.C
205
utf_8
ebdb792b93f8bdc6bc2cc6ba0302b95c
// PR c++/55685 typedef __SIZE_TYPE__ size_t; template <size_t T, size_t U> struct A; template <typename T> struct B { static A <sizeof (T), 0> x; }; template <typename T> A <sizeof (T), 0> B <T>::x;
google
android
crash37
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash37.C
293
utf_8
f4049ee3cbcecf9e936e328fcc4402e2
// PR c++/21352 struct coperator_stack { template<class type> void push3() { } }; struct helper {}; template<class F> void bla(F f) { } template <typename ScannerT> struct definition { definition() { bla(coperator_stack::push3<helper>); // { dg-error "pointer to member" } } };
google
android
sizeof11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sizeof11.C
211
utf_8
2bf35536cb5d6363ce87a1698f385906
// PR c++/29435 template < class T > struct A {}; template < int> void g() { sizeof (A < int>); } template < class T > struct B; template < int> void f() { sizeof (B<int>); // { dg-error "incomplete" } }
google
android
incomplete5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/incomplete5.C
356
utf_8
761982cc6d3e7f38229a643c02f7fdb5
// PR c++/33501 // { dg-do compile } class A; // { dg-error "forward declaration" } template <typename T> struct X { static int f (T); // { dg-error "initializing" } static const T &make (); static const bool value = sizeof (f (make ())) == sizeof (int); // { dg-error "invalid use of incomplete type" } }; int...
google
android
qualttp4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/qualttp4.C
443
utf_8
c74652ba0a044cfb6e9710ede4d6d2e4
// { dg-do compile } struct A { template <class T> struct B {}; }; template <template <class, class> class TT> // { dg-error "provided" } struct X { TT<int> y; // { dg-error "number" } }; template <class T> struct C { X<T::template B> x; // { dg-error "type" } }; int main() { C<A> c; // { dg-message "required" } }
google
android
dtor6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/dtor6.C
368
utf_8
7dd092349bfef88439bfb6fe8f98d0e7
// PR c++/40139 template<int> struct A { static int i; }; template<int N> int A<N>::i = { A::~A }; // { dg-error "non-static member function" } template class A<0>; struct X { }; int i1 = X::~X; // { dg-error "non-static member function" } int i2 = &X::~X; // { dg-error "address of destructor" } int i3 = &A<0...
google
android
typedef7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef7.C
225
utf_8
e5348f6294a6577651589b520086d43e
// An intermediate version of the fix for c++/19407 broke this example. struct A { typedef struct { int i; } S; }; template <class T> struct B: public A { template <class U> static S f (); }; template struct B<int>;
google
android
member8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/member8.C
261
utf_8
0e4a3e1cc8686f6abd2b23333d6678de
// PR c++/35138 // { dg-do compile } namespace N1 { struct A { }; } namespace N2 { struct A { }; } using namespace N1; using namespace N2; template <typename T> int foo (T const &t) { return t.A; } struct B { int A; }; int main () { B b; foo (b); }
google
android
static3
.C
toolchain/gcc/gcc-4.8.3/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
android
typename14
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename14.C
407
utf_8
7dd8b9bc6da8c8f42250a913e3dbff25
// { dg-do compile } template <typename T> struct A { typedef const T X; struct B; }; template <typename T> struct A<T>::B { typedef volatile typename A<T>::X Y; T const volatile *Foo (); }; template<typename T> typename A<T>::B::Y *A<T>::B::Foo () { return 0; }
google
android
local2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/local2.C
2,293
utf_8
d32b0f4cfabbf7cf6a3f55db155096d2
template<typename T> struct X { double & f (const unsigned int i, const unsigned int j); void g (X &M); }; template <typename T> void X<T>::g (X &x) { double t14 = x.f(0,0)*x.f(1,1); double t15 = x.f(2,2)*x.f(3,3); double t17 = x.f(2,3)*x.f(3,2); double t19 = x....
google
android
ctor1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ctor1.C
744
utf_8
50bb5f64947bd92da66029bd39fa5eed
// { dg-do compile } // PR 5132. ICE on struct constructors in templates. // snippets from bits/huge_val.h #define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } #define __huge_val_t union { unsigned char __c[8]; double __d; } #define HUGE_VAL (__extension__ \ ((__huge_val_t) { __c: __HUGE_VAL_byte...
google
android
memclass3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memclass3.C
740
utf_8
0d33a29a97363269ef67e175452d1251
// PR c++/17132 template <typename T> struct has_deref { struct impl { template < typename Type, typename Type::reference (Type::*Func)(void) const> struct func_tag; template <typename Type> static char (& test( Type *, func_tag<T...
google
android
arg6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/arg6.C
240
utf_8
f90e567b7331a6236abd917963c61a0f
// PR c++/33744 // { dg-do run } template <bool B> struct A { bool b; A() : b(B) {}; }; A<bool(1)> a; A<bool(1<2)> b; A<(bool)(2>1)> c; A<bool((2>1))> d; A<bool(2>1)> e; int main () { return (a.b && b.b && c.b && d.b && e.b) ? 0 : 1; }
google
android
typename10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename10.C
456
utf_8
13cebd5e928102ca67a8d6b4960714fb
// { dg-do compile } // PR 27787. Too eager to resolve a typename template<typename X> struct x { template<typename Y> struct y { typedef Y type; }; }; template<typename A> struct a : x<A> { template<typename B> typename a::template y<B>::type f(B); };
google
android
dtor2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/dtor2.C
96
utf_8
71d10b5b4cd6cb6cb8f6be930603b8e8
struct Foo { template <int i> ~Foo() {} // { dg-error "" } }; int main() { Foo f; }
google
android
sfinae13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae13.C
3,343
utf_8
fd186f6ad5502f92e5c2137c6fc41c9a
// DR 339 // // Test of the use of casts 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> struct enable_if<f...
google
android
array2-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/array2-1.C
269
utf_8
b197e9f6e5275f99d9ff3c22fe947550
// { dg-do compile } // { dg-options "-fabi-version=1" } // PR c++/13494. ICE template<typename T> int foo(int d[][4]) { return d[0][0]; }
google
android
crash65
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash65.C
165
utf_8
0442a3c405a770df830f5c0e3594c438
// PR c++/29732 struct A { template<int> template<typename T> friend void foo(T) {} // { dg-error "parameter" } void bar() { foo(0); } // { dg-error "foo" } };
google
android
error15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error15.C
336
utf_8
5c61ee227ce8d484caf24918cf6fc907
// PR c++/16929 template <class T> class A { int x; }; template <class T> class B { protected: A<T> a; // { dg-error "" } void f(const A<T> * a1 = &a); // { dg-error "this location" } void g(void); }; template <class T> void B<T>::g(void) { f(); // { dg-error "default argument" } } template...
google
android
decl3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/decl3.C
131
utf_8
bc26ef84f5a062823e14f4e50d2e1e8c
// c++/32560 namespace N {} template<typename> struct A { int A<typename N::X>; // { dg-error "namespace|argument|before" } };
google
android
sfinae-dr657
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae-dr657.C
351
utf_8
72ffb989291c9247b76445d291858548
// DR 657 // Test that a return or parameter type with abstract class type causes a // deduction failure. struct A { A(); A(int); virtual void f() = 0; }; template<class T> T declval(); template<class T> int declval(...); template<class T> void arg(T); template<class T> int arg(...); int main() { int i = de...
google
android
typedef26
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef26.C
503
utf_8
4b7b5ad8691fed069cf0e029ff4382dc
// Origin: PR c++/42225 // { dg-do compile } struct A { typedef int TI; }; template<class T0> struct S0 { int i; }; template<class _T, int> struct S1 { typedef _T T; typedef typename T::TI TTI; typedef S0<TTI> TT0; typedef S0<typename T::TI> TT1; }; template<class T> void foo(const T&) { typ...
google
android
friend38
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend38.C
133
utf_8
9c94dec5b4c21f6f788aa68c4cbf6ae7
// PR c++/22352 template <class A> class s { typedef int d; template <class s, typename s::d> friend class t; }; s<int> t1;
google
android
spec31
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec31.C
122
utf_8
5f4ca65174fe2a4c7ed7bfb4fa8c89d5
// PR c++/28058 template<int> struct A { A() {} }; A<0> a; template<> A<0>::A() {} // { dg-error "specialization" }
google
android
using16
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using16.C
581
utf_8
d37a9a556f8e0a50f499a2abf87108bf
// { dg-do compile } template <class T> struct A { typedef T type; }; template <class T> struct B { class type { type(); // { dg-error "private" } }; }; template <class T> struct C : A<T>, B<T> { using typename B<T>::type; void f() { type j; // { dg-error "context" } } }; template...
google
android
eh1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/eh1.C
59
utf_8
9c78ecb5ca87b2a81cbd9c1796b2c13e
template <class T> void foo() { try {} catch(T e) {} }
google
android
type1
.C
toolchain/gcc/gcc-4.8.3/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
android
typename3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename3.C
119
utf_8
baaa577db3fc32c6dd18e8cfa76705eb
// { dg-do compile } // crash test - PR 7266 template <class A> struct B { typedef A::C::D E; // { dg-error "" } };
google
android
memfriend10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memfriend10.C
982
utf_8
88f5f474357358b46b62eb6b6fdc9b8a
// { dg-do compile } // Nested class template of class template as friend template <class T> struct A { template <class U> struct B { void f(); }; }; class C { int i; template <class T> template <class U> friend struct A<T>::B; }; template <class T> struct A<T*> { template <class U> struct B { voi...
google
android
spec1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec1.C
338
utf_8
2c4280f67b1e22c2fbb0f60584f52297
// { dg-do compile } // Bug: ICE during invalid instantiation of member function // which enclosing class is specialized. template <class T> struct A { void f(T) {} }; template<> struct A<int> { void f(int) {} }; template void A<int>::f(int); // { dg-error "not match" }
google
android
spec37
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec37.C
123
utf_8
c634bc3cd5d70e255a55643ffffb70b2
// PR c++/28300 template<typename> struct A { template<typename T> struct A<T*>; // { dg-error "namespace scope" } };
google
android
ctor6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ctor6.C
88
utf_8
25d3511fe5a378afd592b4563e115a7c
// PR c++/25663 template<int> struct A { A(int); }; void foo() { A<0>(A<0>(0)); }
google
android
mem-partial3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/mem-partial3.C
365
utf_8
bb1864ad7f8c081274c8cf093f07ecb0
// PR c++/33342 template <bool B, class T = void> struct enable_if_c { typedef T type; }; template <class T> struct A { template <class U, class V> struct B; template <class U> struct B<U, typename enable_if_c<U::sub::value==0>::type> { }; }; struct C { struct sub { static const int value = 0; ...
google
android
friend7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend7.C
377
utf_8
1d4f923241bfe8578940f39c34f80d7c
// { dg-do compile } template <typename V> struct b { template <typename T> class a { template <typename> friend class a; T t_; public: a() {} a(a<T *> const &); }; }; template <typename V> template <typename T> b<V>::a<T>::a(a<T *> const &rhs): t_(*rhs.t_) {} int f () { b<void *>...
google
android
param2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/param2.C
256
utf_8
335d675c515abc3965d67af12d3a7c72
// Origin PR c++/47311 // { dg-do compile } template < typename > class A0; template <class Key, class T, template < typename TF = T> class TC = A0> class B0; template <int> class A1; template <class Key, class T, template <T p> class TC = A1> class B1;
google
android
crash97
.C
toolchain/gcc/gcc-4.8.3/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
android
typedef1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef1.C
445
utf_8
42466b99570e934c25c4734f73fb77fd
// { dg-do compile } // PR 72 template <typename T> struct A { typedef T type; }; template <typename T> struct B { typedef int xxx; // { dg-message "" } typedef T xxx; // { dg-error "" } typedef typename A<T>::type xxx; // { dg-error "" } typedef A<int>::type xxx; // { dg-error "" } }; B<int> good;
google
android
unify2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/unify2.C
518
utf_8
4559d27962ac65b887c6f4a3a42dc70f
// { dg-do compile } template<int I> void f1 (char [][I+1]) {} template<int I> void f2 (char [][I+0]) {} template<int I> void f3 (char [][I]) {} template<int I> void f4 (char [][I-0]) {} template<int I> void f5 (char [][I-1]) {} template void f1 (char [][6]); // { dg-error "does not match" } template void f2 (char []...
google
android
dtor8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/dtor8.C
434
utf_8
742d7a2b91f4f06a277defe5ec77d638
// PR c++/43648 namespace dealii { namespace FEValuesViews { template <int dim, int spacedim> struct Scalar {}; } template <int dim, int spacedim> struct X { FEValuesViews::Scalar<dim,spacedim> scalars[dim*spacedim]; void f() { typedef dealii::FEValuesViews::Scalar<dim,s...
google
android
scope4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/scope4.C
282
utf_8
b3e926a09671bb6d64fb4f63dde975e0
// PR c++/46058 class StringLiterals { public: static const char dec[]; }; template<class St, class Base, const char* name> class NoValueCommand : public Base { public: }; template<class St, class Base> class DecBasic : public NoValueCommand<St,Base,StringLiterals::dec> { };
google
android
crash45
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash45.C
148
utf_8
0a5188978e44004ccb2352fb7ea44cf5
// PR c++/26365 struct A {}; namespace N { template<int> void foo(); } void bar(A *p) { p->N::foo<0>; // { dg-error "not a class member" } }
google
android
crash33
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash33.C
113
utf_8
204eff887d15d36069d7065b01240cf5
// PR c++/19253 namespace N {} template<typename> struct A { A<typename N::X<int> > a; // { dg-error "" } };
google
android
friend27
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend27.C
308
utf_8
5d0b7c7f0422e1347c115a5773dea497
// PR c++/15265 enum Relation {equalOp}; template<typename B> class A { public: static bool Relop(const A&, const A&, Relation); friend bool operator==(const A& a1, const A& a2) { return Relop(a1, a2, equalOp); } B* b; }; int main() { A<int> a; a == a; return 0; }
google
android
nontype9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nontype9.C
259
utf_8
5345b8ffaffe474e8bf43916398a25ef
// { dg-do compile } // { dg-prune-output "mangled name" } // Contributed by: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> int i; template <void (&FN)()> struct g { void foo(void) { FN (); } }; void h () { i = 7; } template struct g<h>;
google
android
koenig4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/koenig4.C
156
utf_8
56c1c2325d188ec369a6eca6c10766b7
// PR c++/13978 namespace ns { template <class TP> void func1(TP* t); struct A {}; } template < class TP > void func2() { func1( new ns::A() ); }
google
android
operator5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/operator5.C
317
utf_8
0e11abfb73c96739ad546cd85ff3c2e6
struct A { int operator() (); }; template <int> void foo () { A &a = *new A(); const int i = a(); }
google
android
op1
.C
toolchain/gcc/gcc-4.8.3/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
android
typeid1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typeid1.C
174
utf_8
aa060dce3d59cbf4ce2344b294d1b948
// PR c++/55878 #include <typeinfo> struct S; template <typename T> static bool fn (S *s) { return typeid (*s) == typeid (T); } struct S { }; bool x = fn<S> (__null);
google
android
typedef27
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef27.C
806
utf_8
354cf432a344951b1a0d1cabae95edb4
// Origin: PR c++/42713 // { dg-do compile } template<class T> struct S { }; template<class T> struct S0 { typedef T TT; }; template<class U, class V> struct super_struct : S0<V> { typedef S0<V> super; }; template<class U, class V, class W> struct S1 : super_struct<U, V> { typedef super_struct<U, V> sup...
google
android
qualified-id5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/qualified-id5.C
315
utf_8
82e93d7e8d730758fa8ebc813ccd09b4
// PR c++/52596 struct msgpack_zone_finalizer_array { int* tail; }; struct msgpack_zone { msgpack_zone_finalizer_array finalizer_array; }; struct zone : public msgpack_zone { template <typename T> T* allocate(); }; template <typename T> T* zone::allocate() { --msgpack_zone::finalizer_array.tail; }
google
android
enum7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/enum7.C
192
utf_8
64a39245eac282a03a7fe5d39bebcde3
// PR c++/53524 template <class T> struct A { enum EA { ea }; }; template <class T, class U> struct B { enum EB { eb1 = A<T>::ea, eb2 = A<U>::ea, eb3 = 0 ? eb1 : eb2 }; }; B<int,char> b;
google
android
fntry1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/fntry1.C
442
utf_8
8f101d84c90c958381606b762e3df298
// PR c++/26433 // { dg-do link } int get_int() { throw 1; return 0; } template <class _T> class Test { public: Test() try : i(get_int()) { i++; } catch(...) { // Syntax error caused by undefined __FUNCTION__. const char* ptr = __FUNCTION__; } private: int i; _T t; }; int m...