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 | variadic119 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic119.C | 172 | utf_8 | 0760bacea061109fd864e64cec17f00f | // PR c++/51046
// { dg-do compile { target c++11 } }
template<int... IS>
void f()
{
for (int i : IS); // { dg-error "not expanded" }
}
int main()
{
f<0, 1, 2>();
}
|
google | android | constexpr-function2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-function2.C | 1,369 | utf_8 | c8824c3ee50b95dbe4d6f37f5f0fcf3c | // { dg-do compile { target c++11 } }
// From N2235
// Mess with the builtin by redeclaring.
constexpr int abs(int x) { return x < 0 ? -x : x; }
extern "C"
{
constexpr float
squaref(float x) { return x * x; }
}
// implicitly inline, already: warn?
inline constexpr double
squared(double x) { return x * x; }
con... |
google | android | constexpr-ptrsub | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrsub.C | 359 | utf_8 | 2e9d0ef04a28487562d30ab99afa37a2 | // PR c++/51489
// DR 1313
// { dg-do compile { target c++11 } }
struct array
{
constexpr array() :x(0) {}
constexpr int const* begin() { return &x; }
int x;
};
constexpr array aa;
constexpr auto b = aa.begin();
static_assert(b-b == 0, "compiles just fine");
static_assert(aa.begin()-aa.begin() == 0, "compiler th... |
google | android | bad_array_new1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/bad_array_new1.C | 277 | utf_8 | 4a89b70ea75ae6415ffb0149eed4dc01 | // Test for throwing bad_array_new_length on invalid array length
// { dg-do run { target c++11 } }
#include <new>
void * f(int i)
{
return new int[i];
}
int main()
{
try
{
f(-1);
}
catch (std::bad_array_new_length) { return 0; }
__builtin_abort ();
}
|
google | android | udlit-inline | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-inline.C | 361 | utf_8 | 326b4054126136857eb96ed0001c43f7 | // { dg-do compile { target c++11 } }
// Literal operators can be inline.
inline int
operator"" _thing1(char cc)
{ return 42 * cc; }
int operator"" _thing2(char cc);
class Foo
{
int
friend operator"" _thing2(char cc)
{ return 42 * cc; }
};
int i = operator"" _thing1('x');
int j = 'x'_thing1;
int iF = opera... |
google | android | vt-34050 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-34050.C | 124 | utf_8 | 969a83a6dfa95bb86bce932ed8d47004 | // { dg-do compile { target c++11 } }
struct A {};
template<typename... T> struct B : T...
{
B() : T()... {}
};
B<A> b;
|
google | android | rv-deduce | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-deduce.C | 186 | utf_8 | de88aaa56b0d394bd02f079bb0f4dddf | // PR c++/36816, core issue 873
// { dg-do compile { target c++11 } }
template <class T> void h (T&&) { }
void (*pf)(int&) = &h;
template <> void h(char&);
template void h(double&);
|
google | android | initlist-opt | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C | 440 | utf_8 | 32305a01a1452a964c747feea568e46f | // PR c++/41997
// { dg-do compile { target c++11 } }
// { dg-options "-O2 -fdump-tree-optimized" }
// { dg-final { scan-tree-dump-not "_0" "optimized" } }
// { dg-final { cleanup-tree-dump "optimized" } }
#include <initializer_list>
inline int max_val(std::initializer_list<int> il)
{
int i = *(il.begin());
... |
google | android | constexpr-object1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-object1.C | 691 | utf_8 | de515079b24e8f984c63adc213bda407 | // { dg-do compile { target c++11 } }
// From N2235
// 4.5.2 semantics
// p 1 constexpr specifier
// objects, static const data
struct A1 { int i; }; // { dg-message "no user-provided default constructor" }
constexpr int i1 = 1024;
constexpr A1 a1 = A1();
// error: not a definition
extern constexpr int i2; // {... |
google | android | ref-qual15 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/ref-qual15.C | 153 | utf_8 | baf0dc0526b9c7116fa5e5cbccbe2286 | // PR c++/59296
// { dg-do compile { target c++11 } }
struct Type
{
void get() const& { }
void get() const&& { }
};
int main()
{
Type{}.get();
}
|
google | android | sfinae9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae9.C | 637 | utf_8 | 03177ceac1dca2efe41bd4b603c2a79e | // PR c++/48450
// { dg-do compile { target c++11 } }
namespace std {
template <class T> T&& declval();
}
template<class To, class From,
class = decltype(static_cast<To>(std::declval<From>()))
>
char f(int);
template<class, class>
char (&f(...))[2];
struct A { virtual ~A() = 0; };
struct B {};
struct D : B {};
... |
google | android | constexpr-array-ptr4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr4.C | 447 | utf_8 | 12a7829023637da75e6542a82c846dd8 | // { dg-do compile { target c++11 } }
constexpr const int do_last(const int* x, int n) {
return x[n - 1];
}
struct IsNegative {
constexpr bool operator()(const int& x) {
return x < 0;
}
};
template<int N, class Pred>
constexpr bool has_neg(const int (&x)[N], Pred p) {
return p(do_last(x, N)); // Line 13
}... |
google | android | rv1p | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv1p.C | 3,462 | utf_8 | ac9e27cdc3e5036d3f6f1cecac52306c | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overload resolution among reference types
// { dg-do compile { target c++11 } }
// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<tr... |
google | android | alias-decl-8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-8.C | 637 | utf_8 | 77aa48fcd9f9b9ffab08fa7ebc5d52e2 | // { dg-do compile { target c++11 } }
struct A {
template <class U> using C = U;
};
// The particularity of the below struct is to have more than 7
// fields. In this case, looking up a member here should exercise
// cp/search.c:lookup_field_1 in such a way that it finds it in the
// CLASSTYPE_SORTED_FIELDS of s... |
google | android | constexpr-stmtexpr | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-stmtexpr.C | 131 | utf_8 | 13f347d9618ff04627815ce13207d9de | // PR c++/46977
// { dg-do compile { target c++11 } }
// { dg-options "" }
template < typename > void
foo ()
{
({int i;}), 0;
}
|
google | android | constexpr-variadic | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-variadic.C | 234 | utf_8 | 9622059989ce32f5619192d8491911a2 | // { dg-do compile { target c++11 } }
template<class... T>
constexpr bool variadics(T&&...) { return true; }
struct IsLiteral {};
constexpr bool variadic_var = variadics(0, true, 1.2, IsLiteral{}); // Error, so below
int main() {}
|
google | android | decltype48 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype48.C | 324 | utf_8 | 0d37fd9f162782ce3623743f32744e05 | // PR c++/56059
// { dg-do compile { target c++11 } }
typedef int Int;
template<typename T> struct baz { };
template<typename T> T bar();
template<typename T, typename ... U>
baz<decltype(bar<Int>(bar<U>() ...))> // { dg-error "no match" }
foo();
int main()
{
foo<int, int>(); // { dg-error "no match" }
return 0... |
google | android | vt-35243 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-35243.C | 156 | utf_8 | be17af3ab5f544d5cf50656d00789a56 | // { dg-do compile { target c++11 } }
struct A {};
template<typename... T> struct B : T...
{
B() : T(x)... {} // { dg-error "not declared" }
};
B<A> b;
|
google | android | temp_default1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/temp_default1.C | 556 | utf_8 | e2c30c506c227664a12cede2fc526492 | // { 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;
};
template<typename T = int> void f()
{
static_assert(is_same<T, int>::value,
"T can only be ... |
google | android | variadic66 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic66.C | 182 | utf_8 | 7722304fe5105a9234fdc8e9af1c29c4 | // { dg-do compile { target c++11 } }
template<typename Result, typename Functor, typename... ArgTypes>
Result bind(Functor, ArgTypes...) { }
void f()
{
bind<int>(17, 20, 22);
}
|
google | android | constexpr-typedef1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C | 283 | utf_8 | e4e296b91d878f03ac7d69d384efc1f4 | // PR c++/50508
// { dg-do compile { target c++11 } }
template <class T>
struct integral_constant {
typedef T value_type;
constexpr operator value_type() { return true; }
};
static constexpr bool value = integral_constant<bool>()
&& true;
|
google | android | rv7p | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv7p.C | 8,438 | utf_8 | b7c216a64b313886be5ab92f5be27607 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overload resolution among reference types
// { dg-do compile { target c++11 } }
// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<tr... |
google | android | decltype31 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype31.C | 236 | utf_8 | a66c63b98b7a52091279ca1dd1553df9 | // PR c++/49921
// { dg-do compile { target c++11 } }
struct Local
{
void f();
};
Local *l;
void (Local::*ptr)();
decltype((l->*ptr)) i; // { dg-error "member function" }
// { dg-prune-output "invalid type in declaration" }
|
google | android | variadic5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic5.C | 724 | utf_8 | 42feeaf529ff2ac2e136bd6126276150 | // { dg-do compile { target c++11 } }
template<typename... Args>
struct tuple {
static const int value = 0;
};
template<>
struct tuple<> {
static const int value = 1;
};
template<>
struct tuple<int> {
static const int value = 2;
};
template<>
struct tuple<int, float> {
static const int value = 3;
};
templa... |
google | android | nsdmi-sizeof | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-sizeof.C | 119 | utf_8 | 532b3e2c733c1b03dfa22d18667650fb | // PR c++/57673
// { dg-do compile { target c++11 } }
template< int ... p >
struct d {
int n = sizeof ... ( p );
};
|
google | android | nullptr29 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr29.C | 123 | utf_8 | 0330e4f0441841a29e9e08fde7452323 | // PR c++/53882
// { dg-options "-O" }
// { dg-do compile { target c++11 } }
void f(decltype(nullptr) &__restrict np) { }
|
google | android | vt-35023 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-35023.C | 161 | utf_8 | ef373f5414df2f6583ce0b24e7ad383e | // { dg-do compile { target c++11 } }
template<typename... T> int foo()
{
T t; // { dg-error "parameter packs|T" }
return t;
}
void bar()
{
foo<int>();
}
|
google | android | inh-ctor12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor12.C | 261 | utf_8 | 0ea43dc94db355bd9b391484e229687c | // { dg-do run { target c++11 } }
struct A
{
int i;
template <class T>
A(T t) noexcept : i(t) {}
};
struct C
{
C() { throw 42; }
};
struct B: A, C
{
using A::A;
};
int main()
{
try { B b(24); }
catch (int) { return 0; }
__builtin_abort();
}
|
google | android | overload-conv-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/overload-conv-1.C | 273 | utf_8 | fb7661df85ad6b415b31574c67fa4ee0 | // { dg-do link { target c++11 } }
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 | android | constexpr-empty4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty4.C | 968 | utf_8 | 933cc130bc4ebc33fb81e8901f604e0a | // { dg-do compile { target c++11 } }
typedef decltype(sizeof(char)) size_type;
template<class T, size_type N, class Pred>
constexpr size_type do_find_if_or_stop(T (&x)[N], size_type i, Pred p);
template<class T, size_type N, class Pred>
constexpr size_type do_find_if(T (&x)[N], size_type i, Pred p) {
return p(x[i... |
google | android | auto11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto11.C | 185 | utf_8 | 1542c32ebbd7abdc32de3a250e383558 | // PR c++/38256
// { dg-do compile { target c++11 } }
template<int> struct A
{
template<typename T> operator T();
};
void foo()
{
A<0>().operator auto(); // { dg-error "auto" }
}
|
google | android | nsdmi-template10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template10.C | 166 | utf_8 | 4826317ec7401f0dceb7076d880beac7 | // PR c++/60999
// { dg-do compile { target c++11 } }
struct B
{
template<int N, int M>
struct A;
template<int M>
struct A<1, M>
{
int X = M;
};
};
|
google | android | auto9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto9.C | 3,663 | utf_8 | 91f07be6512ef2d67747f6d67938f109 | // PR c++/37962
// Negative test for auto
// { dg-do compile { target c++11 } }
#include <typeinfo>
#include <stdarg.h>
#include <stddef.h>
int i = *(auto *) 0; // { dg-error "auto" }
struct A *p = (auto *) 0; // { dg-error "auto" }
int *q = static_cast <auto *>(0); // { dg-error "auto" }
const int *r = const_cas... |
google | android | initlist42 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist42.C | 344 | utf_8 | f6dc1b5373312bc10801343f86529643 | // { dg-do compile { target c++11 } }
enum Unscoped { };
enum class Scoped { };
Unscoped bar(Unscoped x) { return x; }
Scoped bar(Scoped x) { return x; }
auto var1u = bar(Unscoped()); // OK
auto var1s = bar(Scoped()); // OK
auto var2u = bar(Unscoped{}); // #1 Error, but should work
auto var2s = bar(Scoped{}); // #2... |
google | android | inline-ns1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inline-ns1.C | 244 | utf_8 | 2bd94659e18571416ec707555f61b80d | // { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_ZN1Q2V11fEv" } }
// { dg-final { scan-assembler "_ZN1Q2V11iE" } }
namespace Q {
inline namespace V1 {
extern int i;
void f();
}
}
int Q::i = 1;
void Q::f() { }
|
google | android | variadic38 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic38.C | 189 | utf_8 | d0502011577945a98f8a343154297ef3 | // { dg-do compile { target c++11 } }
template<int... Values>
struct int_vec {};
template<int... Values>
struct int_vec<0, (Values+1)...> {}; // { dg-error "involves template parameter" }
|
google | android | sfinae4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae4.C | 655 | utf_8 | d1cc7ac4b5fb11b5d2d649dbec1501f3 | // { dg-do compile { target c++11 } }
namespace std { template <class T> T&& declval(); }
template<typename _Tp, typename... _Args>
class is_constructible_mini
{
typedef char __one;
typedef struct { char __arr[2]; } __two;
template<typename _Tp1, typename... _Args1>
static decltype(::new _Tp1(s... |
google | android | noexcept15 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept15.C | 613 | utf_8 | 0d84bad77fd4a5b3e29bbc5c59f96cc0 | // PR c++/50391
// { dg-do compile { target c++11 } }
#include <type_traits>
template<class Tp>
struct single
{
Tp elem; // { dg-error "incomplete type" }
constexpr single(const Tp& e)
: elem(e) { }
single(single&& s)
noexcept(std::is_nothrow_move_constructible<Tp>::value)
: elem(s.ele... |
google | android | variadic-sizeof3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C | 335 | utf_8 | 2d72d61260d803144b2ca621612a92f5 | // PR c++/59435
// { dg-require-effective-target c++11 }
template <typename... E>
struct T
{
T(unsigned int i = sizeof...(E)){} // does not compile
static constexpr unsigned int U = sizeof...(E);
T(unsigned int j, unsigned int i = U){} // compile
};
template <typename... T>
void test(int i = sizeof...(T))... |
google | android | rv-return | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-return.C | 460 | utf_8 | a0049d7ffeabdbd174e2947f6982af0a | // PR c++/41815
// { dg-do compile { target c++11 } }
template<typename T, typename U> struct same_type;
template<typename T> struct same_type<T, T> {};
int const f() { return 0; }
int &&r = f(); // binding "int&&" to "int" should succeed
same_type<decltype(f()), int> s1;
same_type<decltype(0,f()), int> s2;
templat... |
google | android | sfinae29 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae29.C | 404 | utf_8 | 25a3e2509122b9cfff462e30da14d72b | // PR c++/51047
// { dg-do compile { target c++11 } }
template<typename T> T &&declval();
template<class T> decltype(declval<T>().x) f(T *);
template<class T> char f(T);
struct B1{ int x; };
struct B2{ int x; };
struct D : public B1, B2{};
struct S { int x; };
int main()
{
S *p = nullptr;
static_assert(sizeof(f(p)... |
google | android | constexpr-ice15 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C | 177 | utf_8 | c0f1a3ef9d971f6d79f1dd03f5a9d4dd | // PR c++/58207
// { dg-do compile { target c++11 } }
struct A
{
virtual bool foo ();
};
struct B : public A
{
constexpr B () : A (&::n) {} // { dg-error "declared" }
};
|
google | android | constexpr-data2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-data2.C | 965 | utf_8 | bb9060a256e165fad568071979f642d9 | // { dg-do compile { target c++11 } }
template<typename _Tp, _Tp v>
struct A3
{
typedef _Tp value_type;
typedef A3<value_type,v> type;
static constexpr value_type value = v;
constexpr operator value_type() { return value; }
};
// Partial specialization.
template<typename _Tp, _Tp v>
struct A... |
google | android | variadic129 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic129.C | 339 | utf_8 | 9715b764952ffc97b14dca93a40f7b51 | // PR c++/50830
// { dg-do compile { target c++11 } }
template<template<class> class...>
struct list_templates {};
template<class>
struct aa {};
template<class... T>
struct test {};
template<template<class> class... F, class T>
struct test<list_templates<F...>, T>
{
struct inner {};
};
test<list_templates<aa>,... |
google | android | initlist15 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist15.C | 380 | utf_8 | 803cc72c140b1d53ee7a3e50e344d414 | // { dg-do compile { target c++11 } }
// Just discard errors pointing at header files
// { dg-prune-output "include" }
#include <vector>
#include <typeinfo>
using namespace std;
template< typename ... ArgTypes >
void test( ArgTypes ... args ) {
vector<type_info*> x = { &typeid(ArgTypes)... }; // { dg-error "" }
... |
google | android | alignof2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alignof2.C | 191 | utf_8 | f6ed96119608d817c8a36a47de91e2bc | // { dg-do compile { target c++11 } }
// { dg-options "-pedantic" }
int main(void)
{
alignof(int); //ok with a type but not with an expression
alignof(3); // { dg-warning "alignof" }
}
|
google | android | initlist2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist2.C | 541 | utf_8 | 4ae55f72ebc2b0270ada213dd8a7acdb | // Test that conversion to std::initializer_list takes priority over other
// user-defined conversions.
// { dg-do link { target c++11 } }
#include <initializer_list>
struct string
{
string (const char *) {}
template <class Iter> string (Iter, Iter);
};
template <class T, class U>
struct pair
{
pair (T t, U... |
google | android | ref-qual10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/ref-qual10.C | 185 | utf_8 | 83006414ce3fb0ff309ccc08c7d9bf23 | // PR c++/57252
// { dg-require-effective-target c++11 }
struct foo {
void bar() & {}
void bar() && {}
};
int main()
{
auto p = &foo::bar; // { dg-error "" }
(foo{}.*p)();
}
|
google | android | udlit-args-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-args-neg.C | 1,087 | utf_8 | 105afdaab67705867be05808d72c4aa8 | // { dg-do compile { target c++11 } }
#include <cstddef>
class Foo { };
int
operator"" _Foo(); // { dg-error "has invalid argument list" }
Foo
operator"" _Foo(int *); // { dg-error "has invalid argument list" }
Foo
operator"" _Foo(unsigned long int); // { dg-error "has invalid argument list" }
Foo
operator"" _Foo... |
google | android | decltype5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype5.C | 717 | utf_8 | b1edbe2667f53e32916c641c231faea9 | // { 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;
};
#define CHECK_DECLTYPE(DECLTYPE,RESULT) \
static_assert(is_same< DECLTYPE , RESULT >::value, #RESULT)
tem... |
google | android | gen-attrs-28 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-28.C | 181 | utf_8 | 0e471b62b7e1efd4f257ea87013e006e | // PR c++/28558
// { dg-options "" }
// { dg-do compile { target c++11 } }
struct A
{
A(int) { }
};
int main()
{
A a = (A [[gnu::unused]])0; // { dg-warning "attribute" }
}
|
google | android | variadic108 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic108.C | 186 | utf_8 | d4c4e703f1f09c25127848d83a5a9328 | // PR c++/48736
// { dg-do compile { target c++11 } }
template<class T>
T&& create();
template<class T, class... Args,
class = decltype(T{create<Args>()...}) // Line X
>
char f(int);
|
google | android | pr51619 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr51619.C | 137 | utf_8 | a651fa90dfc4e74e07a59973c08e71cf | // PR c++/51619
// { dg-do compile { target c++11 } }
struct A { virtual ~A(); };
struct B { A a[1][1]; } b;
struct C { A a[3][3]; } c;
|
google | android | udlit-addr | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-addr.C | 210 | utf_8 | 3aaefceebabf704241cd27c1faac7d22 | // { dg-do compile { target c++11 } }
#include <cstddef>
bool operator"" _yn(const char*, size_t);
typedef bool (*pfunk)(const char*, size_t);
pfunk p = &operator"" _yn;
bool tf = p("Hello,\0 World!", 14);
|
google | android | constexpr-and | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-and.C | 393 | utf_8 | 3f271472f05de1e297d6ea28097b47d1 | // PR c++/56481
// Non-linearity in potential_constant_expression_1
// { dg-do compile { target c++11 } }
struct S
{
constexpr bool foo ();
#define A(n) , f##n##0, f##n##1, f##n##2, f##n##3
#define B(n) A(n##0) A(n##1) A(n##2) A(n##3)
#define C B(0) B(1) B(2) B(3)
bool f C;
};
constexpr bool
S::foo ()
{
#undef A
... |
google | android | enum8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum8.C | 105 | utf_8 | abc44eb22da72a23ff5cdc8dc068d0e0 | // PR c++/47704
// { dg-do compile { target c++11 } }
void
foo ()
{
enum class E { A, B };
new E;
}
|
google | android | nullptr23 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr23.C | 306 | utf_8 | d777236ca68365e8e6a7b45bf4e707fb | // PR c++/50361
// { dg-do compile { target c++11 } }
#include <initializer_list>
struct Foo
{
Foo(std::initializer_list<Foo>) { };
template<class T> Foo(T t) { T u(t); }
private:
union Data
{
Data() : null(nullptr) {}
std::nullptr_t null;
} u_;
};
int main()
{
Foo f = { {} };
}
|
google | android | variadic105 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic105.C | 784 | utf_8 | fa8cc9c3ebd62862dce97edb027a7769 | // PR c++/47289
// { dg-do compile { target c++11 } }
// { dg-prune-output "note" }
template <template <typename... __ARGS> class _F, typename... _ARGS>
auto reverse (_ARGS... args) -> decltype(_F<_ARGS...>::call_function(args...)) {
return _F<_ARGS...>::call_function(args...);
}
template <typename _T>
_T sum(_T x)... |
google | android | variadic22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic22.C | 658 | utf_8 | 1712628fe1906417e2539856730f1f87 | // { dg-do compile { target c++11 } }
template<typename R, typename... ArgTypes>
struct make_function_type
{
typedef R type(ArgTypes... args);
};
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 | android | pr57981 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57981.C | 241 | utf_8 | e9cd0db7db25af8829963f7122d2ed31 | // { dg-do compile { target c++11 } }
// { dg-options "-Wall -Wextra" }
template<class T>
void f(T t, void* = 0) // { dg-warning "unused parameter" }
{
}
template<class T>
auto g(T t) -> decltype(f(t))
{
f(t);
}
int main()
{
g(0);
}
|
google | android | decltype-54581 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype-54581.C | 482 | utf_8 | 00e729275ab1e4200a00351217f95ceb | /* { dg-do compile { target c++11 } } */
/* { dg-options "-Wall" } */
typedef float v4f __attribute__((vector_size(4*sizeof(float))));
template <class T> void eat (T&&) {}
void test1 ()
{
v4f x = {0,1,2,3};
typedef decltype (x < x) v4i;
v4i y = {4,5,6,7}; // v4i is not opaque
eat (y);
}
template<class V>
vo... |
google | android | auto1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto1.C | 235 | utf_8 | d6b8228e103f94d72e6a708fde32a706 | // { dg-do compile { target c++11 } }
// { dg-options "-std=c++98 -Wc++11-compat" }
// Test warning for use of auto in C++98 mode with C++11
// compatibility warnings
void f()
{
auto int x = 5; // { dg-warning "changes meaning" }
}
|
google | android | variadic-ex1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C | 162 | utf_8 | 04627fee34edcaada1e023a10beff1a2 | // { dg-do compile { target c++11 } }
template<typename ... Elements> class Tuple;
Tuple<>* t; // OK: Elements is empty
Tuple* u; // { dg-error "template-name" }
|
google | android | constexpr-builtin1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin1.C | 548 | utf_8 | 27e0f50b50c73fe5b226a30b40ed229d | // PR c++/49813
// { dg-do compile { target c++11 } }
inline constexpr bool
isinf(long double __x)
{ return __builtin_isinf(__x); }
inline constexpr bool
isinf(double __x)
{ return __builtin_isinf(__x); }
inline constexpr bool
isnan(long double __x)
{ return __builtin_isnan(__x); }
int main()
{
constexpr long dou... |
google | android | variadic6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic6.C | 219 | utf_8 | 9323e65b6948cfbe0e54fdeeb9c1e134 | // { dg-do compile { target c++11 } }
template<typename ... Args>
struct tuple_base {};
template<typename ... Args>
struct tuple : public tuple_base<Args...>
{
};
tuple<> zero;
tuple<int> one;
tuple<float, int> two;
|
google | android | pr39639 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr39639.C | 497 | utf_8 | 3493537648da560f707109e667ef5360 | // Origin: PR c++/39639
// { dg-do compile { target c++11 } }
// { dg-prune-output "template argument 1 is invalid" }
template <class... Types>
struct S
: S<...Types>, // { dg-error "expected parameter pack before '...'" }
S<...Types...>, // { dg-error "expected parameter pack before '...'" }
S<...> // { dg-e... |
google | android | noexcept13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept13.C | 1,695 | utf_8 | ba7bc6434bc2f8b417831291c93fef78 | // PR c++/49107
// { dg-do compile { target c++11 } }
namespace std
{
template<typename _Tp> _Tp&& declval() noexcept;
struct true_type { static const bool value = true; };
struct false_type { static const bool value = false; };
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_impl
... |
google | android | initlist-deduce | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist-deduce.C | 595 | utf_8 | 8642aa67406b008384f59447a05a884c | // Test for deduction of T as std::initializer_list. This isn't currently
// supported by the working draft, but is necessary for perfect forwarding
// of initializer-lists to things that can take a std::initializer_list.
// { dg-options "-fdeduce-init-list" }
// { dg-do run { target c++11 } }
#include <initializer_... |
google | android | decltype56 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype56.C | 160 | utf_8 | a76fe613996dbf17e91139a680aa60e1 | // PR c++/52816
// { dg-do compile { target c++11 } }
class c {
int f;
public:
template <typename A>
decltype(f) m(A) const;
};
decltype(c{}.m(0)) i;
|
google | android | vt-55542 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-55542.C | 385 | utf_8 | d7602a60449fc61c76ec8c46127f6987 | // PR c++/55542
// { dg-do compile { target c++11 } }
template <typename ... P>
struct B
{
template <typename O>
B (O *o, void (O::*f) (P ... p)) {}
};
class C
{
void foo (void *, int);
template <typename ... A>
void bar (A ... a);
B <void *> c;
B <void *, int> d;
C (int) : c (this, &C::bar), d (this, ... |
google | android | variadic-nondeduce2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce2.C | 654 | utf_8 | 1441fa6139ca73d25aa889aafd3b483c | // PR c++/55220
// { dg-do compile { target c++11 } }
template <typename ...> struct something_like_tuple
{
};
template <typename, typename> struct is_last
{
static const bool value = false;
};
// Head is non-deducible, so this can't work as the user intended
template <typename T, template <typename ...> class Tu... |
google | android | gen-attrs-12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-12.C | 252 | utf_8 | 7de2f3d73363a0558cd75484e381dcca | // { dg-do compile { target c++11 } }
// PR c++/13791
template <typename T> struct O {
struct [[gnu::packed]] I {
int i;
char c;
};
I* foo();
};
template <typename T>
typename O<T>::I*
O<T>::foo() { return 0; }
template class O<int>;
|
google | android | enum15 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum15.C | 340 | utf_8 | 9b0e3954bb0489d3d5d9fad8bc0ca905 | // PR c++/44311
// { dg-do compile { target c++11 } }
enum class A { Val0, Val1 };
void foo (A a, int i)
{
switch (a)
{
case A::Val0: break;
case 1: break; // { dg-error "" }
}
switch (i)
{
case A::Val0: break; // { dg-error "" }
case 1: break;
case 2.0: break; // { dg... |
google | android | constexpr-value3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-value3.C | 168 | utf_8 | e51facd1504220c07dc2c0fc1946a396 | // PR c++/50234
// { dg-do compile { target c++11 } }
#define SA(X) static_assert((X),#X)
struct A { int i; };
constexpr int f(A a) { return a.i; }
SA(f({}) == 0);
|
google | android | variadic162 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic162.C | 383 | utf_8 | ac35a678008d70435c51c525cbbfce5b | // PR c++/63405
// { dg-do compile { target c++11 } }
template <typename _Tp> _Tp forward(_Tp);
template <typename Args> struct Format { Format(int, Args); };
template <typename... Args> auto format(Args &&... args) -> Format<Args...> {
return {0, args...};
}
template <typename... Args> void msg(Args... args) {
f... |
google | android | constexpr-builtin2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin2.C | 575 | utf_8 | 49ef21a2036978e291dda3cfdd0db015 | // PR c++/54021
// { dg-do compile { target c++11 } }
extern int nonconst_func(int);
constexpr int identity(int x) { return x; }
constexpr int zero() { return identity(0); }
constexpr int one() { return identity(1); }
// These are the same. Only the latter is accepted, though.
constexpr int rejected_const_4(int x)
{... |
google | android | rv-trivial-bug | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C | 687 | utf_8 | d9a4a919f8bc77e8525de663e8f23115 | // { dg-do compile { target c++11 } }
// PR c++/33235
#include <cassert>
int move_construct = 0;
int move_assign = 0;
struct base2 // { dg-message "declares a move" }
{
base2() {}
base2(base2&&) {++move_construct;}
base2& operator=(base2&&) {++move_assign; return *this;}
};
int test2()
{
base2 b;
... |
google | android | vt-55323 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-55323.C | 217 | utf_8 | 9041a97703f451f5649e698df7afd949 | // { dg-do compile { target c++11 } }
struct foo {
foo(int a, float b);
};
struct bar : foo {
template<typename... Args>
bar(Args&&... args) : foo(2, args){} // { dg-error "parameter packs" }
};
bar b(2,1.);
|
google | android | defaulted43 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted43.C | 792 | utf_8 | 2361de3fe5aae5c2a5e9c114c1db2fd3 | // PR c++/53903
// { dg-do compile { target c++11 } }
struct T
{
T() noexcept(false) { }
~T() noexcept(false) { }
};
T t;
struct A
{
A() noexcept;
~A() noexcept;
T t;
};
A::A() noexcept = default; // { dg-error "defaulted" }
A::~A() noexcept = default; // { dg-error "defaulted" }
struct U
{
U() noe... |
google | android | decltype39 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype39.C | 477 | utf_8 | 5c5a2ca8e170bf1af59a6323bf4acb8b | // PR c++/53788
// { dg-do compile { target c++11 } }
struct t { static const bool value = true; };
struct f { static const bool value = false; };
template<typename T>
struct has_static {
template<typename X>
static t check(X*, decltype(T::fun())* = 0); // { dg-error "without object" }
static f check(...);
t... |
google | android | alias-decl-5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C | 584 | utf_8 | e5fa8115f1c449f56d10e259c799b933 | // { dg-do compile { target c++11 } }
// alias template of a partial specialization
template<class T, class U, class W> struct S0 {};
template<class T, class U> struct S0<T, U, char> {};
template<class T> using AS0 = S0<T, int, char>;
void foo(S0<bool, int, char>);
AS0<bool> a; // OK
void
f()
{
foo(a); //OK
}
... |
google | android | inh-ctor6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C | 260 | utf_8 | 5b61cf579424c13698b5fa110271b044 | // { dg-do compile { target c++11 } }
extern "C" int printf (const char *, ...);
template< class T >
struct D : T {
using T::T;
// declares all constructors from class T
~D() { printf ("Destroying wrapper\n"); }
};
struct A {
A(int);
};
D<A> d(42);
|
google | android | variadic10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic10.C | 458 | utf_8 | 0c446134e3623f43b88b5e13a619a005 | // { dg-do compile { target c++11 } }
template<typename T1, typename T2>
struct pair {};
template<typename... Args>
struct tuple {
static const int value = 0;
};
template<>
struct tuple<pair<int, float> > { };
template<typename... Outer>
struct X {
template<typename... Inner>
struct Y
{
typedef tuple<pai... |
google | android | variadic-init | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-init.C | 918 | utf_8 | fb23a824547af5cbc2d6ee6a52d5e3c0 | // { dg-do run { target c++11 } }
// 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 + N)..., -1 };
#... |
google | android | vt-34751 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-34751.C | 599 | utf_8 | d7c16cf0b31308876be36bd64d788e89 | // { dg-do compile { target c++11 } }
// PR c++/34751
struct A {};
template<typename... Args = int> // { dg-error "cannot have a default" }
void f(Args... args = 0); // { dg-error "cannot have a default argument" }
template<typename... Args>
void g(Args... = 0); // { dg-error "cannot have a default argument" }
te... |
google | android | auto21 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto21.C | 224 | utf_8 | 125f26bba75bf498f5de0e78401f3d4c | // Origin PR c++/47208
// { dg-do compile { target c++11 } }
constexpr auto list = { }; // { dg-error "deducing from brace-enclosed initializer list requires #include <initializer_list>" }
static const int l = list.size();
|
google | android | constexpr-static3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-static3.C | 413 | utf_8 | 5ad257f66a792515c36f7fe5633f66de | // Test for constant initialization of class with vtable
// { dg-options "-save-temps" }
// { dg-final { scan-assembler-not "static_initialization" } }
// { dg-final cleanup-saved-temps }
// { dg-do run { target c++11 } }
int r = 1;
// implicit default constructor for A and B is constexpr
struct A { virtual void f() {... |
google | android | nsdmi-template8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C | 292 | utf_8 | 8228a8cc4123378699db41bb692816a8 | // PR c++/58188
// { dg-do compile { target c++11 } }
struct B {};
struct A
{
A( B );
};
struct Bar
{
template< unsigned v >
struct Foo
{
A z = B();
unsigned value;
Foo(): value( v ) {}
};
struct Baz
{
Foo< 8 > foo1;
Foo< 1 > foo3;
};
};
Bar::Baz baz;
|
google | android | trivial1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/trivial1.C | 1,683 | utf_8 | d120071db3e271c4dfdd28f3907bc50c | // { dg-do compile { target c++11 } }
// [basic.types]/10:
// Scalar types, trivial class types (Clause 9), arrays of such types and
// cv-qualified versions of these types (3.9.3) are collectively called
// trivial types.
// [class]/6:
// A trivially copyable class is a class that:
// * has no non-trivial copy constru... |
google | android | initlist37 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist37.C | 508 | utf_8 | e5ef0f10e6b99c9265b4b35881acb0ad | // DR 990
// { dg-do compile { target c++11 } }
#include <initializer_list>
struct S {
S(std::initializer_list<double>); // #1
S(std::initializer_list<int>); // #2
S(); // #3
// ...
};
S s1 = { 1.0, 2.0, 3.0 }; // invoke #1
S s2 = { 1, 2, 3 }; ... |
google | android | alias-decl-dr1286b | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286b.C | 242 | utf_8 | ef369c9d8dbd4b3ba5c764f92fc53a46 | // PR c++/60328
// { dg-require-effective-target c++11 }
template <class _T, class... _Rest>
struct Foo
{
template <class _TT, class... _RR>
using Bar = Foo<_TT, _RR...>;
using Normal = Foo<_Rest...>;
using Fail = Bar<_Rest...>;
};
|
google | android | variadic3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic3.C | 147 | utf_8 | 1fd738469a5027d2f09aa3932e4490d6 | // { dg-do compile { target c++11 } }
template<typename... Args>
class tuple {};
void f()
{
tuple<> x;
tuple<int> y;
tuple<int, float> z;
}
|
google | android | pr51225 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr51225.C | 280 | utf_8 | e25e46ac1ef482a94e8d4ce2b47bc9e7 | // PR c++/51225
// { dg-do compile { target c++11 } }
template<int> struct A {};
template<typename> void foo()
{
A<int(x)> a; // { dg-error "not declared|invalid type" }
}
template<typename> struct bar
{
static constexpr A<1> b = A<1>(x); // { dg-error "not declared" }
};
|
google | android | constexpr-initlist7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist7.C | 145 | utf_8 | ad96b3db3327ae43c2490e49c0c6271b | // PR c++/60186
// { dg-require-effective-target c++11 }
template<typename> void foo(int i)
{
constexpr int a[] = { i }; // { dg-error "" }
}
|
google | android | warn_cxx0x3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x3.C | 149 | utf_8 | 63c4393f0d30cf4ece84ac2fd581cbe0 | // PR c++/50810
// { dg-do compile { target c++11 } }
// { dg-options "-std=gnu++98 -Wc++11-compat -Wno-narrowing" }
signed char data[] = { 0xff };
|
google | android | variadic82 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic82.C | 227 | utf_8 | f524c4d416a4cd7a486b9f8b1a5257e0 | // PR c++/33461
// { dg-do compile { target c++11 } }
template<typename> struct A;
template<typename... T> struct A<T*...> // { dg-bogus "cannot expand" "" }
{
struct B;
};
A<void*> a; // { dg-bogus "incomplete type" "" }
|
google | android | udlit-nofunc-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-nofunc-neg.C | 260 | utf_8 | 9da9fba72d3e318e3af5d3d3b644c13f | // { dg-do compile { target c++11 } }
// Test user-defined literals.
// Test error on non-function declaration.
double operator"" _baddecl; // { dg-error "as non-function" }
template<char...>
int operator"" _badtmpldecl; // { dg-error "as non-function" }
|
google | android | static_assert2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert2.C | 733 | utf_8 | 7c94507411d8f0fcd4964618204cd929 | // { dg-do compile { target c++11 } }
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_ass... |
google | android | inh-ctor11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor11.C | 222 | utf_8 | 2b37803d8ae0337210ac50af1c684724 | // { dg-do compile { target c++11 } }
struct A
{
A(int, ...); // { dg-message "declared here" }
};
struct B: A
{
using A::A; // { dg-warning "ellipsis" }
};
B b1(42);
B b2(42, 1.0); // { dg-error "no match" }
|
google | android | trailing6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/trailing6.C | 123 | utf_8 | f3e1f3a23dff31653517cc48d206fafb | // PR c++/49003
// { dg-do compile { target c++11 } }
struct A {
auto a() const -> decltype(this) { return this; }
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.