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
range-for10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for10.C
204
utf_8
5c7a98d8ca2f0f427c081bf6902aa831
// PR c++/47388 // { dg-do compile { target c++11 } } // { dg-options "-fno-for-scope" } template <int> void foo () { int a[] = { 1, 2, 3, 4 }; for (int i : a) ; } void bar () { foo <0> (); }
google
android
udlit-overflow-neg
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-overflow-neg.C
633
utf_8
344d57aa16c13ef0216283abb5a8b7ca
// { dg-do compile { target c++11 } } // { dg-options "-Woverflow" } // PR c++/52654 int operator"" _w(unsigned long long) { return 0; } int operator"" _w(long double) { return 0.0L; } int i = 12345678901234567890123456789012345678901234567890_w; int j = 12345678901234567890123456789.012345678901234567890e+1234567890...
google
android
alias-decl-15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C
316
utf_8
4b201b60132f224fc12686fc0a3f4bbc
// Origin PR c++/51194 // { dg-do compile { target c++11 } } template<class U, class V> //#1 struct foo {}; template<class U, class V=char> struct P {}; template<template<class... U> class... TT> struct bar { template<class... Args> using mem = P<TT<Args...>...>;//#2 }; bar<foo>::mem<int, char> b;//#3
google
android
sfinae27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae27.C
391
utf_8
0536280ed60909ff627725d87a9e6fb6
// PR c++/50157 // { dg-do compile { target c++11 } } template<class T> T val(); template<class T, class Arg, class = decltype(::new T(val<Arg>())) > auto test(int) -> char; template<class, class> auto test(...) -> char (&)[2]; struct P { explicit operator bool(); // (#13) }; typedef decltype(test<bool, P>(0))...
google
android
initlist-postfix-open-square
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist-postfix-open-square.C
192
utf_8
e3ec7ab89d20e6ccf50aa92954896f07
// PR c++/51738 // { dg-do compile { target c++11 } } struct Index { Index(unsigned, unsigned){ } }; struct Matrix { void operator[](Index){ } }; int main() { Matrix m; m[{0,1}]; }
google
android
enum_base
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum_base.C
788
utf_8
bdc5d7cd7be42204d0e03646eed23b02
// { dg-do compile { target c++11 } } typedef unsigned volatile long long uvlonglong; enum E1 : char { }; enum E2 : signed const short { }; enum E3 : uvlonglong { }; enum E4 : char { val = 500 // { dg-error "outside the range" } }; enum class E5 { val = (unsigned long long)-1 // { dg-error "outside the range" }...
google
android
gen-attrs-35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-35.C
529
utf_8
7d665bb78f74cfeda5c7489ccd367115
// { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target c++11 } // { dg-options "-O3 -msse2" } // { dg-require-effective-target sse2 } // You can make NON-template typedefs with a large alignment. typedef double AlignedDoubleType [[gnu::aligned(16)]]; template <typename RealType> RealType...
google
android
nsdmi-template5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C
557
utf_8
bbce95e97ae41e0f3fe3ba83781deb99
// PR c++/58599 // { dg-do compile { target c++11 } } template<int> struct A1; template<> struct A1<0> { template<typename, typename...> struct B1 { template<typename> int foo1() {} int i1 = foo1<int>(); }; }; template<int> struct A2; template<> struct A2<0> { template<typename, typename> struct B2...
google
android
defaulted42
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted42.C
150
utf_8
973e3938ae3516d6d2de0d6490aaa504
// DR 941 // { dg-require-effective-target c++11 } template <class T> T f(T) = delete; template<> int f(int) { return 42; } int main() { f(42); }
google
android
vt-34961
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-34961.C
187
utf_8
1aefc9d462ebb966b0f08f193c13bb1c
// { dg-do compile { target c++11 } } template<typename... T> struct A { static const int i __attribute__((aligned(__alignof(T)))) = 0; // { dg-error "not expanded|T" } }; A<int> a;
google
android
variadic70
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic70.C
389
utf_8
5213174a9ca6c4c9e4d70550c9612eb3
// { dg-do run { target c++11 } } 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(); int main() { bomb...
google
android
enum21b
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum21b.C
84
utf_8
52d5ff8d8835de9029291b2e0be36123
// { dg-do compile { target c++11 } } // { dg-options "-pedantic" } enum x { y, };
google
android
nsdmi-template9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C
231
utf_8
10d5192bc22fb982a714dabcc1321c84
// PR c++/60999 // { dg-do compile { target c++11 } } template <typename A> struct foo { }; template<> struct foo<int> { static constexpr int code = 42; unsigned int bar = static_cast<unsigned int>(code); }; foo<int> a;
google
android
defaulted27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted27.C
332
utf_8
fe14766ad327b4eaee90f7608f477476
// PR c++/47544 // { dg-do compile { target c++11 } } // { dg-final { scan-assembler "_ZN1sIiEC2Ev" } } // { dg-final { scan-assembler-not "_ZN1sIiED2Ev" } } template <typename T> struct s { s(); ~s() = default; }; extern template struct s<int>; template <typename T> s<T>::s() = default; template struct s<int>;...
google
android
rv-func3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-func3.C
170
utf_8
b90dda56d04244318a53aa1fd8d04e61
// DR 1328 // { dg-do compile { target c++11 } } template <class T> struct A { operator T&(); // #1 operator T&&(); // #2 }; typedef int Fn(); A<Fn> a; Fn&& f = a;
google
android
enum22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum22.C
284
utf_8
7ff20adcaa2a7e7bc5390f2d01264d25
// PR c++/56155 // { dg-do compile { target c++11 } } enum e_ : unsigned char { Z_, E_=sizeof(Z_) }; static_assert( E_ == 1, "E_ should be 1"); template <class T> struct A { enum e_ : unsigned char { Z_, E_=sizeof(Z_) }; }; static_assert ( A<double>::E_ == 1, "E_ should be 1");
google
android
noexcept01
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept01.C
1,170
utf_8
ed2c46be3ce8712f09fcd7a4cc944efd
// Test for noexcept-expression // { dg-do compile { target c++11 } } // { dg-options "-O2" } #include <typeinfo> #define SA(X) static_assert(X, #X) void f(); void g() throw(); SA(noexcept(g())); SA(!noexcept(f())); SA(!noexcept(throw 1)); SA(noexcept(42)); struct A { virtual ~A(); }; struct B: public A { virt...
google
android
gen-attrs-48-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-48-2.C
86
utf_8
8c47bbb784b8c183191e18ee34fc1959
// Origin: PR c++/54955 // { dg-do compile { target c++11 } } alignas(double) int f;
google
android
constexpr-ice6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice6.C
212
utf_8
784af77a46d364024c7fc4fdd13e870c
// PR c++/51327 // { dg-do compile { target c++11 } } struct A { A(int); }; struct B : A {}; // { dg-error "no matching" } constexpr int foo(B) { return 0; } // { dg-error "invalid type" }
google
android
decltype33
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype33.C
456
utf_8
f49279cc171d16a17bbe55ead8c7c201
// PR c++/50084 // { dg-do compile { target c++11 } } // { dg-options "-fno-inline" } template<typename> struct remove_reference; template<typename T> struct remove_reference<T&> { typedef T type; }; template <class T> void f(T) { } void g() { struct { } * v = 0; typedef remove_reference<decltype(*v)>::type a...
google
android
error8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/error8.C
136
utf_8
013461f339aafa92beaf749d69a672d1
// PR c++/39681 // { dg-do compile { target c++11 } } struct A { int* p = new foo; // { dg-error "16:foo. does not name a type" } };
google
android
noexcept14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept14.C
110
utf_8
b3a1e68f59a3f65d92a666dd724579c6
// PR c++/50309 // { dg-do compile { target c++11 } } void foo () noexcept () { } // { dg-error "expected" }
google
android
initlist20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist20.C
233
utf_8
9f7142f50f402121b0e591d6ef387e47
// PR c++/40689 // { dg-do compile { target c++11 } } class X { public: X(): data {1,2,3,4,5} {} private: const short data[5]; }; int main() { const float * pData = new const float[4] { 1.5, 2.5, 3.5, 4.5 }; return 0; }
google
android
constexpr-template5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-template5.C
251
utf_8
fa38f028820b71aa1be6862fa8eb6f7c
// PR c++/54946 // { dg-do compile { target c++11 } } template<const char*s> static void testfunc(); constexpr struct testtype { const char* str; } test = { "abc"} ; void (*functionpointer)() = testfunc<(const char*) test.str>; // { dg-error "" }
google
android
alias-decl-26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-26.C
165
utf_8
1b36bdcbf8dcfc66a77be551ee7fc1c0
// Origin: PR c++/54466 // { dg-do compile { target c++11 } } template<typename T> struct X { }; template<typename T> using Y = const X<T>; using Z = Y<int>;
google
android
decltype19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype19.C
570
utf_8
e86f2566a0428c2818b33bdb0b6a0984
// PR c++/42013 template<typename _Tp> _Tp __attribute ((const)) declval(); template<typename _Tp, typename _Up> struct common_type { typedef __decltype(true ? declval<_Tp>() : declval<_Up>()) typet; typedef __decltype(false ? declval<_Tp>() : declval<_Up>()) typef; }; template<typename, typename> s...
google
android
constexpr-cleanup
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-cleanup.C
126
utf_8
c69a3f036aa1a3b23cdbaaea842e210b
// { dg-do compile { target c++11 } } struct A { int i; ~A(); }; constexpr int i = A().i; // { dg-error "non-literal" }
google
android
defaulted21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted21.C
303
utf_8
53f39acd6883d4058a9c25a04fed620f
// PR c++/46736 // { dg-do compile { target c++11 } } struct U { U(); private: U(U const&); // { dg-error "private" } }; struct X { U const u; X(); X(X&&); }; X::X(X&&)=default; // { dg-message "implicitly deleted" } // { dg-prune-output "within this context" } X f() { return X(); }
google
android
ptrmem-cst-arg1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/ptrmem-cst-arg1.C
247
utf_8
53428f69a6d0153074c9b06ee9fbe9e7
// Origin PR c++/51476 // { dg-do compile { target c++11 } } template<int> struct A {}; struct B { int i; A<&B::i> a; // { dg-error "could not convert template argument" } };
google
android
gen-attrs-29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-29.C
337
utf_8
8ae723132160ecbc52a8e55494a7b76e
// PR c++/33506 // { dg-do compile { target c++11 } } extern int f1 [[gnu::warn_unused_result]] (char *) ; extern int f2 [[gnu::warn_unused_result]] (char *) throw () ; extern int f2 (char *) throw (); extern int f3 [[gnu::nonnull (1)]] (char *) ; extern int f4 [[gnu::nonnull (1)]] (char *) throw (); extern int f4 (c...
google
android
constexpr-potential1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-potential1.C
215
utf_8
e29b90d7c0ad7662446a6055addb6315
// { dg-do compile { target c++11 } } // We decided in Rapperswil that it's OK if any value of decide can produce // a constant expression. constexpr int may_throw(bool decide) { return decide ? 42 : throw -1; }
google
android
alias-decl-22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C
364
utf_8
cd8979397410a76b3da91eae465e4d7f
// The standard is unclear about whether this testcase is well-formed. // Clang considers it well-formed, EDG not. Let's go with EDG for now. // { dg-do compile { target c++11 } } template <class T> using foo = typename T::bar; // { dg-error "this context" } class B { typedef int bar; // { dg-error "private" } ...
google
android
initlist70
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist70.C
571
utf_8
2d66a677a148bf90b713edeecf9c1bbb
// PR c++/57196 // { dg-require-effective-target c++11 } #include <initializer_list> template<class T> struct set { set() = default; set(std::initializer_list<T>){} }; struct string { string(const char*){} ~string(){} }; typedef decltype(sizeof(0)) size_t; template <size_t> struct EqHelper { }; int IsNull...
google
android
constexpr-initlist2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist2.C
215
utf_8
4adb50c7ae76f32a5deb653762f03bf1
// { dg-do compile { target c++11 } } #include <initializer_list> constexpr auto list = { 1, 2, 3, 4 }; #define SA(X) static_assert(X, #X) SA(list.size() == 4); SA(list.begin()[2] == 3); SA(list.end()[-1] == 4);
google
android
gen-attrs-8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C
294
utf_8
e0b4f953ad274eb8ec84b8e630f87d3a
// { dg-options "-pedantic" } // { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } // { dg-require-effective-target c++11 } extern int * ([[gnu::stdcall]] *fooPtr)( void); // { dg-error "expected" } int * [[gnu::stdcall]] myFn01( void) { return 0; }// { dg-warning "ignored" }
google
android
forw_enum4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/forw_enum4.C
1,030
utf_8
c71bc1457d9f8a2ca50c42db66dafbc6
// { dg-do compile { target c++11 } } template<typename T> struct S1 { struct S2 { // opaque enum declarations enum class E1; enum class E2 : T; enum class E3 : short; enum E4 : T; enum E5 : short; // can be repeated enum class E1; enum c...
google
android
ref-qual-mangle1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/ref-qual-mangle1.C
1,042
utf_8
87cba3bd81389f956a4ab8405ad5dc46
// PR c++/56821 // { dg-require-effective-target c++11 } struct A { // { dg-final { scan-assembler "_ZNR1A1fEv" } } void f() & {} // { dg-final { scan-assembler "_ZNO1A1gEv" } } void g() && {} // { dg-final { scan-assembler "_ZNKR1A1hEv" } } void h() const & {} }; // { dg-final { scan-assembler "_Z1jM1AFv...
google
android
initlist38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist38.C
292
utf_8
779e24d4c76d5aced88acaf4a5aca556
// DR 990 // { dg-do compile { target c++11 } } #include <initializer_list> struct A { A(std::initializer_list<int>); // #1 }; struct B { A a; }; void f (B); int main() { B{}; f({}); B b0 = { }; B b1 { }; // OK, uses #1 B b2 { 1 }; // { dg-error "could not convert" } }
google
android
nsdmi1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi1.C
639
utf_8
377e2e1b16dfc68982483f5462e7a1b0
// { dg-do run { target c++11 } } struct A { int i = 42; }; struct B { int i = 42; B() { } B(int i): i(i) { } }; template <class T, T t> struct C { T m = t; }; template <class T, T t> struct D { T m = t; D() { } D(T m):m(m) { } }; int main() { A a1; if (a1.i != 42) return 1; A a2{}; if (a2....
google
android
pr33930
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr33930.C
176
utf_8
ecd74345edbbcb8ad0e45ac4416e08b6
// { dg-do compile { target c++11 } } typedef const int* type; float& foo( const type& ggg ); int& foo( type&& ggg ); void bar( int* someptr ) { int& x = foo( someptr ); }
google
android
constexpr-using
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-using.C
497
utf_8
9c897128234fa6ab41edf384f11dd381
// Core issue 898 // { dg-do compile { target c++11 } } namespace N { const int i = 42; } namespace M { const int j = 42; } constexpr int g() { using namespace N; using M::j; static_assert (i == 42, "i == 42"); return i + j; } template <class T> constexpr int h() { using namespace N; using M::j; static...
google
android
initlist40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist40.C
206
utf_8
93fe4f7827a4019616b5dafe4e5cb319
// PR c++/54835, DR 1518 // { dg-do compile { target c++11 } } struct A { explicit A(int = 42); }; int main() { A a1 = { }; // { dg-error "explicit" } A a2 = { 24 }; // { dg-error "explicit" } }
google
android
dc7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc7.C
109
utf_8
bc4346829b56020609cc74488154f418
// PR c++/58255 // { dg-do compile { target c++11 } } struct A { explicit A() { } A(int x) : A() { } };
google
android
constexpr-ref1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ref1.C
648
utf_8
dc7a7eb622691a6363e90822f0e39072
// PR c++/49172 // { dg-do compile { target c++11 } } #define SA(X) static_assert((X),#X) constexpr int g() { return 42; } constexpr int(&rg)() = g; // #1 SA(rg() == 42); constexpr int i = 24; constexpr int const& ri = i; // #2 SA(&ri == &i); SA(ri == 24); void f() { constexpr int(&rg)() = g; // #1 SA(rg() =...
google
android
constexpr-deref
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-deref.C
277
utf_8
4f2e7c33f09e5b0c1d98c13b7f990e4a
// { dg-do compile { target c++11 } } struct A { const int *p[2]; }; constexpr const int * f(const int *p) { return p; } int main() { constexpr int i = 42; constexpr int j = *&i; // OK constexpr int k = *A{{&i}}.p[0]; // OK constexpr int l = *f(&i); // OK }
google
android
variadic-ex10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C
442
utf_8
4d6fe1e4481db3045c11ed6439125113
// { dg-do compile { target c++11 } } template<typename... Types> struct Tuple { }; Tuple<> t0; // Types contains no arguments Tuple<int> t1; // Types contains one argument: int Tuple<int, float> t2; // Types contains two arguments: int and float Tuple<0> error; // { dg-error "mismatch" "mismatch" } // { dg-error "exp...
google
android
friend1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/friend1.C
446
utf_8
ecd97721b0f99e76604083c732504cf2
// From N1791 // { dg-do compile { target c++11 } } class C; typedef C Ct; class X1 { friend C; // OK: class C is a friend }; class X2 { friend Ct; // OK: class C is a friend friend D; // { dg-error "" } no type-name D in scope friend class D; // OK: elaborated-type-specifier declares new class }; templat...
google
android
rv-restrict
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-restrict.C
184
utf_8
57ca627add7fb3090157211ed3ea80fd
// PR c++/45401 // { dg-do compile { target c++11 } } typedef int &__restrict restrictLvref; typedef restrictLvref &&rvrefToRestrictLvref; typedef restrictLvref rvrefToRestrictLvref;
google
android
constexpr-union3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-union3.C
137
utf_8
4c8925527b341742a37fea8686026b8c
// PR c++/51675 // { dg-do compile { target c++11 } } union foo { int x; short y; constexpr foo(): x(0) { } }; constexpr foo f;
google
android
noexcept16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept16.C
3,344
utf_8
ae7b9d7f58a9bc802bcf7ffd5e196b3b
// PR c++/50972 // { dg-do compile { target c++11 } } // Ignore all errors, we're just testing that this doesn't ICE // { dg-prune-output "error" } namespace std typedef long unsigned int size_t; template<typename...> struct __and_; template<typename _Tp> struct is_nothrow_move_constructible { }; template<typename _Tp...
google
android
nsdmi-defer5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer5.C
310
utf_8
0c779e5356babe853ca96db8b6e6c6d2
// PR c++/51666 (DR 325) // { dg-do compile { target c++11 } } template<typename T, typename U> struct tuple { tuple(T, U) { } }; struct Y { tuple<int, int> tt = tuple<int, int>{1, 2}; }; struct A { int i = 0; int j = i < 42, k; // OK, declares j and k int l = i < 42, 24; // { dg-error "" } };
google
android
initlist55
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist55.C
142
utf_8
7502bae90e2a391c338528fa946a6e37
// Test for -Wno-narrowing // { dg-do compile { target c++11 } } // { dg-options "-pedantic-errors -Wno-narrowing" } int i; float d = { i };
google
android
initlist35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist35.C
236
utf_8
8c75cbd72be21d449d42f2bc4b04ec7b
// PR c++/41510 // { dg-do compile { target c++11 } } struct B { B(int, int); }; struct A { A(int, int); A(const B&); }; void f() { A a = { 1, 2 }; } template <class T> void g() { A a = { 1, 2 }; } template void g<int>();
google
android
alias-decl-40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-40.C
740
utf_8
46f21becb34daa94cd3f0a39aae7aaeb
// PR c++/58170 // { dg-require-effective-target c++11 } // { dg-prune-output "not declared" } // { dg-prune-output "expected" } template <typename T, typename U> struct base { template <typename V> struct derived; }; template <typename T, typename U> template <typename V> struct base<T, U>::derived : public base...
google
android
constexpr-diag2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-diag2.C
164
utf_8
0d9b71b8e9d97011f3118a0a2639f1bc
// PR c++/47207 // { dg-do compile { target c++11 } } constexpr int X (X); // { dg-error "not usable" } // { dg-message "own initializer" "" { target *-*-* } 4 }
google
android
initlist6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist6.C
380
utf_8
11e41aa97016f3802a402f985fdd39df
// Test for initlist lifetime // { dg-do run { target c++11 } } #include <initializer_list> int c; struct A { A(int,int) { ++c; } ~A() { --c; } }; void f (std::initializer_list<A> l) { } int main() { f({ {1,2}, {3,4} }); if (c != 0) return 1; { std::initializer_list<A> l { {1,2}, {3,4} }; if...
google
android
sfinae26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
660
utf_8
97c7bccb788e157454d46cda2a1248ac
// PR c++/49229 // { dg-do compile { target c++11 } } extern void* enabler; template<bool, class = void> struct enable_if {}; template<class T> struct enable_if<true, T> { typedef T type; }; template<class... Bn> struct and_; template<class B1> struct and_<B1> : B1 {}; template<class, class> struct is_same { ...
google
android
noexcept06
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept06.C
408
utf_8
d7bb370696043a6e49599ea176c5c5b8
// Test that checking of a nothrow specification uses the one on the // definition. // { dg-do run { target c++11 } } #include <exception> #include <cstdlib> void my_unexpected () { std::abort (); } void my_terminate () { std::exit (0); } void f() throw(); void f() noexcept { throw 1; } int main() { std::se...
google
android
implicit14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/implicit14.C
362
utf_8
7328653fe6fc1e6ca53a097e33c805bf
// PR c++/54506 // { dg-do compile { target c++11 } } template <class T> struct A { A() {} A(A const volatile &&) = delete; A &operator =(A const volatile &&) = delete; template <class U> A(A<U> &&) {} template <class U> A &operator =(A<U> &&) { return *this; } }; struct B { A<int> a; B() = default; }...
google
android
nullptr22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr22.C
651
utf_8
a4dbc4f72397e532b78c8d61b7e16c31
// { dg-do compile { target c++11 } } // { dg-options "-Wall -Wformat=2 -Wstrict-null-sentinel" } // Test various warnings void f1(const char*, ...) __attribute__((format(printf, 1, 2))); void f2(const char*) __attribute__((nonnull)); void f3(const char*, ...) __attribute__((sentinel)); void f() { f1("%p", nullptr...
google
android
sfinae7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae7.C
273
utf_8
ec1a51ea3fd41e6e61c8f425bde1fd0b
// { dg-do compile { target c++11 } } struct A { void f(); void f(int); typedef int g; }; template <class T> decltype (T::f) f(); template <class T> void f(); template <class T> decltype (T::g) g(); template <class T> void g(); int main() { f<A>(); g<A>(); }
google
android
vt-35242
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-35242.C
169
utf_8
3cc2c0f786b5775f299914bdeacce536
// { dg-do compile { target c++11 } } struct A { template<typename... T> struct B; }; template<typename... T> struct A::B<T*> {}; // { dg-error "parameter packs|T" }
google
android
cast-bug
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/cast-bug.C
137
utf_8
60c9e4061e9464e18b501e582a2d19cc
// { dg-do compile { target c++11 } } struct S { S(); S(S &&); private: S(S &); }; S f() { S s; return static_cast<S&&>(s); }
google
android
variadic-new
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-new.C
255
utf_8
7d2b8191fa109fd1786f979fbfa18b4e
// { dg-do run { target c++11 } } // Contributed by Peter Dimov // PR c++/32597 #include <assert.h> #include <new> int k = 5; template< class... Args > void f( Args... args ) { new( &k ) int( args... ); } int main() { f(); assert( k == 0 ); }
google
android
variadic146
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic146.C
163
utf_8
6811521f58bcc4664f15c11957bd7e98
// PR c++/58606 // { dg-require-effective-target c++11 } template<int&...I> struct A { template<typename> struct B; template<typename T> struct B<T*> {}; };
google
android
constexpr-nonstatic
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-nonstatic.C
92
utf_8
e30db9bfd86140e4533c65e96fcc3879
// { dg-do compile { target c++11 } } struct A { constexpr int i; // { dg-error "" } };
google
android
vt-34755
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-34755.C
228
utf_8
b86e8cf4c93bf591da8a6d9c1ddb0ae3
// { dg-do compile { target c++11 } } 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
android
variadic75
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic75.C
686
utf_8
e4f8dfd0aa613faabae60d8f99e8e498
// { dg-do compile { target c++11 } } template<typename...> struct tuple { }; template<template<typename T> class Meta, typename... Values> struct apply_all { typedef tuple<typename Meta<Values>::type...> type; }; template<typename T, typename U> struct is_same { static const bool value = false; }; template<typ...
google
android
constexpr-noexcept5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept5.C
262
utf_8
348f9267a807b30acdee117b276c0b12
// { dg-do compile { target c++11 } } struct booleable { bool data; constexpr explicit operator bool() { return data; } }; constexpr booleable truthy_func() { return {true}; } void funky() noexcept(truthy_func()) {} int main() { funky(); return 0; }
google
android
auto40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto40.C
162
utf_8
1ed3bdad79aa7dbba80cabd3681be148
// PR c++/58888 // { dg-do compile { target c++11 } } #include <initializer_list> struct A { static constexpr auto b{1.0}; }; constexpr decltype(A::b) A::b;
google
android
constexpr-abi1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C
230
utf_8
785343af0b3355420f795309fbe121fb
// PR c++/47301 // { dg-do compile { target c++11 } } // { dg-options "-fabi-version=1" } struct A { constexpr operator int () { return 1; } }; template < int > struct B { static constexpr A a = A(); int ar[a]; };
google
android
initlist82
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist82.C
368
utf_8
3df81dd8acdfbccf6fba7648b64b32c5
// PR c++/60708 // { dg-do compile { target c++11 } } template <class T, class U> struct mypair { mypair(T, U) {} }; template<typename T> struct S { mypair<T *, int> get_pair() noexcept { return mypair<T*,int>(nullptr, 0); } }; static void foo(const mypair<char *, int> (&a)[2]) noexcept { } int main() { S<...
google
android
udlit-shadow-neg
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-shadow-neg.C
2,299
utf_8
0bb839fa8073eb3e4784e4906fca1ce7
// { dg-do compile { target c++11 } } // Test that the standard suffixes shadow any user-defined suffixes of the same name. long double operator"" L(long double x) // { dg-warning "floating point suffix|shadowed by implementation" } { return x; } unsigned long long int operator"" ULL(unsigned long long int k) // {...
google
android
collapse-bug
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/collapse-bug.C
381
utf_8
9a0377c9d1c995200cbed48fa160d8a6
// { dg-do compile { target c++11 } } 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 'c...
google
android
decltype15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype15.C
193
utf_8
0a8ff98944201305d96cad72ab6c34d0
// PR c++/38640 // { dg-do compile { target c++11 } } template<int N> void foo (decltype (N)); template<long int N> void foo (decltype (N)); void bar (void) { foo<5> (6); foo<5L> (6L); }
google
android
initlist36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist36.C
334
utf_8
17463ad4702c262b0d2f0c3a0d8ecae7
// PR c++/44358 // { dg-do compile { target c++11 } } #include <initializer_list> struct A { A(int); }; struct B { B(std::initializer_list<A>); }; void f (B b); int main() { B b0 = {{1}}; B b1 = {{1.0}}; // { dg-error "narrowing" } B b2 {1.0}; // { dg-error "narrowing" } A a {1.0}; // { dg-error "n...
google
android
constexpr-53094-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C
586
utf_8
0cd31c4aa22324cfd948c332fcea0038
// { dg-do compile { target c++11 } } // { dg-options "" } // Ignore warning on some powerpc-ibm-aix configurations. // { dg-prune-output "non-standard ABI extension" } typedef float __attribute__ ((vector_size (4 * sizeof (float)))) V4; struct Rot3 { typedef float T; typedef V4 Vec; Vec axis[3]; constexpr Ro...
google
android
pr58674
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr58674.C
240
utf_8
b2c6b8e617bc163eb317b7668652e006
// PR c++/58674 // { dg-do compile { target c++11 } } template<int> struct A {}; template<int N> using B = A<N>; template<typename T> struct C { B<T::i> b; // { dg-error "not usable" } }; struct X { static const int i; }; C<X> c;
google
android
constexpr-ice12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice12.C
150
utf_8
a3579959b8b1abdc88ad7e462927c0c2
// PR c++/58609 // { dg-do compile { target c++11 } } struct A { static constexpr int&& i = 0; // { dg-error "initialization" } }; int j = A::i;
google
android
sfinae25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae25.C
217
utf_8
987091cf0d81cd24f33c4d69b528ab19
// PR c++/49105 // { dg-do compile { target c++11 } } template<class T, class = decltype(T{})> char f(int); template<class T> auto f(...) -> char(&)[2]; static_assert(sizeof(f<const int&&>(0)) == 1, "Error"); // #
google
android
override3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/override3.C
398
utf_8
d2a1963e44488193e2d5ae183c548b2d
// { dg-do compile } // { dg-options "--std=c++98" } struct B final {}; // { dg-warning "override controls" } struct D : B {}; // { dg-error "cannot derive from 'final' base" } struct E __final {}; struct F : E {}; // { dg-error "cannot derive from 'final' base" } struct G { virtual void f(); }; struct H : G { ...
google
android
constexpr-47969
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-47969.C
188
utf_8
bcd0410c29a78e0ee79d4da979f86289
// PR c++/47969 // { dg-do compile { target c++11 } } struct A { // constexpr operator int () { return 1; } }; constexpr A a = A(); int ar[a]; // { dg-error "has non-integral type" }
google
android
dc8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc8.C
1,360
utf_8
8305b7b7dfca623e4a99cb58ae840958
// PR c++/51424 // { dg-do compile { target c++11 } } template <class T > struct S { S() : S() {} // { dg-error "delegates to itself" } S(int x) : S(x) {} // { dg-error "delegates to itself" } }; struct B1 { B1() : B1() {} // { dg-error "delegates to itself" } B1(int y) : B1(y) {} // { dg-...
google
android
constexpr-static8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-static8.C
228
utf_8
927cc1e1c00040ed0862ca58c91edc81
// PR c++/50258 // { dg-do compile { target c++11 } } // { dg-options "-fpermissive" } struct Foo { static const double d = 3.14; // { dg-warning "constexpr" } }; const double Foo::d; // { dg-warning "constexpr" }
google
android
decltype21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype21.C
679
utf_8
3c8b7662675a49e47b4b65a82e4cdff5
// PR c++/6709 (DR 743) // PR c++/42603 (DR 950) // { dg-do compile { target c++11 } } template <class T> T make(); struct p { typedef int t; }; struct c : decltype(make<p>()) {}; decltype(make<p>())::t t; // PR c++/49823 template < typename T > auto f( const T &x ) -> typename decltype( x )::type; // ICE on her...
google
android
decltype43
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype43.C
410
utf_8
c5cb522e38159dab988d464557385ee9
// PR c++/53763 // { dg-do compile { target c++11 } } template<typename TYPE> struct A { static int a(TYPE value) { return value; } }; template<typename... ARGS> struct B { static int b(ARGS...) { return 0; } }; int main() { int x = B<decltype(A<int>::a(1))>::b(A<int>::a(1)); int y = B<declty...
google
android
variadic125
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic125.C
436
utf_8
45b77920f32cc03aa18c8dee71ea79c9
// PR c++/52380 // { dg-do compile { target c++11 } } template<typename T> struct S { template<typename U> struct Unary // Line 5 {}; template<unsigned, typename... Args> struct Dispatch // Line 9 : public Unary<Args...> {}; template<typename... Args> st...
google
android
defaulted46
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted46.C
151
utf_8
acc6bd6fd744bdc18ca97d53d2b93372
// { dg-require-effective-target c++11 } struct A { protected: A() = default; int i; }; struct B: A { B() = default; }; int main() { B(); }
google
android
pr32114
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr32114.C
147
utf_8
e4361192fe272e7bae3460971a877ae9
// { dg-do compile { target c++11 } } template<typename ...T> struct A { typedef typename T::X Y; // { dg-error "not expanded|T" } }; A<int> a;
google
android
auto28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto28.C
107
utf_8
ffbf948bb5a93f58d5d182de6f8c4d83
// PR c++/51404 // { dg-do compile { target c++11 } } int i = auto().x; // { dg-error "invalid use of" }
google
android
pr52744
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr52744.C
1,600
utf_8
17842e627dda285d3231b7dc2e1dd2e5
// PR c++/52744 // { dg-do compile { target c++11 } } struct T { int a; void b(){} int c(int) { return 1; } }; template<typename CT, CT> struct member_helper; template<typename FT, FT(T::*mem)> struct member_helper<FT(T::*), mem> { static const char* worker() { return "for members"; } }; t...
google
android
std_fno-ext-numeric-literals
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C
3,109
utf_8
7ba1d7418fff81a8372f9fe612fc02a2
// { dg-do compile { target c++11 } } // Integer imaginary... constexpr unsigned long long operator"" i(unsigned long long n) { return 4 * n + 0; } constexpr unsigned long long operator"" I(unsigned long long n) { return 4 * n + 1; } constexpr unsigned long long operator"" j(unsigned long long n) { return 4 * n +...
google
android
defaulted49
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted49.C
148
utf_8
f43c03a4784f2f2c60f5f1a33fb05baa
// PR c++/60980 // { dg-do compile { target c++11 } } struct x0 { x0 () = default; }; struct x1 { x0 x2[2]; void x3 () { x1 (); } };
google
android
alias-decl-17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C
522
utf_8
7e120be38a614ba9924a6abbb682ed7a
// Origin PR c++/51289 // { dg-do compile { target c++11 } } template<typename a, template <typename, typename> class b> struct foo { template <typename t> using type = b<a, t>; template <typename t> b<a, t> funca() {} template <typename t> type<t> funcb() {} }; // This is an additional test, to emit an ...
google
android
constexpr-base
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-base.C
357
utf_8
fdf8f1e07e73475c94cf62fcbb1aab77
// Test base/member class and static_assert with constexpr // { dg-do compile { target c++11 } } struct A { int i; constexpr A(int _i): i(_i) { } }; struct B: A { A a; int j; constexpr B(int _ib, int _ia, int _j): A(_ib), a(_ia), j(_j) { } }; constexpr B b (12, 24, 36); #define SA(X) static_assert (X, #X) ...
google
android
noexcept09
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept09.C
348
utf_8
a02244173a5ffde409598767c4b61095
// Test that -Wnoexcept works with templates // { dg-do compile { target c++11 } } // { dg-options "-Wnoexcept" } template <class T> T f (T t) { return t; } // { dg-warning "does not throw" } #define SA(X) static_assert(X, #X) SA (!noexcept(f(1))); // { dg-warning "noexcept" } int main() { f(1); // Use f(int...
google
android
udlit-resolve
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C
1,316
utf_8
2b75b504eeba215f8940b95c001dcc44
// { dg-do run { target c++11 } } #include <cstdint> #include <cassert> int operator"" _foo(const char*) { return 0; } int operator"" _foo(unsigned long long int) { return 1; } int operator"" _foo(long double) { return 2; } int operator"" _foo(char) { re...
google
android
nullptr12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr12.C
244
utf_8
d8d40a7d36271f6b91a0d7274d8de7ee
// { dg-do compile { target c++11 } } // Test sizeof static_assert(sizeof(nullptr) == sizeof(void*), "sizeof(nullptr) is wrong"); const decltype(nullptr) mynull = 0; static_assert(sizeof(mynull) == sizeof(void*), "sizeof(nullptr) is wrong");
google
android
bracket2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/bracket2.C
325
utf_8
b35867f02e7caf046836737e0d4b667e
// { dg-do compile { target c++11 } } 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<(6>>1)>> x5; // ...
google
android
initlist34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist34.C
225
utf_8
53ef55753c091278fa63b21ed620c269
// PR c++/44157 // { dg-do compile { target c++11 } } #include <initializer_list> template<typename T> void f(T) { } int main() { std::initializer_list<int> a = { 0 }; f(a); f<std::initializer_list<int> >({ 0 }); }