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
auto31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto31.C
183
utf_8
24926b96269b354631ff38d43957ddae
// PR c++/51416 // { dg-do compile { target c++11 } } template<typename T, typename... U> void foo(T, U... u) { auto foo(u...); // { dg-error "auto" } } void bar() { foo(0); }
google
android
constexpr-union
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C
405
utf_8
23385779f30a9c5bbced6e730f47b4ca
// Test that we don't have to deal with type punning // DR 1188 says this is ill-formed // { dg-do compile { target c++11 } } union U { float f; unsigned char ca[sizeof(float)]; }; constexpr U u = { 1.0 }; constexpr float f = u.f; constexpr unsigned char c = u.ca[0]; // { dg-error "U::ca" } constexpr double d = ...
google
android
vt-37737-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C
196
utf_8
3759c4b95c9a6ead850b3d31a54d7104
// { dg-do compile { target c++11 } } // { dg-prune-output "note" } void f() { } template<class U, class... T> void f(){ f<T...>(); } // { dg-error "no matching" } int main() { f<char>(); }
google
android
alias-decl-30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-30.C
321
utf_8
8c6dc98b00f0634e78a8be7ea1650d45
// Origin PR c++/55311 // { dg-do compile { target c++11 } } template <const char *const C, typename T> struct A {}; struct B {}; extern constexpr char HELLO_WORLD[] = "hello world"; A<HELLO_WORLD, B> g; // <-- This works fine template <typename T> using PartiallySpecialized = A<HELLO_WORLD, T>; // <-- This fails...
google
android
nsdmi-template2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template2.C
182
utf_8
d83133afa9fe5d533ed8b6cecc90cc44
// PR c++/50614 // { dg-do compile { target c++11 } } // { dg-options "-fcompare-debug" } struct A { int f (); }; template <int> struct B : A { int i = this->f (); }; B<0> b;
google
android
defaulted36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted36.C
333
utf_8
c40529dd80c964b83ae572f9bbf80a37
// PR c++/53733 // { dg-do compile { target c++11 } } template<typename T> struct wrap { wrap() = default; wrap(wrap&&) = default; // Line 5 wrap(const wrap&) = default; T t; }; struct S { S() = default; S(const S&){} S(S&&) = default; }; typedef wrap<const S> W; W get() { return W(); } // Line 19 i...
google
android
nullptr18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr18.C
478
utf_8
95ff09944c5b1a198fb3f1aaf4ce0d31
// { dg-do compile { target c++11 } } // Test overload of pointer versus bool when applied on a nullptr_t template <typename T, typename U> struct tType_equal; template <typename T> struct tType_equal<T, T> { typedef void type; }; template <typename T, typename U> inline typename tType_equal<T, U>::type type_equal(U...
google
android
pr31443
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31443.C
234
utf_8
1448449c0d32201c9e7296b79376dd87
// { dg-do compile { target c++11 } } template<int, typename... T> struct A { template<int N> void foo(A<N,T>); // { dg-error "parameter packs|T" } }; void bar() { A<0,int>().foo(A<0,int>()); // { dg-error "no member named" } }
google
android
variadic94
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic94.C
418
utf_8
09fa738be8b9509b60cfab30f03340c3
// PR c++/40595 // { dg-do compile { target c++11 } } template<int N> struct S { typedef int type; }; template<typename T> struct Get { static T get(); }; template<typename F> struct B { template<typename ... Args> typename S<sizeof( Get<F>::get() (Get<Args>::get() ...) )>::type f(Args&& ...
google
android
variadic11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic11.C
499
utf_8
d3da542d29d0002dfd8f000179afbbc0
// { dg-do compile { target c++11 } } template<typename...> struct count; template<> struct count<> { static const int value = 0; }; template<typename T, typename... Args> struct count<T, Args...> { static const int value = 1 + count<Args...>::value; }; int a0[count<>::value == 0? 1 : -1]; int a1[count<char>::va...
google
android
constexpr-redeclaration1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-redeclaration1.C
162
utf_8
5e160a188aef7805034f272bd43d2ab7
// PR c++/59123 // { dg-do compile { target c++11 } } // Fwd-declarations struct S; extern const S s; // (... later) definitions struct S {}; constexpr S s {};
google
android
gen-attrs-39-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-39-1.C
180
utf_8
98100318c81e01be9cde3359f29d785e
// { dg-do compile { target c++11 } } int fragile_block(void) { typedef [[gnu::aligned (16)]] // { dg-warning "ignored" } struct { int i; } XmmUint16; return 0; }
google
android
constexpr-diag4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C
258
utf_8
dc4fd099688d75d0dfcddfbcd8954ccd
// Origin: PR c++/51633 // { dg-do compile { target c++11 } } struct A { ~A(); }; struct B { A a; constexpr B() {} }; struct A1 { int a; ~A1(); }; struct B1 { A1 a1; constexpr B1() {} // { dg-error "uninitialized member" } };
google
android
constexpr-switch
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-switch.C
245
utf_8
6eb82ff153e81bcd77b89c565cfd5a74
// { dg-do compile { target c++11 } } template<class T> constexpr T value(T t = T()) { return t; } enum us_enum { us_item = value<short>() }; // OK void func(us_enum n) { switch (n) { case value(us_item): ; // #1 Error default: ; } }
google
android
gen-attrs-34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-34.C
602
utf_8
fed500b7853f7f1f2c3911bf2220bee9
// PR c/37171 // { dg-do compile { target c++11 } } // { dg-options "-O2 -fdump-tree-optimized" } unsigned int f1 [[gnu::const]] (); unsigned int f2 [[gnu::__const]] () ; unsigned int f3 [[gnu::__const__]] () ; unsigned int f4 () { return f1 () + f1 () + f1 () + f1 () + f2 () + f2 () + f2 () + f2 () + f3 () + f...
google
android
pr50901
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr50901.C
149
utf_8
9d6b716912d96dc72e473570455cb17a
// { dg-do compile { target c++11 } } template<class T> int foo(int a) { const unsigned b = a < 0 ? -a : a; return 0; } int i = foo<float>(1);
google
android
gen-attrs-15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-15.C
113
utf_8
74244e62676b5bf2159f695b7a73f055
// { dg-do compile { target c++11 } } // PR c++/15317 struct A { A(char); }; A::A([[gnu::unused]] char i2) {}
google
android
udlit-mangle
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-mangle.C
160
utf_8
06ed91853a7b8dc3279cd4ec50e37629
// PR c++/52521 // { dg-do compile { target c++11 } } // { dg-final { scan-assembler "_Zli2_wPKc" } } int operator "" _w(const char*); int main() { 123_w; }
google
android
alias-decl-7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-7.C
982
utf_8
816dbf372a71890f9515376534ec312b
// { dg-do compile { target c++11 } } // Add arguments to unbound template template parameter. template <template <class> class Template> struct Internal { template <class Arg> using Bind = Template<Arg>; }; template <template <class> class Template, class Arg> using Instantiate = Template<Arg>; // After parsing #...
google
android
variadic86
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic86.C
426
utf_8
933c96778bc52f93c5187c8462239f9a
// PR c++/33943 // { dg-do compile { target c++11 } } template<typename... A> struct foo {}; template<typename A0, typename... A1> struct bar {}; template<typename U> struct baz; template<template<typename...> class T, typename... U> struct baz< T<U...> > {}; template<template<typename, typename...> class T, typen...
google
android
variadic42
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic42.C
302
utf_8
e15ff549f7780c4621471e230cfc465a
// { dg-options "-fabi-version=5" } // { dg-do compile { target c++11 } } 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
android
variadic147
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic147.C
179
utf_8
8d31f7fd59614525209b8161d93ce8b5
// PR c++/58466 // { dg-require-effective-target c++11 } template<char, char...> struct A; template<typename> struct B; template<char... C> struct B<A<C...>> {}; B<A<'X'>> b;
google
android
nsdmi5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi5.C
221
utf_8
f58ff727813e1083b5afd3fc3d8fcf28
// { dg-do compile { target c++11 } } struct X { int x = 5; int f() { return x; } }; struct Y : X { int y = this->x; }; template <class T> struct Z : T { int y = this->f(); }; int main() { Y foo; Z<X> bar; }
google
android
constexpr-array-ptr7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr7.C
291
utf_8
fa60ae8f5c88bb601ea454af990383ed
// PR c++/49290 // { dg-do compile { target c++11 } } typedef unsigned T; struct S { constexpr T foo (void); unsigned s1[16]; }; constexpr T S::foo () { return *(T *) (s1 + 10); } constexpr S s = { 0,1,2,3,4,5,6,7,8,9,10 }; #define SA(X) static_assert ((X), #X) SA(s.foo() == 10);
google
android
enum2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum2.C
128
utf_8
083386cf718cff0127f11b509677d908
// PR c++/38637 // { dg-do compile { target c++11 } } template<int> enum E : int { e }; // { dg-error "declaration|expected" }
google
android
alias-decl-34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-34.C
435
utf_8
1cee05b5f8cdb176bf9a6bfc9ad90770
// PR c++/57222 // { dg-require-effective-target c++11 } template <template <typename T> class Templ> using Bool = Templ<bool>; template <typename T> class Foo { private: public: template<template<typename U> class Templ> void method(Bool<Templ> boolTempl); }; template <typename T> template <template <typena...
google
android
constexpr-ice8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice8.C
397
utf_8
2720d2f3cb78afd7d5dc73bc55faced2
// PR c++/53349 // { dg-do compile { target c++11 } } template <int N> struct Foo { constexpr Foo(const Foo<N-1> a) : m_a(a) {} constexpr Foo(const Foo<N> &a) : m_a(a.m_a) {} Foo<N-1> m_a; }; template <> struct Foo<0> {}; constexpr Foo<1> catty1(Foo<1> x) { return x; } constexpr Foo<2> catty2(Foo<1> x) {...
google
android
variadic25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic25.C
347
utf_8
50852853da733d2b91972e9a33c66c45
// { dg-do compile { target c++11 } } template<int... Values> struct sum; template<> struct sum<> { static const int value = 0; }; template<int Value, int... Values> struct sum<Value, Values...> { static const int value = Value + sum<Values...>::value; }; int a0[sum<>::value == 0? 1 : -1]; int a1[sum<1, 2, 3, 4,...
google
android
scoped_enum2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/scoped_enum2.C
263
utf_8
edc3b5f5ab7edd4f234396d4f8b04d63
// { dg-do compile { target c++11 } } enum class E { e = 10 }; enum E2 { e2 = 10 }; struct C { int arr[E::e]; // { dg-error "non-integral type" } int arr2[E2::e2]; // OK int i: E::e; // { dg-error "non-integral type" } int i2: E2::e2; // OK };
google
android
initlist31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist31.C
266
utf_8
fec63020b8d41adc61ea5e4411d13b03
// PR c++/43028 // { dg-do compile { target c++11 } } #include <initializer_list> struct string { string(std::initializer_list<char>) { } }; void f() { auto y = { string(Equation()) // { dg-error "not declared" } }; // { dg-error "unable to deduce" } }
google
android
defaulted13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
720
utf_8
41f6d104077a474730565e678d50c71d
// { dg-do compile { target c++11 } } template<typename T> struct NonCopyable { NonCopyable() = default; NonCopyable(NonCopyable const&); }; template<> NonCopyable<int>::NonCopyable(NonCopyable<int> const&) = delete; // { dg-message "declared" } template<typename T> NonCopyable<T>::NonCopyable(NonCopyable<T> con...
google
android
variadic124
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic124.C
419
utf_8
3c87174db9aac1bdfe63e86df16b7ded
// PR c++/52292 // { dg-do compile { target c++11 } } template <template <typename...> class T> struct foo { template <typename... U> foo(T<U...> x) { } }; template <typename T> struct bar { bar(T x) : value(x) { } T value; }; struct generic : private foo<bar> { template <typename T> generic...
google
android
trailing3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/trailing3.C
1,546
utf_8
112aba2c9def0d824c652cc9ddf0ff39
// More auto/decltype mangling tests. // { dg-do compile { target c++11 } } // { dg-options "-fabi-version=0" } template <class T> struct B { static int i; }; int&& x(); template <class T> struct A { static int i; static int &ir; static int &&irr; template <class U> auto f(U u) -> decltype (u + i); tem...
google
android
auto39
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto39.C
138
utf_8
db14978efb6af75b6759d2812f05bc96
// PR c++/58560 // { dg-do compile { target c++11 } } typedef auto T; // { dg-error "typedef declared 'auto'" } void foo() { T(); }
google
android
decltype12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype12.C
1,059
utf_8
7b78eb928548d9c6e93c3e43466a99b7
// { dg-do compile { target c++11 } } 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; }; int&& f(const int&) {} int&& (*fp)(const int&) = f; int&& (&fr)(const int&) = f; struct X { int&& f(const int&...
google
android
variadic93
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic93.C
164
utf_8
bec976764c0429757ab4b269a15af3d3
// PR c++/35297 // { dg-do compile { target c++11 } } template <class T=int, class... ARGS> struct test2 {}; int main() { test2<> a; return 0; }
google
android
variadic53
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic53.C
405
utf_8
b52fb58305cb931378dd597785b6d811
// { dg-do compile { target c++11 } } template<typename F, typename... BoundArgs> class bound_functor { public: typedef typename F::result_type result_type; template<typename... Args> typename F::result_type operator()(Args&... args); }; template<typename F, typename... BoundArgs> template<typename... Args> ty...
google
android
nullptr24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr24.C
94
utf_8
c7a8f71f47c13e1bfdd9dca2d50df8dd
// PR c++/50371 // { dg-do compile { target c++11 } } template<decltype(nullptr)> struct nt;
google
android
gen-attrs-46
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-46.C
170
utf_8
4b66f6c6e80bc0c50865a5ce21ae4025
// PR c++/40821 // { dg-do compile { target c++11 } } struct [[gnu::aligned(8)] S1 { int i; }; // { dg-error "" } struct [aligned(8) S2 { int i; }; // { dg-error "" }
google
android
implicit13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/implicit13.C
683
utf_8
db5b7de6305a8e21e1ae9042d5338dd3
// Make sure that A's destructor doesn't affect constexpr // or exception-spec on D's default constructor. // { dg-do compile { target c++11 } } struct A { constexpr A() noexcept: i(0) { } int i; ~A() noexcept(false); }; struct B: A { }; // Should get static initialization, so no constructor call. // { dg-fina...
google
android
variadic155
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic155.C
139
utf_8
bbeb66e2a1c3ff1e5215a3de0291398a
// { dg-do compile { target c++11 } } template <typename T> struct A {}; template <int... I> struct B: A<I...> {}; // { dg-error "type" }
google
android
variadic56
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic56.C
453
utf_8
9bc7a5eebc44711f15bece140355fae7
// { dg-do compile { target c++11 } } 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 tu...
google
android
constexpr-recursion
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-recursion.C
283
utf_8
3d462eb6b34feb0c1cf9349c9e6e976c
// Test that we catch excessive recursion. // { dg-do compile { target c++11 } } // { dg-options "-fconstexpr-depth=5" } // { dg-prune-output "in constexpr expansion" } constexpr int f (int i) { return f (i-1); } constexpr int i = f(42); // { dg-error "constexpr evaluation depth" }
google
android
auto29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto29.C
392
utf_8
0c6f2e035663c64946f00a0114eb6b45
// PR c++/51401 // { dg-do compile { target c++11 } } template <int> struct A { auto i; // { dg-error "non-static data member declared" } }; template <int> struct B { auto i = 0; // { dg-error "non-static data member declared" } }; struct C { auto i; // { dg-error "non-static data member declared" } }; struct...
google
android
initlist39
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist39.C
183
utf_8
8bd9162cf8945e87a36a313516ca7f14
// { dg-do compile { target c++11 } } struct A { int i; }; void f (const A &); void f (A &&); void g (A, int); void g (A, double); int main() { f ( { 1 } ); g ( { 1 }, 1 ); }
google
android
constexpr-main
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-main.C
91
utf_8
25358bf087f99e99f8fbfc8bcd9f01be
// { dg-do compile { target c++11 } } constexpr int main (); // { dg-error "constexpr" }
google
android
gen-attrs-19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-19.C
158
utf_8
cafb4050999077603b35549aaf971561
// PR c++/19739 // { dg-do compile { target c++11 } } void Dummy() [[ , ]]; void Dummy() {} int main (int argc, char **argv) { Dummy(); return 0; }
google
android
pr42844-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr42844-2.C
1,029
utf_8
6f97c3d60bd0c567e3e9f13442ffc8f7
// PR c++/42844 // { dg-do compile { target c++11 } } struct A // { dg-message "user-provided default constructor" } { int i; A() = default; // { dg-message "not user-provided" } }; struct Base { Base() {} }; struct Derived : Base // { dg-message "user-provided default constructor" } { int i; Der...
google
android
variadic127
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic127.C
230
utf_8
ab22926cc8b3537bb66c4840aa8d6c65
// PR c++/51148 // { dg-do compile { target c++11 } } template<typename... Types> struct S {}; template<typename... Types> struct T { friend class S<Types>; // { dg-error "parameter packs not expanded" } }; int main() {}
google
android
variadic-ex9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex9.C
433
utf_8
6dfc2680a805f364e5dc93da42871110
// { dg-do compile { target c++11 } } template<typename... Args> char& f(Args... args); // #1 template<typename T1, typename... Args> short& f(T1 a1, Args... args); // #2 template<typename T1, typename T2> int& f(T1 a2, T2 a3); // #3 void g() { char& x = f(); /...
google
android
variadic83
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic83.C
212
utf_8
d540612e2ceb49b3a7fc912772ca1deb
// PR c++/31441 // { dg-do compile { target c++11 } } template<typename> struct A; template<typename... T> struct A<T...> { }; // { dg-bogus "cannot expand" "" } A<int> a; // { dg-bogus "incomplete type" "" }
google
android
auto24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto24.C
118
utf_8
853aef3053fbd59823ede3d7e849d6bf
// PR c++/48599 // { dg-do compile { target c++11 } } int v[1]; auto (*p)[1] = &v; // { dg-error "array of .auto" }
google
android
range-for5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for5.C
741
utf_8
67e09b51d371dfdd82cd7bfe2c432763
// Test for errors in range-based for loops // { dg-do compile { target c++11 } } struct container { }; int *begin(const container &c) { return 0; } int end(const container &c) //Ops! wrong type { return 0; } struct Implicit { Implicit(int x) {} }; struct Explicit { explicit Explicit(int x) {} }; voi...
google
android
decltype11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype11.C
137
utf_8
dab751c0d217002893d6d2cce32516a6
// PR c++/35316 // { dg-do compile { target c++11 } } template<int> struct A { int i : 2; void foo() { decltype(i) j; } };
google
android
variadic55
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic55.C
281
utf_8
2308a07a86e678b41b5d3b36ee013a12
// { dg-do compile { target c++11 } } template<typename F, typename... BoundArgs> class bound_functor { public: bound_functor(const BoundArgs&... bound_args); }; template<typename F, typename... BoundArgs> bound_functor<F, BoundArgs...>::bound_functor(const BoundArgs&...) { }
google
android
alias-decl-35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-35.C
246
utf_8
6594efe8f80c0023b66df6ae2d369086
// PR c++/57279 // { dg-require-effective-target c++11 } typedef void fc1() const; // OK typedef void frr1() &&; // OK typedef void fcr1() const &; using fc2 = void() const; // #4 using frr2 = void() &&; // OK using fcr2 = void() const &; // #6
google
android
nsdmi-list2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-list2.C
382
utf_8
28861172743173b9d509ef8324377edf
// PR c++/50930 // { dg-do compile { target c++11 } } struct nmc { nmc() = default; nmc(nmc&&) = delete; // line 3 }; struct A { // line 6 nmc n{}; nmc n2 = {}; } a; // line 8 // ------ struct lock_t { int lock[4]; }; struct pthread_mutex_t { volatile lock_t __spinlock; }; struct mutex { pthread_mutex_t...
google
android
rv-lvalue-req
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C
346
utf_8
ea513230550307f5df4e85eacd7d581c
// { dg-do compile { target c++11 } } template <class T> T&& declval(); int main() { &declval<int>(); // { dg-error "xvalue" } declval<int>() = declval<int>(); // { dg-error "xvalue" } declval<int>()++; // { dg-error "xvalue" } --declval<int>(); // { dg-error "xvalue" } declval<int>() += 1; /...
google
android
nsdmi4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi4.C
206
utf_8
5f65bb87e42c6ccb9b5a2788ce979bcf
// { dg-do run { target c++11 } } int c; struct A { A() { } A(const A&) { } }; A f() { ++c; return A(); } struct B { A a = f(); }; int main() { B b1, b2; if (c != 2) __builtin_abort(); }
google
android
dc6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc6.C
420
utf_8
fc05398acf4b63071f73ac571828a634
// { dg-do run { target c++11 } } int a_ct; struct A { A(int i): i(i) { ++a_ct; } A(const A& a): i(a.i) { ++a_ct; } ~A() { --a_ct; } int i; }; struct V { V() { } }; struct B: virtual V { A a; B(A a): a(a) { } B(int i): B(A(i)) { } }; struct C: B { C(int i): B(i) { } }; int main() { { B b(4...
google
android
range-for19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for19.C
169
utf_8
f2a4a726a9f93843defe980006f2d5d0
// PR c++/49838 // { dg-do compile { target c++11 } } int main() { auto a; // { dg-error "no initializer" } for(auto i: a) // { dg-error "deduce" } ; }
google
android
alias-decl-31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-31.C
341
utf_8
096e0ef33aaa6cad2823136e6b86ad6b
// Origin: PR c++/55663 // { dg-do compile { target c++11 } } template <typename> constexpr bool the_truth () { return true; } template <bool> struct Takes_bool { }; template<bool B> using Alias = Takes_bool<B>; template<typename T> struct test { using type = Alias<the_truth<T>()>; }; int main () { test<in...
google
android
initlist59
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist59.C
150
utf_8
fc95bc884eea4274498ca7f2a44538d6
// PR c++/49996 // { dg-do compile { target c++11 } } struct A { ~A() { } }; struct B { const A& ref; }; int main() { B* p = new B{A()}; }
google
android
nsdmi7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi7.C
376
utf_8
166e766712d73e0f36cf9fdc615dc630
// PR c++/53594 // { dg-do compile { target c++11 } } // { dg-options "-Wuninitialized" } struct A { const int a = 6; // { dg-bogus "non-static const member" } static int b; int &c = b; // { dg-bogus "non-static reference" } }; struct B { const int d; // { dg-warning "non-static const member" } int &e; /...
google
android
bracket4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/bracket4.C
431
utf_8
0e5d753f1eb3b3a9d595137ba68b25de
// { dg-do compile { target c++11 } } 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() { vector<vector<i...
google
android
trailing8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/trailing8.C
491
utf_8
f36e89f1ae30b44f8903af9195861ef2
// PR c++/54359 // { dg-require-effective-target c++11 } int& ref(int& x) { return x; } const int& ref(const int& x) { return x; } class A { int x; int f() const; auto test1() const -> decltype(this); auto test2() const -> decltype(ref(x)); auto test3() const -> decltype(f()); }; auto A::test1() ...
google
android
nsdmi-virtual2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual2.C
145
utf_8
f9a95403a108b26b2de03038d43da14f
// PR c++/51474 // { dg-do compile { target c++11 } } struct A { virtual int foo() = 0; int i = foo(); // { dg-warning "pure virtual" } };
google
android
variadic158
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic158.C
516
utf_8
a516c60e45bf1eecdf3636277e7f49cb
// PR c++/61134 // { dg-do compile { target c++11 } } struct Base { }; template <typename> struct Fixed { typedef const char* name; }; template <typename VT, typename... Fields> void New(const char* name, typename Fixed<Fields>::name... field_names); template <typename VT, typename... Fields> void Create...
google
android
pr32566
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr32566.C
156
utf_8
42e324b50891754de66d83f5b10314ab
// { dg-do compile { target c++11 } } template<int...> struct A; template<template<int> class... T> struct A<T...> {}; // { dg-error "mismatch|expected" }
google
android
constexpr-value4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C
402
utf_8
9723fae309dff5e39e0b630954d2d10e
// PR c++/57901 // { dg-require-effective-target c++11 } struct Z { Z() = default; Z(Z const&) = default; constexpr Z(Z&&) {} /* non-trivial (constexpr) move ctor */ }; template<typename T> constexpr int fn0(T v) { return 0; } template<typename T> constexpr int fn (T v) { return fn0(v); } constex...
google
android
variadic128
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic128.C
207
utf_8
7bc8aa4e7950e0675bd7838797afe2be
// PR c++/50303 // { dg-do compile { target c++11 } } template<typename Interface> struct A1 { }; template<template<class I> class... Actions> void g2() { g2<Actions...>(); } int main() { g2<A1>(); }
google
android
inh-ctor7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor7.C
215
utf_8
69ad16a291979db5662ea42e8bd7fa16
// { dg-do compile { target c++11 } } struct A { int i; template <class T> constexpr A(T t): i(t) {} }; struct B: A { using A::A; }; constexpr B b(42); #define SA(X) static_assert((X),#X) SA(b.i == 42);
google
android
cast
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/cast.C
622
utf_8
187570e3c22a8b653586c0634ca8ae03
// I, Howard Hinnant, hereby place this code in the public domain. // Test cast from lvalue to rvalue // { dg-do compile { target c++11 } } // { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } } template <bool> struct sa; template <> struct sa<true> {}; struct one {long x[1]...
google
android
gen-attrs-53
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-53.C
799
utf_8
5513888f6526563b3ba87bd80efb6153
// { dg-do compile { target c++11 } } int toto () { [[gnu::unused]] good: return 0; } int foo () { [[gnu::unused]] good: int i = 0; // A C++11 attribute at the beginning of the return statement is // syntactically correct, appertains to the return statement (not to // the label) but is currently ig...
google
android
inh-ctor3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor3.C
393
utf_8
6a7a4b5897b83f2f6ebdd08eb567d152
// { dg-do compile { target c++11 } } struct B1 { B1(int); }; struct B2 { B2(int); }; struct D1 : B1, B2 { using B1::B1; // { dg-error "inherited" } using B2::B2; // { dg-error "inherited" } }; // ill-formed: attempts to declare D1(int) twice struct D2 : B1, B2 { using B1::B1; using B2::B2; D2(i...
google
android
auto35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto35.C
188
utf_8
63e8d03de025cf814a59ef37bab6b78f
// PR c++/53122 // { dg-do compile { target c++11 } } template<typename... Args> void foo(Args&&...) { } template<typename... Args> void bar(Args&&...) { auto fn = foo<Args...>; }
google
android
vt-51314
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-51314.C
437
utf_8
94accbb1b8bfc74f335cb4d65ec8d318
// { dg-do compile { target c++11 } } // { dg-prune-output "invalid" } template<int>struct A{}; template<class...U>void f(U...){ A<sizeof...U> x; // { dg-error "surrounded by parentheses" } } template<int...> struct Indices; template<class> struct Next_increasing_indices; template<int...I> struct Next_increasing...
google
android
range-for24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for24.C
221
utf_8
75c55c4514a4f778d81e382b928dc1d3
// PR c++/56794 // { dg-require-effective-target c++11 } template<int... values> static void Colors() { static const int colors[] = { values... }; for(auto c: colors) { } } int main() { Colors<0,1,2> (); }
google
android
nsdmi-list3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-list3.C
407
utf_8
ef20e3e0e53b4fb3163e5066efb89b64
// PR c++/54998 // { dg-do compile { target c++11 } } class Foo { public: private: static const int kRows = 4; static const int kCols = 4; union { float m_n[kRows][kCols]; float m_m[kRows * kCols] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,...
google
android
auto5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto5.C
266
utf_8
7abd7f6467fdec05adaab6e23e984bfb
// Testcase for non-dependent auto in templates // { dg-do compile { target c++11 } } struct A { template<class> void f(); } a; template <class T> void g() { auto aa = a; aa.f<int>(); auto p = new auto (a); p->f<int>(); } int main() { g<double>(); }
google
android
pr48522
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr48522.C
364
utf_8
193be9cc434dd7e3d92f02940743b292
// { dg-do compile { target c++11 } } template <typename T> struct Handle { Handle(T& t); }; template<class T> struct Class { struct Struct {} data; void f(); void g(); }; template<class T> void Class<T>::f() { Handle< decltype((data)) > handle(data); } template<class T> void Class<T>::g() { ...
google
android
defaulted1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted1.C
494
utf_8
0327ff6cdc6919e44dedf6e971a56e1d
// Positive test for defaulted/deleted fns // { dg-do run { target c++11 } } 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}; a1 = a2; } ...
google
android
decltype8
.C
toolchain/gcc/gcc-4.9/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
android
implicit-copy
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C
210
utf_8
9efada2e8cbcac32c0257fef01bf08a7
// { dg-do compile { target c++11 } } struct S { S(); private: S(S const &&); S & operator=(S const &&); }; void f() { S a; S b(a); // { dg-error "deleted" } a = b; // { dg-error "deleted" } }
google
android
implicit2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/implicit2.C
440
utf_8
7a0c0404140f8be4c4780850aaea27d4
// Test that the synthesized C copy constructor calls the A template // constructor and has the appropriate exception specification. // { dg-do run { target c++11 } } int r = 1; struct A { A() {} A(const A&) throw () { } template <class T> A(T& t) { r = 0; } }; struct B { B() {} B(B&) throw () { } }; struct...
google
android
warn_cxx0x2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x2.C
164
utf_8
47cd48fad76b6ff749898de2bc0f7698
// PR c++/50810 // { dg-do compile { target c++11 } } // { dg-options "-std=gnu++98 -Wc++11-compat" } signed char data[] = { 0xff }; // { dg-warning "narrowing" }
google
android
pr57416
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57416.C
729
utf_8
61f21d8df7c5bf86294921e6f7a23feb
// PR c++/57416 // { dg-do compile { target c++11 } } struct Nothing { }; template <class PARENTDATA> void func3 (PARENTDATA & p_parent_data) { struct Data { PARENTDATA & parent_data = p_parent_data; // { dg-error "parameter" } } data; } template <class PARENTDATA> void func2 (PARENTDATA & p_parent_data) ...
google
android
deleted9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/deleted9.C
817
utf_8
cfa749d587e9ffe675ffde4ecd146469
// PR c++/64352 // { dg-do compile { target c++11 } } template<bool B> struct bool_type { static constexpr bool value = B; }; using true_type = bool_type<true>; using false_type = bool_type<false>; template<typename T> T&& declval(); template<typename...> struct void_ { using type = void; }; template<typename... I>...
google
android
variadic21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic21.C
154
utf_8
6c01dd410a2c1ca78dc76d95e3feb410
// { dg-do compile { target c++11 } } template<typename T, int... Dims> struct array { }; array<int> a0; array<int, 1> a1; array<int, 1, 2, 3, 4> a1234;
google
android
rv-bitfield2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C
170
utf_8
1e9966d28717f5fb799ff5c2afa3c83b
// PR c++/51868 // { dg-do compile { target c++11 } } struct A { A() {} A(const A&) {} A(A&&) {} }; struct B { A a; int f : 1; }; B func() { return B(); }
google
android
sfinae35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae35.C
286
utf_8
c50ea6693dabedb7cd0a362c0e829771
// PR c++/52363 // { dg-do compile { target c++11 } } #include <type_traits> struct proxy { void operator=(int const&); void operator=(int&&) const; }; static_assert( !std::is_assignable<proxy, int>::value, "" ); static_assert( std::is_assignable<const proxy, int>::value, "" );
google
android
pr58707
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr58707.C
135
utf_8
135956a1794cb24e32c252e833402edb
// PR c++/58707 // { dg-do compile { target c++11 } } template<int i> class TC { }; constexpr int foo[] = { 42 }; TC<foo[0 > 1]> bar;
google
android
Wzero-as-null-pointer-constant-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C
2,748
utf_8
948a776d6405969529e65e69911b6f98
// { dg-do compile { target c++11 } } // { dg-options "-Wzero-as-null-pointer-constant" } struct A; typedef int (A::*pointmemfun) (int); typedef int (A::*pointdmem); typedef int (*pointfun) (int); pointmemfun pmfs; pointdmem pdms; pointfun pfs; int* ps; void f() { pointmemfun pmf(0); // { dg-warning...
google
android
extern_template-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/extern_template-1.C
132
utf_8
17b14634dec8aeb365371418aa64cddf
// { dg-do compile { target c++11 } } // { dg-options "-pedantic" } template <typename> void f() {} extern template void f<int>();
google
android
variadic44
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic44.C
216
utf_8
304e541880e9348ea9db0d727df6c7be
// { dg-do compile { target c++11 } } 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
android
auto30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto30.C
244
utf_8
137b55f91ad6b59634d3e05053c11138
// Origin PR c++/51473 // { dg-do compile { target c++11 } } struct A { auto friend struct B; // { dg-error "multiple types|can only be specified|friend" } }; auto int; // { dg-error "multiple types|can only be specified for variables" }
google
android
nsdmi-union3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C
112
utf_8
24d435bfe180c503be113a8efa76cca0
// PR c++/58965 // { dg-require-effective-target c++11 } void foo() { static union { int i = i; }; }
google
android
constexpr-static
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-static.C
578
utf_8
c098166ab7ac7d83a6a82032a0110240
// Test for constant initialization of non-literal class (e.g. mutex) // { dg-options "-save-temps" } // { dg-do run { target c++11 } } struct A { int i; constexpr A(int _i): i(_i) { } A(const A&); // non-trivial copy ctor makes A non-literal }; A a(42); // constexpr constructor allows constant init...
google
android
pr34060
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr34060.C
223
utf_8
11293761b08394e4687cecbfd621ea83
// PR c++/34060 // { dg-do compile { target c++11 } } template <int> struct A { template <typename... > struct B {}; template <typename... T> struct B <int, T *> {}; // { dg-error "not expanded|T" } }; A<0>::B<int>b;
google
android
variadic36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic36.C
432
utf_8
987c0ecaeb6fedeb79813d4e754b4863
// { dg-do compile { target c++11 } } template<typename T, typename... Args> void f(const T&, const Args&... args) { f(args); // { dg-error "packs not expanded" } } template<typename... Values> struct tuple_base { }; template<typename... Values> struct tuple : tuple_base<Values> { }; // { dg-error "packs not expand...