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
crash8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash8.C
286
utf_8
899e82cfa1eab0c5e96b47962c693262
// { dg-do compile } // PR c++/11513: ICE due to incorrect decision whether the tag is template. template <typename T> struct bar { struct foo { int a; }; template <typename U> int wom(U c) { struct foo b; } };
google
android
mangle1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/mangle1.C
292
utf_8
33119bbc7489f718bc456a2baae44253
// PR c++/17324 // { dg-do assemble } template<int, typename T> struct A { template<int I> void foo(const A<I,T>&) {} }; template<typename> struct B { template<int J> void bar(const A<J,B>&); void baz() { A<0,B>().foo(A<0,B>()); } }; template struct B<void>; template struct B<int>;
google
android
friend13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend13.C
348
utf_8
443d8784ec310c25ee130df06beefdd0
// { dg-do compile } // Perform access checking to parameter and return type of // function template correctly when only specialization is friend. template <class T> typename T::Inner foo () { return typename T::Inner(); } class Outer { private: struct Inner {}; friend Outer::Inner foo<Outer> (); }; v...
google
android
error40
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error40.C
664
utf_8
a73c78b9b0cb5a8fb837e7715821f660
// { dg-options "-fno-pretty-templates" } template <class T, int N=0, int X=1> struct A { struct AN; }; void foo(void) { A<void> a = 0; // { dg-error "A<void, 0, 1>" } } template <class T> T f(T); // { dg-message "int f<int>.int." } template <class T> T f(T, int = 0); // { dg-message "" } template <class T...
google
android
crash18
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash18.C
329
utf_8
3a58be91fa3ebac110f04aa317762b98
// { dg-do compile } // Contributed by: <leif dot lonnblad at thep dot lu dot se> // PR c++/15064: typeid does not form an integral constant expression #include <typeinfo> template <typename T> void dummy() { const std::type_info& t = typeid(T); const std::type_info& t2 = typeid(float); } template void dummy<int...
google
android
ttp27
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ttp27.C
170
utf_8
052744e1f403dbb8b61873044725e659
// PR c++/35678 template<typename T, T> struct A; template<typename> struct B; template<template<typename T, T> class U> struct B<U<char, 'h'> > {}; B<A<char,'h'> > x;
google
android
access8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/access8.C
341
utf_8
51a27bac3d6d8fa430db3b405c07c5af
// { dg-do compile } // Template instantiate during deferred access check template <class T> struct C { typedef typename T::X Y; }; class A { typedef int X; template <class T> friend struct C; }; C<A>::Y f(int);
google
android
ttp22
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ttp22.C
240
utf_8
bb208d004cabc03fdafadc3dd900340e
// PR c++/28860 // { dg-do compile } template<template<int> class A> class A<0>; // { dg-error "shadows template template parameter" } template<template<int> class B> class B<0> {}; // { dg-error "shadows template template parameter" }
google
android
qualttp22
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/qualttp22.C
803
utf_8
3b637cecee1acb45f1c7f752a8c7732d
// { dg-do compile } // PR c++/13520: Default template template argument that is a qualified id // with dependent scope. template<typename regular_type> class Policy {}; template <typename regular_type, template<typename> class OriginalPolicy> class ChangedPolicy_impl {}; template <template<typename> class OriginalPoli...
google
android
nontype4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nontype4.C
343
utf_8
4392d870aac6a442184166346dc506e9
// { dg-do compile } // PR c++/13797: ICE invalid nontype template parameter template <int> struct A { typedef A<0> B; // { dg-message "previous declaration" } template <B> struct B {}; // { dg-error "not a valid type|typedef" } }; A<0> a;
google
android
overload2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/overload2.C
267
utf_8
55cb3ca88be88700e7e00981ae5c08c6
template <class T, int (T::*)> struct foo; template <class T> int f(foo<T,&T::ob_type>*); template <class T> char* f(...); struct X { int ob_type; }; struct Y { char* ob_type; }; int x = f<X>(0); char* y = f<Y>(0); char* z = f<int>(0); int main() { return 0; }
google
android
new7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/new7.C
180
utf_8
e8027e6b33f47fe2a7c9fdde940f6189
// PR c++/27714 template<typename> struct A { static void* operator new(__SIZE_TYPE__); template<typename T> friend void* A<T>::operator new(__SIZE_TYPE__); }; A<int> a;
google
android
friend12
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend12.C
470
utf_8
b0a401cf45ed38cceaf9b0b254083c87
// { dg-do compile } // PR 9030. Perform access checking to parameter and return type of // function template correctly when the template is friend. template <class T> class Outer { private: struct Inner {}; template <class T_> friend typename Outer<T_>::Inner foo (); }; template <class T> typename Oute...
google
android
crash22
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash22.C
512
utf_8
1a93146cc62f110f6b65fd8e3eb06d85
// { dg-do compile } // PR c++/16706: Dependent type calculation during access checking template<typename> struct A { A(); template<typename> struct X {}; }; template<typename T> struct B { typename A<T>::template X<int> x; template<typename> struct C; }; template<typename T> template<typename U> struc...
google
android
friend6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend6.C
914
utf_8
d16da0e6f160e02bc23c4d98080f1644
// { dg-do compile } namespace boost_no_member_template_friends{ template <class T> class foobar; template <class T> class foo { private: template<typename Y> friend class foobar; template<typename Y> friend class foo; template<typename Y> friend bool must_be_friend_proc(const foo<Y>& f); int i; public: ...
google
android
conv8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/conv8.C
224
utf_8
ecc224a37ac009f350fab0ef1e1594a5
// { dg-options "-fabi-version=1 -Wno-abi" } template <typename T> struct S { struct I{}; operator I* (); }; template <typename T> struct S2 : S<T> { operator typename S<T>::I* (); }; template struct S2<int>;
google
android
error33
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error33.C
206
utf_8
23c1c937dffecf0165fe2c2bd7f041ae
// PR c++/24791 template<int> struct A { static int i; A() { ++i; } }; template<int> int A<0>::i(0); // { dg-error "template" "error" } // { dg-message "note" "note" { target *-*-* } 9 } A<0> a;
google
android
void14
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/void14.C
208
utf_8
25f480eeead08db92a5bce8ac9a6c4ed
// PR c++/36411 // { dg-do compile } template<template<void> class> struct A // { dg-error "not a valid type" } { template<template<int> class T> A<T> foo(); // { dg-error "mismatch|expected|invalid" } };
google
android
pure1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pure1.C
98
utf_8
b53786f776aa9fc498a50db4a10d9e69
// PR c++/26122 struct A { template<int> void foo() = 1; // { dg-error "pure|non-virtual" } };
google
android
ctor3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ctor3.C
269
utf_8
eb5e9f0376abe643c647f3a9d5b69532
struct A {}; struct B; template <class TP> struct X: virtual A { template <class TP2> X(TP2* ptr) {} template <class TP2> X(const X<TP2>) {} }; struct Y : X<B> { Y(A* a) : X<B>(a) {} }; void func1(X<B>); void func2() { A a; Y y(&a); func1(X<A>(&a)); }
google
android
init-list
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/init-list.C
295
utf_8
9783cba5cd0e48e50ecc5c42ed1dd282
// { dg-do compile } template<typename T> struct Base { Base(int) { } }; template<typename T> struct Derived : Base<T> { Derived(); }; template<typename T> Derived<T>::Derived() : Base(4) { } // { dg-error "have any field" "" }
google
android
array2-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/array2-2.C
269
utf_8
8da7cf5d73e9871b3bac6287dfe96d0a
// { dg-do compile } // { dg-options "-fabi-version=2" } // PR c++/13494. ICE template<typename T> int foo(int d[][4]) { return d[0][0]; }
google
android
crash62
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash62.C
109
utf_8
adc7a5c414a143f0cadb9db916df6769
// PR c++/29728 template<int> void foo() { int a[] = { X: 0 }; // { dg-error "designated initializer" } }
google
android
copy1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/copy1.C
282
utf_8
aa4d8b9bd5abd8810e68268afd1bb443
// { dg-do compile } // PR 5189 struct A { A(A&); // { dg-message "note" } template <class T> A(T); // { dg-message "note" } }; A a = 0; // { dg-error "no matching function" } // { dg-message "candidate" "candidate note" { target *-*-* } 13 }
google
android
error10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error10.C
1,375
utf_8
a5aedd671af7a8cdd7d4e6c0bc538ee6
// { dg-do compile } // { dg-options "-std=gnu++98" } // Origin: <tilps at hotmail dot com> // c++/9154: poor error message for ">>" vs "> >" in template argument list /* * Test that the error message is issued properly */ template <class T> class A {}; A<A<int>> blah; // { dg-error "should be '> >' within" } A<i...
google
android
nontype23
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nontype23.C
181
utf_8
d17e17b15018e6bc4a807c47ac6956b7
// PR c++/48936 template <bool C> int foo (void); template <class T> struct S { static const unsigned int a = sizeof (T); enum { c = sizeof (foo <(a == 0)> ()) }; }; S<int> x;
google
android
crash77
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash77.C
166
utf_8
f24a600e43d06d3cdd9d3eca14cb1abc
// PR c++/34603 template<typename> struct A; // { dg-error "declaration" } template<typename T> A<T>::A( struct A; // { dg-error "definition|expected|incomplete" }
google
android
crash60
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash60.C
153
utf_8
2f12f2c641a872263f9bf48d48db92c0
//PR c++/27961 struct A { template<int> void foo(X); // { dg-error "declared" } }; template<int> void f()(0); // { dg-error "initialize" }
google
android
conv11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/conv11.C
252
utf_8
142422aea9a677fb32502402e895a96d
int i; struct A { template <class T> operator T&() { return i; } // { dg-message "note" } }; int main() { A().operator int(); // { dg-error "operator int" } // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 9 } }
google
android
koenig6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/koenig6.C
436
utf_8
d7b45350c258784a47a153c1dedc979d
// PR c++/38850 template <typename VType> class Vector2 { private: VType c_[2]; public: typedef Vector2<VType> Self; Vector2(const VType x, const VType y) { c_[0] = x; c_[1] = y; } friend inline Self Max(const Self &v1, const Self &v2) { return Self(v1.c_[0], v1.c_[1]); } }; template <clas...
google
android
defarg15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/defarg15.C
225
utf_8
8ee1c9ea2d3489ba6d02846d7c1417aa
// PR c++/54198 template <typename T> void refIfNotNull (T* p1) { p1->ref; } template <typename T> struct A { A (T* p1) { refIfNotNull (p1); } }; class B; class C { void getParent (A <B> = 0); };
google
android
new6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/new6.C
145
utf_8
4072e1463163161bf945071e8def04c3
// PR c++/27713 // { dg-do compile } struct A { template<int> friend void* operator new(__SIZE_TYPE__); // { dg-error "invalid template" } };
google
android
new4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/new4.C
164
utf_8
ee60767832489389f13d0474ac598f82
// PR c++/27559 // { dg-do compile } struct A { template<typename T> static void* operator new(T) {} // { dg-error "first parameter|invalid template" } };
google
android
partial14
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/partial14.C
296
utf_8
ed8b9d57a67bc5c5ea55951ca907f5d9
// PR c++/59044 template <class T> class C { private: template <T a, T b> struct Implementation {}; public: typedef typename Implementation<0, 0>::Typedef Type; }; template <class T> template <T b> struct C<T>::Implementation<0, b> { typedef void Typedef; }; template class C<unsigned>;
google
android
non-dependent8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/non-dependent8.C
298
utf_8
663136a11c36aa84d57fc0129b2be73d
// { dg-do compile } // Two-phase name lookup for address of member: // Detecting error during parsing struct S { char i; }; template<int S::*p> struct X {}; template <class T> struct Foo { X<&S::i> x; // { dg-error "convert|no type" } };
google
android
class3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/class3.C
81
utf_8
478acfe8108cf9d573a8ff95d3dcf91d
// PR c++/25634 template<int> template<int> struct A; // { dg-error "too many" }
google
android
using5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using5.C
379
utf_8
730dbbdbfc73d70df6d68467f8af3c39
// { dg-do compile } // PR 9447. further test cases for dependent using decl template <typename T> struct Base; template <typename T> struct Derived : public Base<T> { using Base<T>::i; Derived() { i; } int get_i() { return i.f(); } };
google
android
alignof1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/alignof1.C
152
utf_8
98629e0464be5ba2c3ca56190b5b6f48
template<typename T> int my_alignof() { return __alignof__(T); } template<typename> struct X { }; int main() { return my_alignof<X<void> >(); }
google
android
using17
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using17.C
622
utf_8
24be9330d739e4540644e36d6e434557
// PR c++/14258 // { dg-do run } template<typename T> struct A { typedef T type; typedef A type2; }; template<typename T> struct B : A<T> { using typename A<T>::type; type t; using typename A<T>::type2; type f() { typ...
google
android
static24
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static24.C
211
utf_8
50003a8a22751483a8181b5d2eebb900
template<typename> struct A; template<> struct A<char> { static const char i = 1; }; template<typename T> struct B { static const int j = A<T>::i; static const int k = int(j); int x[k]; }; B<char> b;
google
android
current-inst1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/current-inst1.C
217
utf_8
75713792374068fe6d8c9f8fc26407dc
// PR c++/53549 template<typename T> struct C2 { int operator()(); template<int> struct F2; }; template<typename T> template<int I> struct C2<T>::F2 : C2<T> { using C2<T>::operator(); }; C2<int>::F2<42> f;
google
android
friend43
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend43.C
183
utf_8
d9e6aaa893125e91967d2b2ffd7b8e4d
// PR c++/28111 // { dg-do compile } template<typename> void foo(); template<typename T> struct A { friend void foo<>(typename T::X); // { dg-error "not a class" } }; A<int> a;
google
android
spec22
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec22.C
636
utf_8
fbcb25d460c773d1b6a68ecba11d0fb9
template <typename T> class srp; template <typename T> struct ptr { template <typename U> ptr(const srp<U> &other); // { dg-message "ptr<T>::ptr" } }; template <typename T> struct srp { template <typename U> operator ptr<U>(void) const; // { dg-message "srp<T>::operator" } }; ptr<int> parent_get() { srp<int> pare...
google
android
typename19
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename19.C
357
utf_8
5817c410b70cf0419a1198d2aaf89a0e
// PR c++/56395 struct A { template <class T> struct B { }; }; template <class T> struct D { }; template <class T, class U> struct C { typedef T _Type; typedef typename T::template B<_Type> _BType; D<_BType> d; }; template <class T> struct C<T,T> { typedef T _Type; typedef typename T::template B<_Type> ...
google
android
access10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/access10.C
306
utf_8
71d21b2797de6268bae8a876a61f64ac
// { dg-do compile } // PR c++/10849: Incorrect access checking on template specialization. class X { private: template <typename T> struct Y; }; template <> struct X::Y<int> {}; template <typename T> struct X::Y {}; template struct X::Y<int>;
google
android
crash108
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash108.C
206
utf_8
324df43d6a5c500468d0183e3f6d4189
// PR c++/50861 template<class T> struct A {A(int b=k(0));}; // { dg-error "parameter|arguments" } void f(int k){A<int> a;} // // { dg-error "declared" } // { dg-message "note" "note" { target *-*-* } 3 }
google
android
unify11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/unify11.C
481
utf_8
d1257d24bd5b82a2fa99e6ded9bb4d32
// Origin: PR c++/40684 // { dg-options "-std=c++0x" } struct A { }; template <typename S, typename T, typename U, typename S::v = &S::v::s> // { dg-error "is not a" } typename S::A foo (S c, T t, U u) { } struct B { struct C { template <typename U> C (U t) { A a; A b = foo (this, a, t); ...
google
android
sizeof12
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sizeof12.C
210
utf_8
085b9f955b319ea26fa659b0342a998f
// Origin PR c++/41863 template<int X> struct Bar { }; template<typename T> class Foo { T m_foo; void crash() { Bar<sizeof(m_foo)> bar; } };
google
android
typename12
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename12.C
462
utf_8
30d9dbf1a055ca371d55466a58a6efb8
// { dg-do compile } // PR 30818, failure to resolve typename typedef template < typename T > class A { typedef int type; class B; }; template < typename T > class A<T>::B { typedef typename A<T>::type type; type f(); }; template < typename T > typename A<T>::B::type A<T>::B::f() { return 0; }
google
android
memfriend3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memfriend3.C
669
utf_8
fb47ef062f1c0907f4bd591ea44dd1ea
// { dg-do compile } // Member function of class template as friend template<class T> struct A { void f(T); }; class C { int i; template<class T> friend void A<T>::f(T); }; template<class T> struct A<T*> { void f(T*); }; template<> struct A<char> { void f(char); }; template<class T> void A<T>::f(T) { C c; ...
google
android
using7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using7.C
408
utf_8
b84e1ff61ee65ba43655de5d69616da1
// { dg-do compile } // PR 9447. Using decls in reopened template classes. template <typename> struct A { int i; }; template <typename T> struct B : public A<T> { using A<T>::i; int foo() const; }; struct C {}; template <typename T> int B<T>::foo() const { return i; }
google
android
typedef18
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef18.C
340
utf_8
b09a6dae97faa259ed5be887a5dd1914
// Origin PR c++/40007 // { dg-do compile } template<typename T> struct x { protected: typedef int type; }; template<typename T> struct y : public x<T> { typename x<T>::type z; }; template<> struct y<void> : public x<void> { typedef x<void>::type z; }; template class y<int>;
google
android
sfinae17
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae17.C
601
utf_8
2bc096ac62072d7fefd78642d341f372
// The conversion from D* to B* is ambiguous, but that should not produce // an error, it should remove the first f overload by SFINAE. #define static_assert(TEST,STR) \ do { int ar[(TEST)?1:-1]; } while (0); struct B {}; struct B1 : B {}; struct B2 : B {}; struct D : B1, B2 {}; template <class T> T create(); t...
google
android
overload9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/overload9.C
342
utf_8
ef296b5932e0fe10416d5e48eb64ccb1
// PR c++/32232 template <typename T> struct A; template <typename T> struct B {}; template <typename T> A<T>& operator<<(A<T>&, const B<T>&); template <typename T> struct A { A<T>& operator<<(A<T>& (*)(A<T>&)); }; template <typename T> A<T>& foo(A<T>&); extern A<char> c; int main () { c << (1, foo); // { dg-e...
google
android
friend18
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend18.C
377
utf_8
c8d90e11af5004983158fb9d1e72ccfc
// { dg-do run } // PR 10158. implicit inline template friends ICE'd template <int N> struct X { template <int M> friend int foo(X const &) { return N * 10000 + M; } }; X<1234> bring; int main() { return foo<5678> (bring) != 12345678; }
google
android
overload8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/overload8.C
90
utf_8
cb3fd3ad47dd95cf7f0463be80d0a9b3
// PR c++/24915 struct A { template<int> void foo() {} template<int> int foo() {} };
google
android
crash58
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash58.C
230
utf_8
d723188e66b53d1b47c72e45d36126b7
//PR 26938 template<int, int = 0> struct A; // { dg-message "previous declaration" } template<int> struct A // { dg-error "template" } { A(); }; A<0> a; // { dg-error "incomplete type" }
google
android
virtual2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/virtual2.C
121
utf_8
cc0e6150c7129bf68a638d26a3d2f022
// PR c++/51137 struct A {}; template<int> struct B : virtual A { void foo() { (new A(*this))->A::~A(); } };
google
android
crash15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash15.C
112
utf_8
e50e217f7da35dc497156675b2547e44
// PR c++/13310 struct A {}; template <typename> void foo() { A a; a.foo<int>(); // { dg-error "" } }
google
android
canon-type-4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/canon-type-4.C
311
utf_8
6182badf792f2a554489f1b490e70bc3
// Origin PR c++/39754 // { dg-do compile } template<typename> struct A ; template<typename T ,typename = A<T> > struct B { } ; template<class W, class> struct D { typedef W X; A<X[2]> a; } ; template<class Y> struct E { B<Y[2]> b; }; E < int > e;
google
android
static1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static1.C
112
utf_8
0511bd747b9cf7ef36970e1f15d3bb0b
template <typename T> struct A { static const int t[1][1]={{0}}; // { dg-error "brace-enclosed|in-class" } };
google
android
access2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/access2.C
425
utf_8
bd880d8d2c138019357fe824987745e3
// { dg-do compile } // PR c++/5387 // Enforcing access of typename type. template <class T> struct A { typename T::X x; // { dg-error "this context" } int f() { return T::i; } // { dg-error "this context" } }; class B { typedef int X; // { dg-error "private" } static int i; // { dg-error "private" }...
google
android
inherit
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/inherit.C
187
utf_8
c20e3e284b8812faf677fcf9f596d821
// { dg-do compile } template<typename T> struct X { void f() { } }; struct Z : X<int> { }; int main() { Z z; z.X::f(); }
google
android
explicit1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/explicit1.C
230
utf_8
610a5ce174887479710ddef7e050b0e9
// { dg-do link } // { dg-options "-fno-implicit-templates" } template <class T> struct C { ~C(); }; template <class T> C<T>::~C() {} struct X { C<X> *p; ~X() { delete p; } }; template class C<X>; C<X> x; int main () {}
google
android
friend21
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/friend21.C
260
utf_8
7ccd2fc3b3e573a3074eaf2980b008c9
// { dg-do compile } // PR c++/5421: ICE for specialization of member function template // as friend. struct B { template <class T> void b(); }; template <class T> class A { friend void B::b<T>(); }; static A<int> a;
google
android
dependent-expr3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/dependent-expr3.C
354
utf_8
c4e64e51072726ff978403b12d3456bd
// { dg-options -std=c++98 } // { dg-do compile } // PR c++/12573: COMPONENT_REFs must be inspected for dependness. template <bool> struct S; template <typename K> struct Y : K { int x; }; template <class T> struct Z { S< (bool)(&static_cast<Y<T> *>(0)->x == 0) > // { dg-error "" } s; };
google
android
error6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error6.C
193
utf_8
8f931fa8690071fcefc2b1d1d7483bfc
template<int n> struct tento { enum {value = 10*tento<n-1>::value}; }; struct tento<0> { // { dg-error "" } enum {value=1}; }; int main() { if (tento<4>::value != 10000) return -1; }
google
android
error1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error1.C
350
utf_8
21c90677bbfb74c29a346183dc8bc5a3
// { dg-do compile } // PR c++ 10219. ICE template <class T> void make_pair(T x); void foo(){ struct fps_chan_ID fps; // { dg-error "incomplete" "" } make_pair(fps); // { dg-bogus "no matching function" "" } }
google
android
crash34
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash34.C
310
utf_8
431d941aad4b31a51b29e3dc961a7556
// { dg-do compile } // PR c++/20028 // We used to crash when referencing TYPE_SIZE_UNIT of the messed-up // type used for x, because it was not initialized. class Foo; template <typename T> class Foo { }; // { dg-error "not a template type" } Foo<int> x; // { dg-error "not a template|incomplete type" }
google
android
memfriend14
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memfriend14.C
1,005
utf_8
cd21edd34d2428c1c7c7904f894a44f7
// { dg-do compile } // Nested class template of class template as friend template<class T> struct A { template <T t> struct B { void f(); }; }; template <class U> 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 { ...
google
android
partial15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/partial15.C
480
utf_8
007e963e6560ba4fd5ed5856096ee4cc
// PR c++/57043 // { dg-do link } template<typename D> struct complex { }; template<typename Tp> complex<Tp> pow(const complex<Tp>& x, const complex<Tp>& y) { return complex<Tp>(); } template<typename T, typename U> struct promote_2 { typedef T type; }; template<typename Tp, typename Up> complex<typename promote_2<...
google
android
ptrmem19
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem19.C
295
utf_8
0560572d5223bb42d46f697f052023bb
// PR c++/40780 // { dg-do compile } template <class T1, typename T2, typename T3> struct A { typedef T2 (T1::*m) (T3); A (m) {} }; struct B; struct C { void foo (B *); }; typedef A <C, void, B *> D; typedef void (C::*E) (B *); struct F; typedef void (C::*G) (F); D d ((E) (G) & C::foo);
google
android
spec30
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec30.C
176
utf_8
bcc1e7cd1681ae2c1d9e35cde8abbbc4
// { dg-do compile } template<int N> inline int foo (int a) { return a; } template<> inline int foo<0> (int a = 123) // { dg-error "default argument" } { return a + 1; }
google
android
qualttp13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/qualttp13.C
433
utf_8
bbc53060e714151a182a421e8691abd5
template <class U> struct A { template <class V> struct AA { template <class T> struct B { int i; B() : i(1) {} }; }; }; template <template <class> class TT> struct X { TT<int> y; }; template <class T, class U> struct C { X<T::template AA<U>::template B> x; }; int main() { C<A<char>, int> c; }
google
android
typedef32
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef32.C
812
utf_8
eb9536bda0639eade20a999acdb363d0
// Origin: PR c++/43704 // { dg-do compile } template<typename T2, typename T3> struct if_ { typedef T2 type; }; template<class I1> struct iterator_restrict_traits { struct iterator_category {}; }; template<class T> struct matrix { struct ci {struct ic {};}; class i {}; }; template<class M, class TRI> struct...
google
android
explicit-args3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/explicit-args3.C
193
utf_8
d334f5ab9fec554290ec55f268b9b8bf
// PR c++/37177 template <class T> struct A { }; template <class T> void operator+(T, T); // { dg-error "class or enum" } int main() { operator+<int>; // { dg-error "cannot resolve" } }
google
android
typename7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typename7.C
211
utf_8
9108fc5e479d002dfe1d6280ab3a8e35
// PR c++/17501 template<int> struct A; template<> struct A<0> { struct B { struct C { typedef int D; }; }; }; template<int I> struct E { typename A<I>::B::C::D i; };
google
android
lookup8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/lookup8.C
267
utf_8
97437823fade3b3d3a9381c8da0c575b
// PR c++/38030 // The call to f should be resolved at template definition time. // { dg-do link } struct B { }; struct D : public B { }; D d; void f (B &) { } template < class T > void g () { return f (d); } void f (D &); int main () { g<int> (); return 0; }
google
android
ttp18
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ttp18.C
122
utf_8
51fb7506cb7843ab4fdf09b9c85c1544
template <template <typename> class T> void f(T<int>) {} template <typename T> union U {}; void g() { f(U<int>()); }
google
android
typedef35
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef35.C
724
utf_8
d447ec4608ca63e798d20ef66c21b002
// Origin c++/45558 // { dg-do compile } template <typename S, typename T> struct C { template <typename U> struct B { template <typename W> struct E { explicit E(const W &x) : w(x) {} const W &w; }; }; }; struct F; template <typename X> struct D { D() {} }; const D<F> g; templa...
google
android
stdarg1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/stdarg1.C
880
utf_8
5534aa0a36a8f30052a72e8b1e4c5748
// PR c++/47022 // { dg-do compile } // Suppress a warning that is irrelevant to the purpose of this test. // { dg-options "-Wno-abi" { target arm_eabi } } #include <cstdarg> template <typename T> void f1 (T *p, va_list ap) { *p = va_arg (ap, long double); *p += va_arg (ap, double); } template <typename T> void ...
google
android
pseudodtor3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pseudodtor3.C
677
utf_8
a4f0590114aea315ae757507b2d7eab4
// PR c++/32241 // { dg-do compile } struct A { typedef int T; T &foo (); A () { foo.~T (); } // { dg-error "does not have class type|expected" } }; template <typename T> struct B { T &foo (); B () { foo.~T (); } // { dg-error "invalid use of member" } }; B<int> b; template <typename T, typename S> struct...
google
android
void10
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/void10.C
180
utf_8
b98f8ca68199027ec91aea21199d5807
//PR c++/28736 template<void> struct A // { dg-error "not a valid type" } { template<typename> friend struct B; }; template<typename> struct B {}; B<int> b;
google
android
memfriend12
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memfriend12.C
750
utf_8
3efbba635759c97e9b452f6d5ba9696a
// { dg-do compile } // Nested class of class template as friend template<class T> struct A { struct B { void f(); }; }; template <class U> class C { int i; template<class T> friend struct A<T>::B; }; template<class T> struct A<T*> { struct B { void f(); }; }; template<> struct A<char> { struc...
google
android
crash72
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash72.C
360
utf_8
5af3f62d9558cd52f4d5aa70db89dd19
// PR c++/29225 // { dg-do compile } template <typename L, typename R> bool operator< (L x, R y); struct T { int t (); }; class S {}; struct U { typedef int (T::* M) (); M m; bool operator() (S &x) { T a; return (a.*m) < x; // { dg-error "invalid use of non-static member" } } }; void foo (S...
google
android
virtual3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/virtual3.C
200
utf_8
80050623e3a03161c85c255ebddd41e9
// PR c++/51620 template<int> class A { virtual ~A(); // { dg-error "non-deleted|private" } }; struct B : A<0>, A<1> // { dg-error "deleted|context" } { B() {} // { dg-error "context" } };
google
android
partial-specialization2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/partial-specialization2.C
210
utf_8
85762b85724149f8854c0c886e8d724f
// PR c++/54653 template <class T> struct A; template <class T> struct A<T*> { template <class U> struct B; }; template <class T> struct A<T*>::B<T*> { }; // { dg-error "too few template-parameter-lists" }
google
android
ptrmem3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem3.C
340
utf_8
171d82f45a76129388539c01e3212ec9
template <typename T,double (T::*fun)() const> struct I { }; struct R { R() { } }; class H: public R { public: H(): R() { } double& f() { return a; } double f() const { return 1.0; } double a; }; struct A { typedef I<H,&H::f> F; A() { } };
google
android
spec13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec13.C
207
utf_8
e9df140ef024c36c2a7761c13a353434
// { dg-options "-w" } template <typename T> struct S { int i; template <typename U> void f(U) {} }; template<> template <typename U> void S<int>::f(U) { i; } void f() { S<int> s; s.f<int>(3); }
google
android
arg7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/arg7.C
304
utf_8
9fda611eb6ff85fc5c7bbaaf0b553563
// PR c++/27425, 34274 template<typename T> struct A { template<template<T> class> struct B {}; // { dg-error "void|mismatch|expected" } // { dg-bogus "not supported" "" { target *-*-* } 5 } template<T> struct C; // { dg-error "void" } B<C> b; }; A<void> a; // { dg-message "required" }
google
android
anon2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/anon2.C
327
utf_8
989ad07a7ee0d8ab918018598ad338ab
// PR c++/28279 // finish_static_data_member_decl was confused by the anonymous // namespace causing TREE_PUBLIC to be unset template<typename T> struct is_pointer_impl { static const bool value = true; }; namespace { class prefix_name_mapper {}; } static const bool val = is_pointer_impl<prefix_name_mapper>::v...
google
android
typedef16
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef16.C
372
utf_8
7af5e83153c54bd7a3a8638675111507
// Origin PR c++/26693 // { dg-do compile } struct C0 { }; template<class T, class U> struct C1 { typedef C0 TypedefedC0; template<class W> void foo (TypedefedC0 *, W) { } template<class W> C1 (W w) { TypedefedC0 c; foo (&c, w); } }; C0 c0; C1<int, char> c1 (&c0);
google
android
inherit2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/inherit2.C
344
utf_8
13bd5309700c34e9e01c5bd7fd620d7b
// PR c++/5658 struct A { typedef int iterator; }; template <typename T> struct B: public A { template <typename U> struct iterator { }; B() { } }; int main() { B<int> a; }
google
android
spec6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec6.C
189
utf_8
b03b7960945086593b8859887c9f2b8e
template <bool, int> struct X {}; template <bool C> struct X<C,1> { typedef double* type; type foo () const; }; template <bool C> typename X<C,1>::type X<C,1>::foo () const {}
google
android
void2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/void2.C
143
utf_8
28483e5e5ebefbb2745d92348d976139
// PR c++/27496 // { dg-do compile } template<int> struct A { template<void> friend class X; // { dg-error "void|valid type" } }; A<0> a;
google
android
spec7
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/spec7.C
367
utf_8
c815e2045db2912ff4ac5e6626f81264
// { dg-do compile } // PR c++/6440: Specialization of member class template. template<class T> struct A { template<class U> struct B {}; }; template<> template<class U> struct A<int>::B { void f(); template <class V> void g(V); }; template<> template<> template <class V> void A<int>::B<char>::g(V) { } A<in...
google
android
incomplete6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/incomplete6.C
320
utf_8
680d8b21efe347eaf74be447cf3f4544
// PR c++/48115 template<typename> struct templ { }; template<typename T> T declval(); typedef int (*F2)(...); template<int> struct Int { }; template<typename F, typename T> struct S { template<typename A> Int<sizeof( declval<F>()(T()) )> f(A); }; int main() { S<F2, templ<int> >().f(0); }
google
android
typedef30
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef30.C
554
utf_8
b530d5da183724034637ef2b351372d2
// Origin: PR c++/43206 // { dg-do compile } template<class A> struct NumericTraits{ typedef A TInputImage;}; template<class B> class CovariantVector{}; template<class C> struct Image{ typedef C PixelType;}; template<class H, class E, class D> class F { typedef H G; typedef typename NumericTraits<typename G::Pix...
google
android
sfinae11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae11.C
1,508
utf_8
52303ab3e71ec37ab5f5099984d9715b
// DR 339 // // Test of the use of the comma operator with SFINAE // Boilerplate helpers typedef char yes_type; struct no_type { char data[2]; }; template<typename T> T create_a(); template<typename T> struct type { }; template<bool, typename T = void> struct enable_if { typedef T type; }; template<typename T> struc...
google
android
koenig3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/koenig3.C
316
utf_8
84d2678d3ce8241c254dd0501f0e4816
// PR c++/13157 namespace aa { double abs(double); long double abs(long double); } namespace fu { template <class T> struct X {}; template <class T> X<T> test(X<T> x) { using ::aa::abs; return abs(x); } template <class T> X<T> abs(X<T>); X<int> x; X<int> z = test(x); }