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
ref5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ref5.C
193
utf_8
506e5f8f23105cf0257a836058d1806b
// PR c++/35075 template<int&> struct A {}; template<typename T> struct B { static const T t; A<t> a; // { dg-error "reference variable" } }; B<int&> b; // { dg-message "required" }
google
android
init2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/init2.C
225
utf_8
76f88c13708d18ca711ab8287d1caac9
// PR c++/9820 template <typename T> struct X { template<typename> static int test(...); template<typename> static int test(int *); static const int i = sizeof(X<T>::template test<int>(0)); }; template class X<int>;
google
android
array5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/array5.C
114
utf_8
c557bdb58ff52b9fc368185880923627
// PR c++/15427 template<class T> struct A { T foo; }; template<class T> struct B { A<int> _squares[2]; };
google
android
ptrmem11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ptrmem11.C
342
utf_8
2733fb0b367677a0d0e425dcfc181dd9
// PR c++/18407 template <typename Klasse> struct the_base{ template <void (Klasse::*Fn)()> void foo() { } }; template <typename T> struct derivedT: the_base<derivedT<T> > { typedef the_base<derivedT<T> > parent; void ice(){ this->parent::template foo< &derivedT<T>::ice>(); } }; int main() { derivedT<i...
google
android
enum8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/enum8.C
81
utf_8
c9482bcfa2d35bb4e349100f9060f230
// PR c++/47482 template<class> struct K { enum { A = sizeof"A", B = +A }; };
google
android
array22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/array22.C
186
utf_8
21e1f968e0203fb50fece892480a4888
// PR c++/48029 template <class T> struct A { }; template <class T, class U> struct B { struct N { }; typedef U u; }; typedef B<int, A<int>(*)[2]> btype; A<int> v1[2]; btype v2;
google
android
typedef9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/typedef9.C
823
utf_8
779a641261850a2aeef3d242e02f0a9b
// PR c++/34846 template<typename, typename> struct __are_same { enum { __value = 0 }; }; template<typename _Tp> struct __are_same<_Tp, _Tp> { enum { __value = 1 }; }; template<typename, bool> struct __enable_if { }; template<typename _Tp> struct __enable_if<_Tp, true> { typedef _Tp __type; }; template<typename _Itera...
google
android
stmtexpr2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/stmtexpr2.C
344
utf_8
5a43e87e10898038576202d6271981c9
// Origin: PR c++/36408 // { dg-options "" } // { dg-do compile } template<int> void foo() { int i = ({ }); // { dg-error "void value not ignored" } } template<int> void bar() { int i = ({ ({}); }); // { dg-error "void value not ignored" } } int main () { foo<0> (); bar<0> (); }
google
android
using9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/using9.C
359
utf_8
43e4887ef35fe0c5873b07345814a3d3
// { dg-do compile } // PR c++/17154: Using declaration in partial class template specialization. template <int numrows, class T> struct A { void test_A() {} }; template <int numrows, class T> struct B {}; template <class T> struct B <3, T> : public A <3, T> { using A <3, T>::test_A; void test_B_spec() { test_A(); } ...
google
android
error35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/error35.C
113
utf_8
7b9093b26f8920c628c47bed533cc022
// PR c++/33494 template<int> void foo(int(*f=0)()); // { dg-error "declared void|scope|erroneous-expression" }
google
android
crash57
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash57.C
254
utf_8
e8689f24f46b2d103e7556f1cd9fe1e3
//PR c++/27397 template<int(> struct A; // { dg-error "token" } template<typename> struct B { template<int(> struct C; // { dg-error "token" } }; A<char> a; // { dg-error "type/value mismatch|constant|declaration" }
google
android
offsetof1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/offsetof1.C
230
utf_8
0278f61baf9894baa55e08be6e4d1217
// { dg-do compile } // PR c++/17221 #include <cstddef> template <int N> struct Bar; template <> struct Bar<3> {}; template <class T> struct Foo { Bar<offsetof(T, a) + 3> k; }; struct A { int a; }; template struct Foo<A>;
google
android
ttp1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ttp1.C
179
utf_8
016674e9e056bbda052e457c8bf91720
// { dg-do compile } template <template <typename T> class A > class B : virtual A<void> { typedef int INT; INT i; };
google
android
overload10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/overload10.C
249
utf_8
2e506fd9260fa2ce41127628f924466d
// PR c++40342 template <typename T1, typename T2> int f(T1 *, const T2 *); // { dg-message "" } template <typename T1, typename T2> int f(const T1 *, T2 *); // { dg-message "" } int (*p)(const int *, const int *) = f; // { dg-error "ambiguous" }
google
android
dependent-name3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/dependent-name3.C
333
utf_8
0c3e325271a377838c5d47bb6fb94dd1
// { dg-do compile } // Dependent arrays of invalid size generate appropriate error messages template<int I> struct A { static const int zero = 0; static const int minus_one = -1; }; template<int N> struct B { int x[A<N>::zero]; // { dg-error "zero" } int y[A<N>::minus_one]; // { dg-error "negative" }...
google
android
overload6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/overload6.C
373
utf_8
b692f22da11a28693bec29150c3bc7e5
template<typename T> void unique(T,T); struct A { int begin(); }; template<int> void foo() { unique(A().begin); // { dg-error "invalid use of non-static member function" } }
google
android
cond3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/cond3.C
230
utf_8
3dfcddf50f883d0eabd3e0a6a6f3be44
// PR c++/13833 struct X { template <typename T> X & operator << (const T &t); X & operator<< (int& (*p) (int&)); }; X x; template <int> void foo () { x << (1 ? "ok" : "failed"); } template void foo<1>();
google
android
dr408
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/dr408.C
705
utf_8
5df8658381333f348754c7590f128994
// DR 408 // { dg-do link } // Test that a size given in the out-of-class definition isn't used until // instantiation time. template<typename T> struct X { static char s[]; int c; }; template<typename T> char X<T>::s[sizeof(X<T>)]; #define sassert(EXP) int ar[(EXP)?1:-1] sassert(sizeof (X<char>::s) == sizeof (i...
google
android
expr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/expr1.C
184
utf_8
d9a08dd82988a25d2840d767d582837f
// PR c++/18161 // { dg-options "" } template <class T> struct Y; template <> struct Y<bool> {}; template <typename T = typeof (1 == 1)> struct X { Y<T> a; }; template struct X <>;
google
android
typeid-template-argument
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/typeid-template-argument.C
202
utf_8
c8309bdff0cfda521b4e7ea53eaf9126
// This used to ICE (PR28420) // { dg-do compile } template<int> struct A; int i = sizeof(A<typeid>); // { dg-error "operator cannot appear in a constant-expression|template argument 1 is invalid" }
google
android
array14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/array14.C
133
utf_8
00d9cd9feffed8cd62a0330e5742bbb9
// PR c++/23993 const int data[2][4] = { { 0, 1, 2, 3 } }; template <typename T> void t(int k) { int candidate = data[1][k]; }
google
android
qualttp7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/qualttp7.C
322
utf_8
3efab71e896874774c80630cb0888d5a
// { dg-do compile } template <template <class> class TT> class C { }; template <class T> struct D { C<T::template B> c; // { dg-error "no class template" } }; D<int> d; // { dg-message "required" }
google
android
crash79
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash79.C
148
utf_8
fbd484dabcedafb4f6a55188390fd076
// PR c++/36404 struct A { A(int); template<int> enum { e }; // { dg-error "template|expected" } }; A a(A::e); // { dg-error "not a member" }
google
android
meminit2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/meminit2.C
694
utf_8
49a8526a10802f5f264eca9873b6546a
// { dg-do compile } // Origin: Mark Anders <mark dot a dot anders at intel dot com> // PR c++/15503: disambiguators in base classes and mem-initializers template <typename K1> struct O { template <typename K2> struct I {}; }; template <typename T> struct A : typename O<T>::template I<int> { // { dg-error "k...
google
android
conv3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/conv3.C
663
utf_8
be5017725e9889a47d07ba0d3a3464ff
// { dg-do run } // PR 4361. Template conversion operators were not overloaded. template <typename T> struct C { operator T () { return 0; } template <typename T2> operator T2 () { return 1; } int Foo () { return operator T (); } template <typename T2> int Baz () { return static_c...
google
android
ptrmem13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ptrmem13.C
121
utf_8
97ddc530a1bd61b06c131cfdf61adbec
// PR c++/20734 struct A; void blah(int A::*); struct A{ int a; }; template<typename T> void hoho(){ blah(&A::a); }
google
android
memclass1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/memclass1.C
386
utf_8
8dca5b65d4eeaa3cbfa61a1861a850d2
// { dg-do compile } // PR c++/10555: ICE for member class template when one of the // template argument levels contains errors. template <typename> struct A { template <typename> struct B; }; template <typename T> struct C { typedef typename A<T>::template B<U> X; // { dg-error "declared|invalid" } }; C<void> ...
google
android
error47
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/error47.C
235
utf_8
ef2ec17333cebad645145429d47e3b4f
// PR c++/51367 template<typename T> void foo(T, T); // { dg-message "template" } void bar(void* p) { foo(0, p); // { dg-error "no matching" } } // { dg-message "candidate|parameter 'T' ('int' and 'void*')" "" { target *-*-* } 7 }
google
android
friend29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/friend29.C
184
utf_8
a0d74e429e0416fe8fd207b1ee020c7a
// PR c++/15701 template<template<int> class T> struct A : T<0> { void foo(); template<template<int> class U> friend void A<U>::foo(); }; template<int> struct B {}; A<B> a;
google
android
crash12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash12.C
293
utf_8
627140de004634696fc53c98684c31c2
// { dg-do compile } // PR c++/12495: ICE looking up class template in local class. template <typename> struct A {}; template <typename T> void foo() { struct B { B (const A<T>&); }; }
google
android
nontype17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/nontype17.C
121
utf_8
6938006fe193f5813dbc894a73ef554f
// PR c++/35282 template<int> struct A { template<int> void foo(); }; template<> template<int> void A<0>::foo() {}
google
android
array4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/array4.C
146
utf_8
3904f7cfd18135b5f8ef1dbb020648fc
// PR c++/14122 extern const char str[]; template <const char* P> struct A { template <const char* R> void foo(); }; template class A<str>;
google
android
sizeof9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/sizeof9.C
171
utf_8
12df473d69cf94653ec8c2821cfe853f
// PR c++/21025 template<int N> struct X { char x[N]; }; template<typename T> X<1 + sizeof(T) - sizeof(T)> F(T const &); template<int N> struct S { int d() { F(1); } };
google
android
static26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/static26.C
249
utf_8
2bfba281dfdf39292b16309d13ce403d
// PR c++/28016 // { dg-final { scan-assembler-not "computed" } } template<class T1, class T2> struct scalar_divides_assign { static const bool computed ; }; template<class T1, class T2> const bool scalar_divides_assign<T1,T2>::computed = true;
google
android
ptrmem4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ptrmem4.C
338
utf_8
9a4a21b8504db815b1c727663eff64ff
// { dg-do compile } // PR c++/8849 // Pointer to member function template argument deduction ICE. template <class CONT> void queryAliases(CONT& fill_me); struct SpyExample { void ready(); void inputs(); }; void SpyExample::ready() { queryAliases(inputs); // { dg-error "invalid" } }
google
android
ttp25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ttp25.C
993
utf_8
eacf697cb9c3929c2c1cb6331f9ea409
// { dg-do compile } template<typename T, template<T> class C> void f1(T, C<5>); // { dg-message "note" } template<typename T, template<T> class C> void f2(C<5>, T); template<typename T, template<T> class C> void f3(C<5>, T); // { dg-message "note" } template<typename T> struct metafun { typedef T type; }; templa...
google
android
access3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/access3.C
305
utf_8
bb203818faa22dcb1d2c8ada7ef4ec82
// { dg-do compile } // PR c++/5387 // Enforcing access of typename type. template <class T> struct A { typename T::template X<int> x; // { dg-error "this context" } }; class B { template <class T> class X {}; // { dg-error "private" } }; int main() { A<B> ab; // { dg-message "required" } }
google
android
crash55
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash55.C
219
utf_8
76422d9ef3fa61436a0439bfaab2d350
//PR c++/27668 template<typename class T, T = T()> // { dg-error "nested-name-specifier|two or more|valid type" } struct A {}; template<int> void foo(A<int>); // { dg-error "mismatch|constant|template argument" }
google
android
abstract-dr337
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/abstract-dr337.C
266
utf_8
b327d3b4c0ccb1e532fcf32a30d8b4c5
// PR c++/17232 (DR 337) template<typename T> class A { virtual void f() = 0; }; template<typename T> void g(T (*a)[1]) {} // { dg-error "abstract" "" { xfail *-*-* } } int main() { g<A<int> >(0); // { dg-error "no matching function" "" { xfail *-*-* } } }
google
android
static33
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/static33.C
252
utf_8
be10cab7b5da25690bdabe2a885d3ae2
// PR c++/52688 // { dg-do link } template<typename T> T f() { static const double staticLocalVariable = 100.0; struct local { static double f() { return staticLocalVariable; } }; return T(local::f()); } int main() { f<double>(); }
google
android
crash88
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash88.C
84
utf_8
59238bcb93582e024a0c5cb12c7ab7e1
// PR c++/34397 template<typename T, int = T()[0]> struct A { typedef A<T> B; };
google
android
using2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/using2.C
501
utf_8
39ab7cfa3b77ae21d0f7e2140e1bc6f7
// { dg-do compile } // PR 9447. Using decls in template classes. template <class T> struct Foo { int i; }; struct Baz { int i; }; template <class T> struct Bar : public Foo<T>, Baz { using Foo<T>::i; // { dg-message "previous declaration" } using Baz::i; // { dg-error "redeclaration" } int foo () { return i...
google
android
crash7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash7.C
434
utf_8
02c633425e2b805230994cdd35d274f1
// { dg-do compile } // PR c++/10108: ICE in tsubst_decl for error due to non-existence // nested type. template <typename> struct A { template <typename> A(typename A::X) {} // { dg-error "no type" } }; // We currently don't give the "no match" error because we don't add the // invalid constructor template to TYPE...
google
android
memtmpl3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/memtmpl3.C
391
utf_8
65b31c49b4254df68b854aca90f1aa6a
// PR c++/33239 struct null_type; template<typename T1, typename T2> struct tuple_impl { template<typename U> struct append { typedef tuple_impl<U, null_type> type; }; int data; }; template<typename T1> class tuple : public tuple_impl<T1, null_type>::template append<T1>::type { using tuple_impl<T1, ...
google
android
ttp8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ttp8.C
408
utf_8
ad156dec50f1d7aecc0ad4207046c838
// { dg-do compile } // Contributed by: Niall Douglas <s_gccbugzilla at netprod dot com> // PR c++/14284: Failure to select specialization template<typename> struct S; template<template<class> class> struct I {}; template<class, int> struct Match; template<template<class> class C> struct Match<I<C>, 0> {}; ...
google
android
ttp13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ttp13.C
376
utf_8
dcb32e2136f330749a2276bb4d351b2b
// { dg-do compile } // PR c++/15664: Template substitution of template template parameter template <int N> struct S { template<template<typename> class A> friend void foo(); }; template<template<typename> class A> void foo(); template <typename> struct X {}; int main () { S<1> s; foo<X>(); ...
google
android
arg3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/arg3.C
371
utf_8
f455d543dc6a4d6f270fe652fcc368e7
// { dg-do compile } // PR 10224. Rejected a valid constant argument. template <bool B> struct X { struct I {}; }; template <typename T> struct Y { static const bool selector = true; typedef typename X<selector>::I helper; }; Y<int> i;
google
android
fntype1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/fntype1.C
392
utf_8
c3025665d58f3b1443b5cbb53b5bd0f6
bool f(int i) { return i != 5; } template <class X, class P = bool(X)> struct Traits { typedef P type; }; template <class X, class P = typename Traits<X>::type> struct S { const P& p_; S( const P& p ) : p_(p) {} // const reference }; template <class X> S<X> make_s(const typename Traits<X>::type & p) // const refe...
google
android
static28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/static28.C
215
utf_8
3f4fc4769c54c1f623ff36f774008e54
// PR c++/29518 template< bool C > int assertion_failed( int); template< class > struct N { static bool const okay = true; enum { t = sizeof( assertion_failed<okay>( 0)) }; }; int main() { N<int> n; }
google
android
crash32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash32.C
204
utf_8
b17b6f8116ba3725c4d80f6dcdfb1f41
// PR c++/19667 struct integral_constant { }; template<typename _Tp> struct is_function : public integral_constant { }; template<> struct is_function : public integral_constant { }; // { dg-error "" }
google
android
enum1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/enum1.C
129
utf_8
7c10af58e57cd68a834ce883259ef847
// PR c++/15554 template <int n> struct T1 { enum { N = 3 }; }; template <int n> struct T2 { enum { N = 3, N1 = T1<N>::N }; };
google
android
access15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/access15.C
328
utf_8
fc82819a276388c85441dd10835850d1
// { dg-do compile } // Bug 17149: ICE with TEMPLATE_TYPE_PARM template <class super, int (super::tdata::*member)() const = &super::tdata::operator()> struct x {};
google
android
void8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/void8.C
213
utf_8
d7375b6b148303af73024b27635ad7cd
//PR c++/28737 template<void> struct A; // { dg-error "not a valid type" } template<typename> struct B; template<void N> struct B<A<N> > {}; // { dg-error "not a valid type|declared|invalid" }
google
android
error2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/error2.C
588
utf_8
1a0e47264a3d0aeb7028d1b483bbe1d6
// { dg-do compile } // required from did not indicate the nested class template<class T> struct X { T m; // { dg-error "void" "void" } // { dg-error "incomplete type" "incomplete" { target *-*-* } 10 } }; template<class T > struct Derived { class Nested : public X<T> // { dg-message "required" "" } { }; ...
google
android
meminit3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/meminit3.C
224
utf_8
2814897eaaeccebed1436472d893ffd3
// PR c++/54744 template <typename T> struct base { typedef base base_type; }; template <typename T> struct derived : base<T> { typedef typename derived::base_type::base_type base_type; derived() : base_type() {} };
google
android
non-dependent12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/non-dependent12.C
259
utf_8
c68de3013fc66d5b9ca387b1f0f294ad
template<typename T> void foo(T &t) { int i = static_cast<int>(t); }
google
android
memfriend16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/memfriend16.C
610
utf_8
589793a48cdfb3f51df2530b2474a85c
// { dg-do compile } // Nested class of class template as friend template<class T> struct A { template <class U> struct B1 { }; template <class U> struct B2 { void f(); }; }; class C { int i; // { dg-error "private" } template<class T> template <class U> friend struct A<T>::B1; }; template<class T> ...
google
android
sizeof7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/sizeof7.C
337
utf_8
0c4917a1350de8892aea4bca2d593036
// { dg-do compile } // PR c++/10858: failure with calling a method inside sizeof in a template template <int> struct P {}; void bar (); template <class T> struct X { static int foo(void (*)()); P<sizeof(foo(&bar))> p; }; template class X<int>;
google
android
crash40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash40.C
157
utf_8
0e9a3be86c767d4c26ffb432816872ef
// PR c++/22180 struct A {}; template<typename T> void foo() { T::~T(); // { dg-error "member" } } template void foo<A>(); // { dg-message "required" }
google
android
operator2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/operator2.C
123
utf_8
08eba0ef43fd418e3505a0132a2e9c05
template <typename T> struct A {}; struct B { operator A<B>(); }; template <typename T> void f() { B::operator A<T>; }
google
android
non-dependent13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/non-dependent13.C
146
utf_8
40b38a3d73d53481f9e1570a38ed4eab
// PR c++/26266 template <int I> struct S; template <int I> void f() { if (const int i = 3) { S<i>::j; // { dg-error "incomplete" } } }
google
android
array24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/array24.C
279
utf_8
a1f7515ba86f0bee05a8d1da2482e446
// PR c++/55032 template<typename T> struct vec3t { T c[3]; }; typedef vec3t<float> vec3; class Bounds { public: Bounds(const vec3 bb[2]); void foo(const vec3 & v) { v.c[0]; } }; template<typename T> void work(T& value); void foo() { vec3 bb[2]; work(bb); }
google
android
friend36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/friend36.C
413
utf_8
4a3d535a6673c42778883751bb5d71cd
// PR c++/22139 // { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } template <int rank, int dim> class Tensor; template <int rank, int dim> struct SymmetricTensor { SymmetricTensor (const Tensor<2,dim> &t); friend void foo(); }; template <> SymmetricTensor<2,2>::SymmetricTensor (const Te...
google
android
array13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/array13.C
226
utf_8
29ac13549ace1bb08c2a718d6a2f3d31
// PR c++/20208 // { dg-do run } // { dg-options "-O2" } extern "C" void abort(); template <typename T> inline void *Foo (T arg) { return &arg[0]; } int main () { int bry[2]; if (Foo<int[2]>(bry) != bry) abort(); }
google
android
instantiate10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/instantiate10.C
972
utf_8
b6f93db83699b516b0d1578a6c9649ac
/* PR c++/39242, xplicit instantiation declaration prohibits implicit instantiation of non-inline functions. */ /* { dg-do compile } */ /* { dg-options "-O" } */ class Rep { public: void unref() const { } static void unref (const Rep * obj_r) { obj_r->unref(); } }; template<typename _Tp, typename _Bt = _Tp...
google
android
qualttp6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/qualttp6.C
335
utf_8
b353c34b9ab8c3b3ac91f9acd132ffc6
// { dg-do compile } template <template <class> class TT> class C { }; template <class T> struct D { C<T::template B> c; // { dg-error "no class template" } }; struct E { }; D<E> d; // { dg-message "required" }
google
android
ref7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ref7.C
146
utf_8
db13b42ef3220221c06b57bc736b7714
// PR c++/60167 template <int& F> struct Foo { typedef int Bar; static Bar cache; }; template <int& F> typename Foo<F>::Bar Foo<F>::cache;
google
android
sfinae2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/sfinae2.C
424
utf_8
ef7c07b739f13546538449ba7789b15b
// PR c++/19989 // Don't instantiate a function template if it would generate an // array of size zero. // { dg-do compile } template<int T> struct cl { const static int value = T; }; template<int I> void fn (char (*) [cl<I>::value] = 0 ); // { dg-error "zero-size array" } void foo (void) { fn<0> (); // { dg...
google
android
crash52
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash52.C
172
utf_8
f58855114e5ac6f9d257056219515c0c
// PR c++/27665 template<int> struct A { struct B { struct C {}; }; }; template<int N> void foo() { class A<N>::B::C X; } void bar() { foo<0>(); }
google
android
defarg7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/defarg7.C
188
utf_8
8fdfe04193de5eb0eac57ce398f4c5ec
// PR c++/25337 template <typename T> T& MakeT(); template <typename U, int N = sizeof (MakeT<U>().operator[](0))> struct helper{}; template <typename U> static char is_here(helper<U>*);
google
android
dependent-name5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/dependent-name5.C
1,171
utf_8
e11707dffcc625042f15f6d621ee1079
// PR c++/9634, c++/29469, c++/29607 // Contributed by: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR224: Make sure that a name is *truly* semantically dependent. struct D { typedef int K; }; template <typename T> struct A { typedef int Bar; template <typename> struct N {}; typedef Bar ...
google
android
dependent-name6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/dependent-name6.C
339
utf_8
a2d8358dfed423c4946dd5255b3cc157
// PR c++/26261 // { dg-final { scan-assembler "_ZN1YIiE1fIiEE1XILi1EEv" } } template <int dim> class X {}; template <class T> struct Y { static const unsigned int dim = 1; template <class U> X<Y<T>::dim> f(); }; template <class T> template <class U> X<Y<T>::dim> Y<T>::f() { return X<dim>(); } int main() { Y<...
google
android
template-id-4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/template-id-4.C
311
utf_8
3eeb73c9e211131164ee26dc577c50c2
// PR c++/48157 struct AType { template<class AA> void SomeFuncTemplate() { } }; template < class T > struct TTest2 { template<T> struct helper; template<class U> static void check(helper<&U::template SomeFuncTemplate<int> > *); }; int main() { TTest2< void (AType::*)() >::check<AType>(0); }
google
android
lookup3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/lookup3.C
196
utf_8
0287287b4b02081228b1429a9526248d
// PR c++/12397 struct foo { }; template <typename T> struct bar { bar(){} int i; bar (const bar<T>& foo) : i (foo.i) {} }; int main() { bar<int> b1; bar<int> b2(b1); }
google
android
void13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/void13.C
129
utf_8
562f64a462f01cebdb6f2624c9cbaf03
// PR c++/30299 struct A { int i; }; template<void> struct B : A // { dg-error "not a valid type" } { B() { this->i; } };
google
android
array15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/array15.C
156
utf_8
e9bc7a53116f8cc44a505ea2700b2054
// PR c++/28595 template<int> struct A { static const int i; }; template<int N> struct B { char c[A<N>::i], d; // { dg-error "constant" } }; B<0> b;
google
android
crash96
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash96.C
130
utf_8
b80f828624f99069397d41d1df746903
// PR c++/40406 template<int> struct A { template<int> template<int> void A::foo() {} // { dg-error "extra qualification" } };
google
android
qualified-id1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/qualified-id1.C
611
utf_8
2a70b459ac169aad03656f55acdf1bd5
// { dg-do compile } // PR 11922 struct A { template <bool> struct B; struct C; }; template <> struct A::B<false> {}; template <typename T> void foo() { T::C (); // { dg-error "parsed as a non-type|if a type is meant" } T::template B<false>(); // { dg-error "parsed as a non-type" "non-type" } // { dg-messa...
google
android
ttp3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/ttp3.C
745
utf_8
dae42b78445fb03f0f7c80954fe880b4
// { dg-do compile } // PR 5213. We failed to spot that class List was a template, rather // than a non-template or specialization template <class T> class vector { }; class OUTER { public: template <class T> class List { }; vector<class List> data; // { dg-error "invalid|required|ISO C" "" } }; template <cl...
google
android
pseudodtor6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/pseudodtor6.C
108
utf_8
3db5c6a0f3565dd475506157d06e140a
// PR c++/47971 template <typename> struct S { typedef double T; S () { T ().~T (); } }; S<double> s;
google
android
non-deducible1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/non-deducible1.C
145
utf_8
21eac3830935f44eac37132d5792645b
// PR c++/23055 template <class> struct S { typedef int type; }; template <class T> int foo(T, typename S<T>::type * ret); int j = foo(1, 0);
google
android
inherit9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/inherit9.C
153
utf_8
19797273bb7cf4155972bbcb4d4fb8c3
// PR c++/58273 class A {}; class B { int goo(A); }; template<typename E> class D : public B { void foo(A t) { int const i(B::goo(t)); } };
google
android
nontype19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/nontype19.C
251
utf_8
03c70922eb3eb5694336f20230eab2eb
// PR c++/42466 template<class IntT, IntT X> struct A { A(); template<IntT X2> A(const A<IntT, X2>& other); }; int main(int argc, char** argv) { A<int, 42> a; A<int, 100> b = a; A<unsigned, 42u> c; A<unsigned, 100u> d = c; }
google
android
field1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/field1.C
137
utf_8
f8aa89e0edae3ef78836a8cc046f0550
struct A { void (*f)(void); }; template< typename R > struct B : public A { void g() { A::f(); } }; template class B<bool>;
google
android
string1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/string1.C
70
utf_8
e7593ecf5b119a379bc82dc107ccab12
// PR c++/28337 template <int> void foo() { (0 ? "" : "X") + 1; }
google
android
member7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/member7.C
243
utf_8
a1171f569cb38a793af833ae3af0599e
// PR c++/29080 struct Base { template<class C> void method() { } }; struct Left : public Base { }; struct Right : public Base { }; struct Join : public Left, public Right { }; void function() { Join join; join.Left::method<int>(); }
google
android
dtor9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/dtor9.C
118
utf_8
b9b01dec580fb1da9d89837046c6a698
// PR c++/60347 struct A; template <class T> struct B { T* p; virtual ~B() { p->~T(); } }; struct C: B<A> { };
google
android
sfinae22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/sfinae22.C
1,014
utf_8
1fdab6f1e5a41713c8433d763d7d47ed
// PR c++/44908 // { dg-do compile { target c++11 } } #include <utility> struct A { }; struct B : public virtual A { }; template<typename From, typename To> class mini_is_convertible { typedef char one; typedef struct { char arr[2]; } two; template<typename To1> static void test_aux(To1); ...
google
android
conv5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/conv5.C
386
utf_8
65388659b6ed4f0befbd55edf3402b26
// { dg-do compile } // PR 764. Failed to find friend in overload resolution template <class T> struct S { friend bool operator== (const S&, const S&) { return true; } }; int main () { // S<int> s; const S<int> *p = 0; *p == *p; // error }
google
android
lookup2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/lookup2.C
365
utf_8
e1e6ffb2ea2a524c64cbcc0a6f97459a
// { dg-do compile } // PR 11617: Failed to diagnose missing function. struct B {}; template <typename T> void Bar () { T::foo (); // { dg-error "is not a member of" "" } } void Foo () { Bar<B> (); // { dg-message "required" "" } }
google
android
unify4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/unify4.C
435
utf_8
feb3d3e768d415765fa75c15289189a8
// { dg-do compile } // PR 9437. We'd unify 'T *' with 'U C::*', which is obviously broken struct X { template <typename T> operator T* () const { return static_cast<T*> (0); } } null; struct A { int i; }; static void f (int A::* pmi) { } int main () { f (null); } // { dg-error "cannot convert" "" }
google
android
sizeof10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/sizeof10.C
125
utf_8
c3dde08186236701373c41bd64c9338e
// PR c++/23357 template<typename T> bool foo() { const long int i = sizeof(T) > 1 ? sizeof(T) : 0; return i > 0; }
google
android
spec3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/spec3.C
326
utf_8
f5581de159c7b5592926840478d5c5fb
// PR c++/3870 // Test that performing a type instantiation in order to match up a // specialization doesn't clobber last_function_parms. template <class T> struct A { typedef int I; }; template <class T> inline typename T::I foo (typename T::I, const T*); template <> int foo (int i, const A<long>*) { return i +...
google
android
cond6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/cond6.C
82
utf_8
4dd7f1eb24dbb37103343db71513bcb3
// PR c++/27801 template<int> int foo(int i) { return !( (1 && i) ? 0 : 1 ); }
google
android
array8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/array8.C
283
utf_8
9135445bfc294af3cf8b77142f5e8782
// PR c++/18121 // We were trying to layout the array // type but since the type/value of A<N>::i // was not known at template declation type, // we were crashing template<int> struct A { static int const i = 1; }; template<int N> struct B { typedef int (*p)[A<N>::i]; };
google
android
crash80
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/crash80.C
190
utf_8
c9dc4ab7acea171537b7ea2d00500ffa
// PR c++/37087 namespace a { template <typename T> class Foo; } namespace b { template <> class ::a::Foo<double> {}; // { dg-error "global qualification of class name is invalid" } }
google
android
canon-type-11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/canon-type-11.C
479
utf_8
839b78a8760c0ceeabf6faa7c1d3df53
// { dg-do compile } template<class T> struct C { void bar(); }; template<class T> void C<T>::bar() { } template<class U, template<class TT0_T0> class TT0 = C, template<class TT1_T0> class TT1 = TT0> struct S { C<U> s; void foo(TT1<U>); void bar() { foo(s); } }; template<class T, template<class TT...
google
android
using14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/using14.C
318
utf_8
38f3caa7ff64898ee3a493900a978770
// PR c++/26102 template <class T> struct B1 { int i(); }; struct B2 { int i(); }; template <class T> struct C : public B1<T>, public B2 { using B2::i; void f() { i(); // should be accepted i.i(); // { dg-error "member" } } }; int main() { C<int> c; c.f(); // { dg-message "required" } }
google
android
sizeof2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/sizeof2.C
281
utf_8
6ebf0c32bb2f9f68d5de8a2eb380e74b
// { dg-do compile } template<int size> struct Foobar { // Contents irrelevant }; template <typename A> struct Wrapper { // Contents irrelevant }; template <typename A> Foobar<sizeof(Wrapper<A>)> * compiler_bug (A) { return 0; } int main() { compiler_bug(1); }
google
android
typedef2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/template/typedef2.C
164
utf_8
91560e6058fa7ce0edbd4239eb12b810
// PR c++/18155 template<int> typedef struct A; // { dg-warning "'typedef' was ignored" } // { dg-error "" "" { target *-*-* } 3 }