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
chromium
initlist23
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist23.C
195
utf_8
8d226b5ec13a739254991dee1a2a148e
// { dg-options "-std=c++0x" } #include <initializer_list> struct A { A& operator=(int i); A& operator=(std::initializer_list<int> l) { return *this; } }; int main() { A a; a = { }; }
google
chromium
variadic78
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic78.C
387
utf_8
2ff11a0463d3e57479047361f5d7b46f
// PR c++/33496 // { dg-do compile } // { dg-options "-std=gnu++0x" } template<int M, int N> struct pair { int i, j; pair () : i (M), j (N) {} }; template<int... M> struct S { template<int... N> static int *foo () { static int x[] = { (M + N)... }; // { dg-error "mismatched argument pack lengths" } re...
google
chromium
bracket2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/bracket2.C
343
utf_8
11a41d54cdbb269d3b249a115afe87b3
// { dg-do "compile" } // { dg-options "-std=gnu++0x" } template<int i> class X { /* ... */ }; X< 1>2 > x1; // // { dg-error "numeric constant" } X<(1>2)> x2; // Okay. template<class T> class Y { /* ... */ }; Y<X<1>> x3; // Okay, same as "Y<X<1> > x3;". Y<X<6>>1>> x4; // { dg-error "numeric constant" } Y<X...
google
chromium
variadic-init
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-init.C
934
utf_8
e27f5d2cf1ffacc9b03605f63974cadf
// { dg-do run } // { dg-options "-std=gnu++0x" } // PR c++/33510 #define SIZE_FROM_CTOR extern "C" void abort (); template<int M, int N> struct pair { int i, j; pair () : i (M), j (N) {} }; template<int... M> struct S { template<int... N> static int *foo () { #ifdef SIZE_FROM_CTOR static int x[] = { (M ...
google
chromium
variadic-rref
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-rref.C
543
utf_8
c7998c4ac21872f368cab23c1418557f
// { dg-options "-std=c++0x" } // PR c++/33939 template<typename T> struct refs_only; template<typename T> struct refs_only<T &> {}; template<typename T> refs_only<T> foo( T && t) { return refs_only<T>(); } template<typename... T> struct va_refs_only; template<typename T> struct va_refs_only<T> : refs_only<T>...
google
chromium
vt-37737-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C
202
utf_8
8bc89288f021b015995e462427a20d65
// { dg-options "-std=c++0x" } template<class U, class... T> void f() { f<T...>(); // { dg-error "no matching" } } template<> void f() { } // { dg-error "template-id" } int main() { f<char>(); }
google
chromium
variadic56
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic56.C
448
utf_8
e40e17dbd8292e2f422b8b91bbee4dd0
// { dg-options "-std=gnu++0x" } template<typename... Elements> struct tuple { }; template<typename T, typename... Elements> struct tuple<T, Elements...> { int foo(); }; template<typename T, typename... Elements> struct tuple<T*, Elements...> { int bar(); }; template<typename T, typename... Elements> int tuple<T...
google
chromium
decltype5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype5.C
735
utf_8
9a0d270d04b89211fe181dede77f30d9
// { dg-do "compile" } // { dg-options "-std=gnu++0x" } template<typename T, typename U> struct is_same { static const bool value = false; }; template<typename T> struct is_same<T, T> { static const bool value = true; }; #define CHECK_DECLTYPE(DECLTYPE,RESULT) \ static_assert(is_same< DECLTYPE , RESULT >::va...
google
chromium
variadic27
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic27.C
620
utf_8
e1c1c803b8b835b458fc646fcad89176
// { dg-options "-std=gnu++0x" } template<typename Signature> struct function_traits; template<typename R, typename... ArgTypes> struct function_traits<R(ArgTypes...)> { typedef R result_type; }; template<typename T, typename U> struct same_type { static const bool value = false; }; template<typename T> struct s...
google
chromium
pr34054
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr34054.C
137
utf_8
bbcc78c712a69424c96cae056e31513a
// PR c++/34054 // { dg-do compile } // { dg-options "-std=c++0x" } template<typename... T> T foo() {} // { dg-error "not expanded|T" }
google
chromium
decltype-refbug
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype-refbug.C
317
utf_8
5be5466d65fc05f7bff75fd042614d66
// { dg-options "-std=c++0x" } // PR c++/33045 int && f (); template<typename T, typename U> struct is_same { static const bool value = false; }; template<typename T> struct is_same<T, T> { static const bool value = true; }; static_assert(is_same<decltype(f()), int&&>::value, "decltype of rvalue reference");
google
chromium
rv9p
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv9p.C
276
utf_8
b873eb6dd4e6daa5c9f634ffe8e7b919
// PR c++/36744 // { dg-options "-std=c++0x" } // { dg-do run } struct S { S(): i(2) {} S(S const&s): i(s.i) {} int i; }; void f(S x) { x.i = 0; } extern "C" void abort (void); int main() { S y; f(static_cast<S&&>(y)); if (y.i != 2) abort (); return 0; }
google
chromium
variadic48
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic48.C
173
utf_8
a57a0da544372c92597786efed9659fd
// { dg-options "-std=gnu++0x" } template<typename T, typename... Args> int& f(const T&, Args...); template<typename T> float& f(const T&); float& g() { return f(17); }
google
chromium
variadic72
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic72.C
243
utf_8
abcb3f8130d4cb79480994b5d80f646c
// { dg-options "-std=gnu++0x" } struct A {}; struct B {}; struct C {}; template<typename... Mixins> struct mixed_up : public Mixins... { }; void fA(A); void fB(B); void g() { mixed_up<A, B, C> m; fA(m); fB(m); fC(m); }
google
chromium
decltype8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype8.C
370
utf_8
bbdff105c665351973aaa6a25eaa0940
// PR c++/34267 // { dg-do compile } struct A {}; __decltype (A); // { dg-error "must be an expression" } template<int> struct B { __decltype (A); // { dg-error "must be an expression" } __decltype (~A); // { dg-error "must be an expression" } __decltype (B); // { dg-error "must be an expression" } __decltype...
google
chromium
variadic9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic9.C
810
utf_8
39a4617d5385099583397f9c019a4b4c
// { dg-options "-std=gnu++0x" } template<typename T1, typename T2> struct pair {}; template<typename... Args> struct tuple { static const int value = 0; }; template<> struct tuple<pair<int, float> > { static const int value = 1; }; template<typename U> struct tuple<pair<int, U> > { static const int value = 2;...
google
chromium
variadic-ex3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
258
utf_8
39f75b28d44e8689996e60919723e838
// { dg-options "-std=gnu++0x" } template<class X, class Y, class... Z> X f(Y); void g() { int i = f<int>(5.6); int j = f(5.6); // { dg-error "no matching" } f<void>(f<int, bool>); f<void>(f<int>); // { dg-error "no matching" } }
google
chromium
pr31445
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31445.C
164
utf_8
addbcb87d162dffbefde94ee17a3d0e7
// { dg-options "-std=gnu++0x" } template <typename... T> struct A { void foo(T...); A(T... t) { foo(t); } // { dg-error "parameter packs|t" } }; A<int> a(0);
google
chromium
variadic8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic8.C
451
utf_8
d0dc500406e92f2a7bf9d8ec9c78c329
// { dg-options "-std=gnu++0x" } template<typename... Args> struct tuple_base { static const int value = 0; }; template<> struct tuple_base<int*> { static const int value = 1; }; template<typename T> struct tuple_base<T*> { static const int value = 2; }; template<typename... Args> struct tuple_of_pointers : tu...
google
chromium
variadic70
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic70.C
407
utf_8
10204de9c91628ca99f21bf18b22b06d
// { dg-do "run" } // { dg-options "-std=gnu++0x" } template <typename T, T... Args> struct bomb; template <typename T> struct bomb<T> { static const T value = 0; }; template <typename T, T v, T... Args> struct bomb<T, v, Args...> { static const T value = v + bomb<T, Args...>::value; }; extern "C" void abort(); i...
google
chromium
overload-conv-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/overload-conv-1.C
288
utf_8
3a17cd678756b6b530cc9d447f967678
// { dg-options "--std=c++0x" } // { dg-do link } struct S {}; struct T { operator S() { return S(); } }; struct U { operator S&() { return *static_cast<S*>(0); } }; void f(const S&); void f(S&&) {} void g(const S&) {} void g(S&&); int main() { T t; f(t); U u; g(u); }
google
chromium
auto7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto7.C
285
utf_8
8556d6750a30e8542f3922be9b89a92e
// PR c++/37965 // Negative test for auto // { dg-options "-std=c++0x" } auto i = 6; auto j; // { dg-error "has no initializer" } template<int> struct A { static auto k = 7; static auto l; // { dg-error "has no initializer" } auto m; // { dg-error "has no initializer" } };
google
chromium
pr33955
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr33955.C
770
utf_8
df1e87feaf65676ae83648e44c557581
// { dg-options "-std=c++0x" } template<typename T> struct uncvref { typedef T type; }; template<typename... Args> struct args { static const int size = sizeof...(Args); }; template<typename G, typename E, typename S, typename V, long GN = G::size, long EN = E::size> struct apply_args; template<typename... G, ty...
google
chromium
variadic-mem_fn
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C
1,044
utf_8
532fc7f93bb229494e92be11cfcf8152
// { dg-options "-std=gnu++0x" } // { dg-do "run" } // A basic implementation of TR1's mem_fn using variadic teplates #include <cassert> template<typename R, typename Class, typename... Args> class Mem_fn { public: explicit Mem_fn(R (Class::*pmf)(Args...)) : pmf(pmf) { } R operator()(Class& object, Args... args) ...
google
chromium
initlist3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist3.C
143
utf_8
ebf07d4ed58e4156777e047923969c63
// { dg-options "-std=c++0x" } #include <initializer_list> template <class T> void f(std::initializer_list<T>); void g() { f({1,2,3}); }
google
chromium
auto10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto10.C
318
utf_8
48f61f18a7cb3cb48d7aa3d0ca0e9653
// Positive test for auto // { dg-do run } // { dg-options "-std=c++0x" } #include <typeinfo> extern "C" void abort(); int main() { if (auto i = 42L) { if (typeid (i) != typeid (long int)) abort (); } while (auto i = 1) { if (typeid (i) != typeid (int)) abort (); break; } }
google
chromium
variadic88
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic88.C
334
utf_8
32cce31ef2c89f2acbe149f22af0fd89
// { dg-options "-std=c++0x" } template<template<typename...> class TT> TT<int, float, double> foo(TT<int, float>) { return TT<int, float, double>(); } template<typename T> int& foo(T) { static int i = 0; return i; } template<typename T, typename U> struct pair {}; void bar() { pair<int, float> p; int& i...
google
chromium
decltype-38655
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C
101
utf_8
51bee11248b9515ebb07cbd465c4fc47
// PR c++/38655 // { dg-options "" } __decltype(0r)* p = 1; // { dg-error "not supported|invalid" }
google
chromium
variadic17
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic17.C
693
utf_8
3053d79335fc919b210a3cc63f124ff4
// { dg-options "-std=gnu++0x" } template<typename R, typename... ArgTypes> struct make_function_type { typedef R type(const ArgTypes&......); }; template<typename T, typename U> struct is_same { static const bool value = false; }; template<typename T> struct is_same<T, T> { static const bool value = true; }; ...
google
chromium
defaulted8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted8.C
189
utf_8
e4eda3d1136f1741945b988346e3fedf
// PR c++/38649 // { dg-options "-std=c++0x" } struct A { A(...) = default; // { dg-error "cannot be defaulted" } A(const A&, ...) = default; // { dg-error "cannot be defaulted" } };
google
chromium
bracket4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/bracket4.C
447
utf_8
36e9e29872771c502d6bd3626d7e167f
// { dg-do "compile" } // { dg-options "-std=c++0x" } template<typename T> struct vector { }; struct X { template<typename T> struct tmpl { operator T() const; }; }; template<typename T> void g() { T::template tmpl<vector<int>>() + 2; } template<typename T> void operator+(vector<T>, int); void f() { ...
google
chromium
decltype16
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype16.C
338
utf_8
c00e5bacd6ac200e6550fc2d6d4ac73e
// PR c++/39070 // { dg-options "-std=c++0x" } template<typename X> struct junk { template<typename Z> static Z y(); template<typename Y> static int test(...); template<typename Y> static char test(decltype(y<Y>())*); static int const value=sizeof(test<X>(0)); }; typedef char type[junk<int>::value==sizeof...
google
chromium
vt-34754
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34754.C
182
utf_8
1cfb3c958fc83ba360a143ded32ea720
// { dg-options "-std=c++0x" } template<template<int> class... T> struct A { void foo(T<0>); // { dg-error "not expanded|T" } void bar(T<0>); // { dg-error "not expanded|T" } };
google
chromium
variadic90
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic90.C
150
utf_8
f80347db0d73cb0924ddb0b6f5e9f810
// { dg-options "-std=c++0x" } template<template<typename...> class TT> struct X { }; template<typename T, typename U> struct pair { }; X<pair> x;
google
chromium
temp-constructor-bug
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/temp-constructor-bug.C
118
utf_8
fc6f2e96c9f8ec014c9c4aa1c6219117
// { dg-options "--std=c++0x" } struct S { }; struct T { S s; }; void f(T const &); void g() { f((T){S()}); }
google
chromium
rv1n
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv1n.C
4,541
utf_8
515c22f2491f2538ef1856d4849193c8
// I, Howard Hinnant, hereby place this code in the public domain. // Test overlaod resolution among referece types // { dg-do compile } // { dg-options "-std=c++0x" } template <bool> struct sa; template <> struct sa<true> {}; struct one {char x[1];}; struct two {char x[2];}; struct three {char x[3];}; struct f...
google
chromium
pr31431
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31431.C
146
utf_8
7eb11551d854e0c87cc2b229bf388094
// { dg-options "-std=gnu++0x" } template<typename..., typename> void foo(); void bar() { foo<int>(); // { dg-error "no matching function" } }
google
chromium
variadic73
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic73.C
491
utf_8
7025864b5e6a3ee61f7bf140a97d6b90
// { dg-do "run" } // { dg-options "-std=gnu++0x" } struct A {}; struct B {}; struct C {}; template<typename... Exceptions> void f(int idx) throw(Exceptions...) { if (idx == 0) throw A(); else if (idx == 1) throw B(); else if (idx == 2) throw C(); } extern "C" void abort(); int main() { try { f<A, B, C>(0);...
google
chromium
rv2n
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv2n.C
11,047
utf_8
2e4634a4536f9a33b503f1c17c37e809
// I, Howard Hinnant, hereby place this code in the public domain. // Test overlaod resolution among referece types // { dg-do compile } // { dg-options "-std=c++0x" } template <bool> struct sa; template <> struct sa<true> {}; struct one {char x[1];}; struct two {char x[2];}; struct three {char x[3];}; struct f...
google
chromium
pr31438
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31438.C
237
utf_8
825669c06b592081ee46c7b3f2839a43
// { dg-options "-std=gnu++0x" } template<typename> struct A; template<typename T, typename... U> struct A<T(U)> // { dg-error "parameter packs|U" } { template<typename X> A(X); }; A<void(int)> a(0); // { dg-error "incomplete type" }
google
chromium
auto11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto11.C
190
utf_8
fc9eb91216b67d1f8b1342c8b7039163
// PR c++/38256 // { dg-options "-std=c++0x" } template<int> struct A { template<typename T> operator T(); }; void foo() { A<0>().operator auto(); // { dg-error "auto.*conversion" } }
google
chromium
variadic2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic2.C
503
utf_8
be09491ac08d1c7bda2bd004c7a559e9
// { dg-options "-std=gnu++0x" } template<typename... Args = int> // { dg-error "default argument" } class tuple2; template<typename... = int> // { dg-error "default argument" } class tuple3; template<typename T1, typename T2, typename... Rest> struct two_or_more {}; // { dg-error "provided for" } typedef two_or_mor...
google
chromium
variadic23
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic23.C
561
utf_8
7615032e452443ba81dd6860d86129d7
// { dg-options "-std=gnu++0x" } template<typename T, int... Dims> struct array { static const int value = 0; }; template<> struct array<int, 17> { static const int value = 1; }; template<int... Dims> struct array<float, 1, Dims...> { static const int value = 2; }; template<typename T, int... Dims> struct arr...
google
chromium
variadic42
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic42.C
282
utf_8
882edd920ddef1a6fbd93d4332151817
// { dg-options "-std=gnu++0x" } // { dg-do compile } template<typename... Args> void f(Args...) { } void g() { f<int*, float*, double*>(0, 0, 0); f<int*>(0,0,0); } // { dg-final { scan-assembler "_Z1fIIPiPfPdEEvDpT_" } } // { dg-final { scan-assembler "_Z1fIIPiiiEEvDpT_" } }
google
chromium
bracket1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/bracket1.C
251
utf_8
8de576619233b452b8827b9ad733a5fd
// { dg-do "compile" } // { dg-options "-std=gnu++0x" } template<typename T> struct list {}; template<typename T> struct vector { operator T() const; }; void f() { vector<vector<int>> v; const vector<int> vi = static_cast<vector<int>>(v); }
google
chromium
decltype7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype7.C
267
utf_8
c3626f3b26fbb53bd234a4e39649b63f
// PR c++/34268 // { dg-do compile } struct A { __decltype (A); // { dg-error "must be an expression" } __decltype (~A); // { dg-error "must be an expression" } }; struct B { __typeof__ (B); __typeof__ (~B); // { dg-error "expected primary-expression" } };
google
chromium
pr32125
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr32125.C
153
utf_8
50b3b289f7f997c655ffb07822094555
// { dg-options "-std=c++0x" } template<typename...> struct A; template<typename...T> struct A<T*> // { dg-error "not expanded|T" } { A(); A(T); };
google
chromium
variadic-crash2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C
377
utf_8
554a7c17abf02e2bda69bbb7d98c12dd
// Origin: PR c++/39637 // { dg-options "-std=gnu++0x" } // { dg-do "compile" } template<class... Types> void f(Types...) { enum {e = sizeof(Types)}; // { dg-error "parameter packs not expanded with '...'" } enum {e1 = sizeof...(Types)}; } int main() { f(0); } // { dg-message "note" "Types" { target *-*-* } 10 ...
google
chromium
trailing2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/trailing2.C
469
utf_8
dff8e484f5ebc462a610d96381bb6352
// PR c++/37967 // Negative test for auto // { dg-options "-std=c++0x" } auto f1 () -> int; auto f2 (); // { dg-error "without late return type" } int f3 () -> int; // { dg-error "late return type" } auto *f4 () -> int; // { dg-error "late return type" } struct A { auto f5 () const -> int; auto f6 (); // { dg-e...
google
chromium
decltype11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype11.C
130
utf_8
b1ca5344811760f6e82c858f672bd0f6
// PR c++/35316 // { dg-options "-std=c++0x" } template<int> struct A { int i : 2; void foo() { decltype(i) j; } };
google
chromium
variadic44
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic44.C
232
utf_8
e9bb2fef020609c3ee50141c2338a550
// { dg-options "-std=gnu++0x" } // { dg-do compile } template<typename... Args> int f(const Args&...); template<typename T> void g(T) { } void h() { g(&f<int, float>); } // { dg-final { scan-assembler "_Z1gIPFiRKiRKfEEvT_"} }
google
chromium
variadic21
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic21.C
149
utf_8
57823f63ca045ff8b8c15796278b39d1
// { dg-options "-std=gnu++0x" } template<typename T, int... Dims> struct array { }; array<int> a0; array<int, 1> a1; array<int, 1, 2, 3, 4> a1234;
google
chromium
trailing5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/trailing5.C
178
utf_8
d0d8f484e5d5d333ca0101b985fc1397
// PR c++/38798, DR 770 // { dg-options -std=c++0x } struct A {}; auto foo() -> struct A {} enum B {}; auto bar() -> enum B {} auto baz() -> struct C {} {} // { dg-error "" }
google
chromium
static_assert2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/static_assert2.C
726
utf_8
8cbc91f4f007ae34557f6cc27a860398
// { dg-options "-std=c++0x" } template<int I> struct accept_evens { static_assert( I % 2 == 0, "I must be an even number"); // { dg-error "even number" } }; template<int I> struct accept_evens_ok { static_assert( I % 2 == 0, "I must be an even number"); }; template<int I> void accept_odds() { static_assert( I ...
google
chromium
variadic65
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic65.C
323
utf_8
ffb178f32d948f5a5c9a54d7f36d2e2e
// { dg-options "-std=gnu++0x" } struct unused; template<typename T1 = unused, typename T2 = unused, typename T3 = unused, typename T4 = unused, typename T5 = unused, typename T6 = unused> struct tuple {}; template<typename... Args> void foo(tuple<Args...>) { } // { dg-bogus "cannot expand" "" { xfail *-*-* }...
google
chromium
extern_template-3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/extern_template-3.C
153
utf_8
a90d02344ce471556a85a9970c53f219
// PR c++/37256 // { dg-options "-O" } template <typename T_> struct B { T_ f(); }; extern template class B<int>; void f() { B<int> t; t.f(); }
google
chromium
variadic12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic12.C
1,144
utf_8
55e99e1f39f96e8dde30908350a29ef4
// { dg-options "-std=gnu++0x" } // A tuple type template<typename... Args> struct tuple { }; // Determine if two types are the same template<typename T, typename U> struct is_same { static const bool value = false; }; template<typename T> struct is_same<T, T> { static const bool value = true; }; // Append 'T' t...
google
chromium
decltype4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype4.C
1,938
utf_8
859540e19d872366f2581f5571ade110
// { dg-do "compile" } // { dg-options "-std=gnu++0x" } template<typename T, typename U> struct is_same { static const bool value = false; }; template<typename T> struct is_same<T, T> { static const bool value = true; }; #define CHECK_DECLTYPE(DECLTYPE,RESULT) \ static_assert(is_same< DECLTYPE , RESULT >::va...
google
chromium
variadic58
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic58.C
380
utf_8
78d145f1910f8b120ca926a7f9715581
// { dg-options "-std=gnu++0x" } #include <typeinfo> template<typename... Args> void foo(Args...) { } template<typename... Args> void bar(Args... args) { foo(Args()...); foo(args = args...); foo(reinterpret_cast<void*>(&args)...); foo(const_cast<const Args>(args)...); foo(static_cast<void*>(&args)...); fo...
google
chromium
pr33930
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr33930.C
169
utf_8
ed8d33150d8adcb5ff8de3100148a57a
// { dg-options "-std=c++0x" } typedef const int* type; float& foo( const type& ggg ); int& foo( type&& ggg ); void bar( int* someptr ) { int& x = foo( someptr ); }
google
chromium
pr39639
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr39639.C
457
utf_8
96e51d00f882d1f43b035d7c6b88a69a
// Origin: PR c++/39639 // { dg-options "-std=c++0x" } // { dg-do "compile" } template <class... Types> struct S : S<...Types>, // { dg-error "expected parameter pack before '...'" } S<...Types...>, // { dg-error "expected parameter pack before '...'" } S<...> // { dg-error "expected parameter pack before '.....
google
chromium
variadic32
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic32.C
166
utf_8
fac9060fdc968ccc2abbb2e4e031e333
// { dg-options "-std=gnu++0x" } template<typename... T> void eat(const T&...) { } void f() { eat(); eat(1); eat(1, 2); eat(17, 3.14159, "Hello, World!"); }
google
chromium
decltype10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype10.C
211
utf_8
cd06903b180590e9b430016409918b61
// PR c++/34271 // { dg-do compile } // { dg-options "-std=c++0x" } template<int> struct A { static int i; }; template<int N> int A<N>::i(decltype (A::i; // { dg-error "expected primary-expression before" }
google
chromium
defaulted1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted1.C
508
utf_8
dcbdd542e2a8c2332e6116fb05995fba
// Positive test for defaulted/deleted fns // { dg-do run } // { dg-options "-std=c++0x" } struct A { int i; A() = default; A(const A&) = delete; A& operator=(const A&) = default; ~A(); }; A::~A() = default; void f() = delete; struct B { int i; B() = default; }; int main() { A a1, a2; B b = {1}; ...
google
chromium
rv8p
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv8p.C
1,601
utf_8
db9c73cee851a3426d9f24047e6126c4
// I, Howard Hinnant, hereby place this code in the public domain. // Test overlaod resolution among referece types // { dg-do compile } // { dg-options "-std=c++0x" } template <bool> struct sa; template <> struct sa<true> {}; struct one {char x[1];}; struct two {char x[2];}; struct three {char x[3];}; struct f...
google
chromium
vt-35023
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-35023.C
154
utf_8
2b38f59ec8e6d60420f891e4a59bd87e
// { dg-options "-std=c++0x" } template<typename... T> int foo() { T t; // { dg-error "parameter packs|T" } return t; } void bar() { foo<int>(); }
google
chromium
inline-ns3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/inline-ns3.C
175
utf_8
3d2ad7021dde84320aec4eda4fa51879
namespace C { void f(); } namespace B { using namespace C; inline namespace B1 { void f(); } } namespace A { using namespace B; } int main() { A::f(); }
google
chromium
variadic49
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic49.C
134
utf_8
abee30ec4450ea9478294337b34444d2
// { dg-options "-std=gnu++0x" } int& f(...); template<typename... Args> float& f(Args...); float& g() { return f(17, 3.14159); }
google
chromium
vt-34753
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34753.C
248
utf_8
eacfe743dafefa8e5b45ff340b870465
// { dg-options "-std=c++0x" } template<typename... T> struct A { template<T> struct B {}; // { dg-error "not expanded|T" } }; A<int>::B<0> b; template<typename... T> struct B { template<T> B(); // { dg-error "not expanded|T" } }; B<int> c;
google
chromium
vt-35331
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-35331.C
159
utf_8
a3ddb240ea5bf754f530e48afeaf5506
// { dg-options "-std=c++0x" } template<typename...> struct A; template<typename...T> struct A<T*> // { dg-error "not expanded|T" } { friend void foo(); };
google
chromium
rv10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv10.C
152
utf_8
5cd3e13f4cef7d25383fdec4ba84fae2
// { dg-options "-std=gnu++0x" } struct A { A() = default; A(const A&) = delete; }; A&& f(); void h(A&&); void g() { A&& arr = f(); h(f()); }
google
chromium
initlist8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist8.C
145
utf_8
d3a348c4b49e1b0531708a46d1a74cce
// PR c++/37740 // { dg-options "-std=c++0x" } struct A { int i; }; struct B { double d; A i; }; int main() { A a; new B{3.2, a}; }
google
chromium
vt-35242
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-35242.C
162
utf_8
ffb7b95267980086fce519711a782435
// { dg-options "-std=c++0x" } struct A { template<typename... T> struct B; }; template<typename... T> struct A::B<T*> {}; // { dg-error "parameter packs|T" }
google
chromium
trailing1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/trailing1.C
2,206
utf_8
90079c108a8e599c1967a81adc4208dd
// Tests for late-specified return type. // { dg-options "-std=c++0x" } auto f() -> int { return 0; } template<class T, class U> auto add(T t, U u) -> decltype (t+u) { return t+u; } template<class T, class U> decltype(T()+U()) add2(T t, U u) { return t+u; } template <class T, class U> U ag (T, U) { return U...
google
chromium
vt-34055
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34055.C
672
utf_8
c2357ee79aa07dbc9e108c0c7ad46133
// { dg-options "-std=c++0x" } // PR c++/34055 template<typename...> struct A; template<typename...T> struct A<T*> // { dg-error "parameter packs|T" } { void foo(); }; template<typename...T> void A<T*>::foo() {} // { dg-error "invalid declarator" } template<typename...> struct B; template<typename...T> struct B...
google
chromium
vt-34755
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34755.C
221
utf_8
0f764787d40ed4f9f7ad1a7c54e7bc2b
// { dg-options "-std=c++0x" } template<typename> struct A {}; template<template<typename> class... T> void foo(T<int>) {} // { dg-error "not expanded|T" } template void foo<A>(A<int>); // { dg-error "does not match" }
google
chromium
auto15
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto15.C
241
utf_8
e3505db416fb041ea0d0db503cc713f1
// { dg-options "-std=c++0x" } template< typename Fn > struct function; template< typename Result, typename ... ArgTypes > struct function< auto (ArgTypes...)->Result > { }; int main() { function< auto(double)->int > y; return 0; }
google
chromium
rv4n
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv4n.C
23,942
utf_8
0a9fa2b71927c4fbeab0d8e5a0984da7
// I, Howard Hinnant, hereby place this code in the public domain. // Test overlaod resolution among referece types // { dg-do compile } // { dg-options "-std=c++0x" } template <bool> struct sa; template <> struct sa<true> {}; struct one {char x[1];}; struct two {char x[2];}; struct three {char x[3];}; struct f...
google
chromium
variadic61
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic61.C
122
utf_8
fc2fc2c87d783c7e4469a5ddeec5b902
// { dg-options "-std=gnu++98 -pedantic" } template<typename... Args> class tuple; // { dg-warning "variadic templates" }
google
chromium
variadic45
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic45.C
174
utf_8
cb52c389d45c5f0d316d702504602e56
// { dg-options "-std=gnu++0x" } template<typename... Args> int& f(Args...); template<typename T1, typename T2> float& f(T1, T2); float& g() { return f(17, 3.14159); }
google
chromium
variadic92
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic92.C
1,357
utf_8
52ab8919bc0cd7496f7516a7181f8a64
// Various tests for variadic templates and partial specialization. // { dg-options "-std=c++0x" } // PR c++/36846 template<typename A, typename B> struct pair; template<typename... T> struct pairs; template<typename... AS, typename... BS> struct pairs<pair<AS, BS>...> { struct mismatched_packs {}; }; template cl...
google
chromium
variadic37
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic37.C
265
utf_8
07ad629a9fe7358117b28c60d1d1916e
// { dg-options "-std=gnu++0x" } template<typename... Values> struct tuple { static const __SIZE_TYPE__ length = sizeof...(Values); }; int a0[tuple<>::length == 0? 1 : -1]; int a1[tuple<int>::length == 1? 1 : -1]; int a2[tuple<int, float>::length == 2? 1 : -1];
google
chromium
rv2p
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv2p.C
14,749
utf_8
2c4bd4b466f8ccc772160cc823ec1a40
// I, Howard Hinnant, hereby place this code in the public domain. // Test overlaod resolution among referece types // { dg-do compile } // { dg-options "-std=c++0x" } template <bool> struct sa; template <> struct sa<true> {}; struct one {char x[1];}; struct two {char x[2];}; struct three {char x[3];}; struct f...
google
chromium
vt-34103
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34103.C
245
utf_8
4ce2ee23d4adb071c7bf282eebc82eb3
// { dg-options "-std=c++0x" } // PR c++/34103 template<typename> struct A {}; template<typename...T> void foo(A<T>, A<T>); // { dg-error "parameter packs|T" } template<typename...T> void foo(A<T>, A<T>) {} // { dg-error "parameter packs|T" }
google
chromium
variadic66
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic66.C
177
utf_8
c3f06cf86e54c908fb0645bdc2f64ad6
// { dg-options "-std=gnu++0x" } template<typename Result, typename Functor, typename... ArgTypes> Result bind(Functor, ArgTypes...) { } void f() { bind<int>(17, 20, 22); }
google
chromium
vt-35024
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-35024.C
166
utf_8
6de03c7edd71c45e3ff9011def618a5d
// { dg-options "-std=c++0x" } template<typename... T> int foo() { typename T::X x; // { dg-error "parameter packs|T" } return x; } void bar() { foo<int>(); }
google
chromium
defaulted4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted4.C
460
utf_8
c163e76b6fe04152df8ad492d1575982
// PR c++/37208: SFINAE and deleted functions. // { dg-options "-std=c++0x" } // { dg-do compile } template<int> struct A { }; template<typename T> int& int_if_addable(A<sizeof((*(T*)0) + (*(T*)0))>*); template<typename T> float& int_if_addable(...); struct X { }; struct Y { }; Y operator+(Y, Y); struct Z { }; Z ...
google
chromium
variadic96
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic96.C
418
utf_8
41e12174fa168c73046b0c0637085a21
// Origin: PR c++/41785 // { dg-options -std=c++0x } struct a {}; template < typename T, typename ENCLOSING > struct base; template < typename... T > struct derived : public base< T, derived< T... > >... {}; template < typename... T> struct base< a, derived< T... > > { typedef derived< T... > Derived; }; ...
google
chromium
bind
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/bind.C
83
utf_8
50977a1e531cb1b5874af1663f7aa4f2
// { dg-options "--std=c++0x" } struct S{}; void f(S&&); int main() { f(S()); }
google
chromium
initlist10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist10.C
992
utf_8
73fd140acb60b79673309a4e733012ae
// PR c++/38380 // { dg-options "-std=gnu++0x" } namespace std { struct atomic_bool { bool _M_i; atomic_bool() = default; ~atomic_bool() = default; atomic_bool(const atomic_bool&) = delete; atomic_bool& operator=(const atomic_bool&) = delete; explicit atomic_bool(bool __i) { _M_i = __i; } ...
google
chromium
temp_default2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/temp_default2.C
300
utf_8
b0614ce472042e86627bab8a9917ae6c
// { dg-options "-std=c++0x" } template <class T, class U = double> void f(T t = 0, U u = 0); void g() { f(1, 'c'); // f<int,char>(1,'c') f(1); // f<int,double>(1,0) f(); // { dg-error "no matching function" } f<int>(); // f<int,double>(0,0) f<int,char>(); // f<int,char>(0,0) }
google
chromium
variadic-ex7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex7.C
595
utf_8
872a012c63a609887bf1eb5f52fcc0d7
// { dg-options "-std=gnu++0x" } template<typename...> struct Tuple { }; template<typename... Types> char& g(Tuple<Types...>); // #1 template<typename T1, typename... Types> short& g(Tuple<T1, Types...>); // #2 template<typename T1, typename... Types> int& g(Tuple<T1, Types&...>); // #3 void f() ...
google
chromium
variadic43
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic43.C
141
utf_8
3822f7c45c969832af7c5cc9cfc85b75
// { dg-options "-std=gnu++0x" } template<typename... Args> int f(const Args&...); void g() { int (*fp)(const int&, const float&) = &f; }
google
chromium
pr33996
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr33996.C
622
utf_8
858f5b1e4bec1cc54033874898b4c20f
// { dg-options "-std=c++0x" } #define BUG struct type { type() { } type(const type&) { } private: type(type&&); }; template<typename _Tp> struct identity { typedef _Tp type; }; template<typename _Tp> inline _Tp&& forward(typename identity<_Tp>::type&& __t) { return __t; } struct vec { template<...
google
chromium
rv5p
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv5p.C
41,030
utf_8
8b9713189146673d291c40fa2aa20a8a
// I, Howard Hinnant, hereby place this code in the public domain. // Test overlaod resolution among referece types // { dg-do compile } // { dg-options "-std=c++0x" } template <bool> struct sa; template <> struct sa<true> {}; struct one {char x[1];}; struct two {char x[2];}; struct three {char x[3];}; struct f...
google
chromium
defaulted7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted7.C
288
utf_8
7ce42a1717ccdfef065fa2abb34b230c
// PR c++/38701, 38702 // { dg-options "-std=c++0x" } void foo() = default; // { dg-error "cannot be defaulted" } namespace { void bar() = default; // { dg-error "cannot be defaulted" } } enum E { e }; E& operator |= (E&, const E&) = default; // { dg-error "cannot be defaulted" }
google
chromium
initlist11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist11.C
203
utf_8
8dbe19ce3d5e8c97798e92453af88063
// PR c++/38684 // { dg-options "-std=c++0x" } #include <initializer_list> struct Y {}; struct X : Y { X(std::initializer_list<int>) {} }; struct A { X v; }; int main() { A a{ {1,2,3} }; }
google
chromium
vt-34219-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C
459
utf_8
2919779431c1c9526a08be75d89b5c3b
// { dg-options "-std=c++0x" } template<template<typename... T> class Comp, typename... T> void f( T... Value) { static_assert( Comp<T>::value > 0, "" ); // { dg-error "parameter packs|T" } } template<template<typename... T> class Comp, typename... T> void g( T... Value) { static_assert( Comp<T...>::value > 0, "" ...
google
chromium
initlist21
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist21.C
366
utf_8
1a171945afcdcbc357d5fbf41918feb6
// PR c++/40689 // { dg-options "-std=c++0x" } class X { public: X(): data {1,2} {} // { dg-error "too many initializers" } private: const short data[1]; }; int f(int n) { const float * pData = new const float[1] { 1.5, 2.5 }; // { dg-error "too many initializers" } pData = new const float[n] { 1.5, 2.5 }; ...
google
chromium
collapse-bug
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/collapse-bug.C
375
utf_8
7a2dbf79945c55067480b8e1f8c3a065
// { dg-options "--std=c++0x" } template<typename T, typename U> struct same_type; template<typename T> struct same_type<T, T> {}; template <typename T> struct S { typedef T const (&type)(); }; void f() { // initial implementation didn't ignore const qualifier on // reference, resulting in a typedef of 'const i...