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 | enum11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum11.C | 473 | utf_8 | 3d4835fbf1c7bf8c440d53dd9d2d1462 | // PR c++/48969
// { dg-do compile { target c++11 } }
// { dg-options "-ftemplate-depth=10" }
template<unsigned int N> struct Pair { };
struct Foo { enum { Mask = 1 }; } foo;
template<typename A, typename B> class Pair<A::Mask | B::Mask>
operator|(const A &, const B &) // { dg-message "substitution" }
{ }
Pair<Foo::M... |
google | android | auto37 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto37.C | 184 | utf_8 | 1767c76e31b9ebb6a0a0297b61c70aaa | // PR c++/55003
// { dg-do compile { target c++11 } }
template<typename T>
struct A {
static const auto t
= (typename T::type)42;
};
struct X {
typedef int type;
};
A<X> a;
|
google | android | nullptr13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr13.C | 189 | utf_8 | eef3b49a6f9e96517cf7aae1882fd86d | // { dg-do run { target c++11 } }
// Test typeid
#include <typeinfo>
int main()
{
const decltype(nullptr) mynull = 0;
if (typeid(nullptr) != typeid(mynull))
__builtin_abort();
}
|
google | android | rv3n | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv3n.C | 38,036 | utf_8 | 55c992c666707ed3778291008dd960c0 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overload resolution among reference types
// { dg-do compile { target c++11 } }
// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
... |
google | android | decltype6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype6.C | 749 | utf_8 | d523840f4fa291dfef125fedce66c6a9 | // { 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> const T& foo();
int i;
template<typename T>
struct A
{
double x;
};
const A<... |
google | android | pr31438 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31438.C | 242 | utf_8 | f5fcc5a194c85600daddc53e649d5c93 | // { dg-do compile { target c++11 } }
template<typename> struct A;
template<typename T, typename... U> struct A<T(U)> // { dg-error "parameter packs|U" }
{
template<typename X> A(X);
};
A<void(int)> a(0); // { dg-error "incomplete type" }
|
google | android | variadic52 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic52.C | 185 | utf_8 | c5a8fe3181bb55ac9d4e37778ad66bba | // { dg-do compile { target c++11 } }
template<typename T, T... Values>
struct vector_c { };
vector_c<int, 1, 2, 3> v1;
vector_c<char, 'a', 'b', 'c'> v2;
vector_c<long, 1u, 2, 3l> v3;
|
google | android | udlit-nosuffix-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-nosuffix-neg.C | 131 | utf_8 | c98f0db41b47932bd855703aa9e6af9f | // { dg-do compile { target c++11 } }
char32_t
operator"" (char32_t C) // { dg-error "expected suffix identifier" }
{ return C; }
|
google | android | udlit-operator-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-operator-neg.C | 654 | utf_8 | 56ddfcd520d1a267061bac3cb0eda1db | // { dg-do compile { target c++11 } }
// Can't have *both* literal operator template and raw literal operator.
int
operator"" _abc(const char*)
{
return 42;
}
template<char...>
int
operator"" _abc() // { dg-error "literal operator template|conflicts with raw literal operator" }
{
return 13;
}
t... |
google | android | named_refs | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/named_refs.C | 578 | utf_8 | 5ccbd38ed47b195447b9e41d8df03bb9 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test: Named rvalue references are treated as lvalues.
// { dg-do compile { target c++11 } }
// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
s... |
google | android | constexpr-defarg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg.C | 147 | utf_8 | 2aca1fb114aea81a9c27b98c5caa23bc | // PR c++/46335
// { dg-do compile { target c++11 } }
struct T { };
struct A {
A(const T &tr =T()) {}
};
struct B {
A k;
};
B kk_;
A fk_;
|
google | android | decltype18 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype18.C | 110 | utf_8 | 3017900b92ec943c19254d1e6f09417a | // PR c++/37875
// { dg-do compile { target c++11 } }
template <typename> struct X {};
X<decltype(1 > 2)> x;
|
google | android | range-for23 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for23.C | 150 | utf_8 | 3bdb7022f9d94e2ca7341f0ffd6060c9 | // PR c++/56722
// { dg-do compile { target c++11 } }
int main()
{
for (const auto& i, 21) // { dg-error "has no initializer|expected" }
i;
}
|
google | android | defaulted19 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted19.C | 316 | utf_8 | 06b4b5f3e4775bbcad5ef3d2f9697ff0 | // We don't allocate a cookie to help us run the destructor if it's trivial,
// even if it's deleted.
// { dg-do run { target c++11 } }
struct A
{
~A() = delete;
};
void *p = 0;
void *operator new[](__SIZE_TYPE__ t)
{
p = ::operator new (t);
return p;
}
int main()
{
A* ap = new A[5];
return ap != p;
}
|
google | android | Wunused-parm | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/Wunused-parm.C | 272 | utf_8 | 6ae3451e0c7b222e73c985a0c76a4253 | // PR c++/57211
// { dg-do compile { target c++11 } }
// { dg-options "-Wunused-parameter" }
template <class T> T&& move(T&);
struct A
{
struct B
{
B& operator=(B&&);
};
B f;
A& operator=(A&& p) = default;
};
int main()
{
A a;
A b;
b = move(a);
}
|
google | android | variadic-default | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-default.C | 210 | utf_8 | 838c74313216e798999fa2b5ad006175 | // PR c++/49205
// { dg-do compile { target c++11 } }
#include <initializer_list>
struct A {
template<typename ...T> A(T...);
A(std::initializer_list<short>);
A(std::initializer_list<long>);
};
A a{};
|
google | android | pr34054 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr34054.C | 123 | utf_8 | 4dd232ab66207cb5e950cede456ed93b | // PR c++/34054
// { dg-do compile { target c++11 } }
template<typename... T> T foo() {} // { dg-error "not expanded|T" }
|
google | android | pr51463 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr51463.C | 151 | utf_8 | b8dcd6480fb8f33d08c5486a30f85681 | // PR c++/51463
// { dg-do compile { target c++11 } }
struct A
{
static virtual int i = 0; // { dg-error "both virtual and static|declared as" }
};
|
google | android | alignof4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alignof4.C | 89 | utf_8 | 49ca0981579359ddb45186db7cc1d8cc | // PR c++/51316
// { dg-do compile { target c++11 } }
int main()
{
alignof(int []);
}
|
google | android | ref-qual7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/ref-qual7.C | 254 | utf_8 | c288331543b30d300aa6764b7ae67cda | // typedef test
// { dg-require-effective-target c++11 }
typedef void F() &;
F f; // { dg-error "" }
F* p; // { dg-error "" }
extern F& r; // { dg-error "" }
struct A {
F f;
};
int main()
{
A a;
a.f();
A().f(); // { dg-error "" }
}
|
google | android | nsdmi9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi9.C | 126 | utf_8 | 5a5bafe524b9f0057c94b91719d88f06 | // PR c++/58162
// { dg-require-effective-target c++11 }
struct A {
A();
A(A&&);
};
struct B {
A const a = A();
};
B b;
|
google | android | vt-35024 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-35024.C | 173 | utf_8 | 67a9e1648bef32bee2ed48a90c9ad67b | // { dg-do compile { target c++11 } }
template<typename... T> int foo()
{
typename T::X x; // { dg-error "parameter packs|T" }
return x;
}
void bar()
{
foo<int>();
}
|
google | android | variadic-sizeof1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof1.C | 235 | utf_8 | ec2fde26ddf074a4393a34fcd501a0cc | // PR c++/56679
// { dg-require-effective-target c++11 }
template <template <typename> class... Args>
struct Foo {
static const int value = sizeof...(Args);
};
template <typename> struct Bar { };
const int test = Foo<Bar>::value;
|
google | android | variadic1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic1.C | 176 | utf_8 | 6ea870203ba6aa066e88fcb8e46edb75 | // { dg-do compile { target c++11 } }
template<typename...>
class tuple;
template<typename... Args>
class tuple { };
template<typename T1, class... Args>
class tuple1p { };
|
google | android | sfinae13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae13.C | 307 | utf_8 | acd333c74850623f3161b736e7d81998 | // PR c++/48581
// { dg-do compile { target c++11 } }
template<class T>
T&& create();
template<class T,
class = decltype(foo(create<T>()))
>
auto f(int) -> char;
template<class>
auto f(...) -> char (&)[2];
struct S {};
void foo(S);
static_assert(sizeof(f<S>(0)) == 1, "Error"); // (#)
int main() {}
|
google | android | variadic74 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic74.C | 830 | utf_8 | 1a5e99627f6534997da9492013a89445 | // { dg-do compile { target c++11 } }
template <class... Types> class A
{
public:
template <Types... Values> class X { /* ... */ }; // { dg-error "not a valid type for a template non-type parameter" }
};
template<class... Types> class B
{
public:
template <Types*... Values> class X {
typename A<Types*...>::te... |
google | android | rv-cast4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-cast4.C | 194 | utf_8 | db69e4e0631892725d99d48517e599d5 | // PR c++/51161
// { dg-do compile { target c++11 } }
struct A{};
struct B : A{};
struct C : A{};
struct D : B, C{};
int main()
{
D d;
static_cast<A &&>(d); // { dg-error "ambiguous" }
}
|
google | android | range-for21 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for21.C | 110 | utf_8 | 7da87eff4f7e64da58b5263b4a758b3a | // PR c++/49983
// { dg-do compile { target c++11 } }
template <class T>
void f(T t)
{
for (auto v : t);
}
|
google | android | defaulted18 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted18.C | 273 | utf_8 | 31a73198c9bd440f150985fda8638626 | // { dg-do compile { target c++11 } }
void f(char i, int j) = delete; // { dg-message "<deleted>" }
void f(int i, ...); // { dg-message "void f" }
int main()
{
f(1,1); // { dg-error "ambiguous" }
// { dg-message "candidate" "candidate note" { target *-*-* } 8 }
}
|
google | android | pr51150 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr51150.C | 501 | utf_8 | 88c87171426f9e6d28da0206d5474e85 | // PR c++/51150
// { dg-do compile { target c++11 } }
struct Clock {
double Now();
};
template <class T> void Foo(Clock* clock) {
const int now = clock->Now();
}
template void Foo<float>(Clock*);
template <class T> void Boo(int val) {
const int now1 = (double)(val);
const int now2 = const_cast<double>(val); ... |
google | android | constexpr-47570 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-47570.C | 646 | utf_8 | 329a82a822423273c0c0256fd27a6d52 | // PR c++/47570
// { dg-do compile { target c++11 } }
unsigned int constexpr one()
{ return 1; }
int constexpr one_B()
{ return 1; }
int main()
{
// FAIL TO COMPILE:
static bool constexpr SC_huh1 = ((unsigned int)one()) >= ((unsigned int)0);
static bool constexpr SC_huh2 = one() >= ((unsigned int)0);
static ... |
google | android | alias-decl-20 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-20.C | 332 | utf_8 | d218f3158a292f48d6a78aa6b69aaf9b | // PR c++/53858
// { dg-do compile { target c++11 } }
template <typename T> struct s0 { typedef T tdef0; };
template <typename T> struct s1 { typedef T tdef1; };
template <typename T> using us1 = typename s1<T>::tdef1;
template <typename T, typename TT = typename us1<T>::tdef0> struct s2 {};
int main () { ... |
google | android | vt-34052 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-34052.C | 317 | utf_8 | d713641ecddef4b43871b5bb80c04242 | // { dg-do compile { target c++11 } }
template<typename... T, typename = T> struct A {}; // { dg-error "must be at the end" }
template<template<typename... T, typename = T> class U> struct B // { dg-error "must be at the end" }
{
template<int> U<int> foo(); // { dg-error "mismatch|constant|invalid|invalid" }
};
|
google | android | variadic91 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic91.C | 370 | utf_8 | ea7fc678e7dfd187716e4a585377e71a | // { dg-do compile { target c++11 } }
template<int N> struct Int2Type { };
template<typename... T>
struct Outer {
template<typename... U>
void foo(Int2Type<sizeof...(T)>, Int2Type<sizeof...(U)>);
};
Outer<short, int, long> outer;
void g4() {
outer.foo<float, double>(Int2Type<3>(), Int2Type<2>());
}
template<... |
google | android | initlist32 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist32.C | 244 | utf_8 | 348452a0372d790b7162b71f61d7cbcf | // Test that we try normal init if no list ctor is viable.
// { dg-do compile { target c++11 } }
#include <initializer_list>
struct B {};
struct C
{
C(B);
};
struct A
{
A(std::initializer_list<int>);
A(B) { }
};
B b;
A a{b}; |
google | android | rv-func | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-func.C | 433 | utf_8 | 9fbc9f5850a7e1b02cab7c95efb12229 | // PR c++/48457, Core 1238
// { dg-do compile { target c++11 } }
template<class T>
T&& create();
template<class T, class Arg>
void test() {
T t(create<Arg>());
(void) t;
}
void f (void (&)());
void f (void (&&)());
int main() {
test<void(&)(), void()>();
test<void(&&)(), void()>();
// This call should cho... |
google | android | variadic156 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic156.C | 248 | utf_8 | 0e3dc026b07c4ba87c8c89d690eccc97 | // PR c++/52844
// { dg-do compile { target c++11 } }
template < class > struct V { };
template < int...Is > void f ( V < Is...>) { } // { dg-error "mismatch|type" }
auto g ( ) -> decltype ( f ( V < long > ( ) ) ) ; // { dg-error "matching" }
|
google | android | alias-decl-0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-0.C | 558 | utf_8 | 14de020f6682d8f3c1354ba263101451 | // { dg-do compile { target c++11 } }
template<template<class> class TT> struct X { };
template<class> struct Y { };
template<class T> using Z = Y<T>;
void f(X<Y>);
void g(X<Z>);
void
foo()
{
// Below x and y have the same type (DR 1286)
X<Y> y;
X<Z> z;
// ... So these must compile.
f(z); // ... |
google | android | variadic20 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic20.C | 1,666 | utf_8 | 6db808b3cd75c23d5c1bf8746d82c687 | // { dg-do compile { target c++11 } }
template<typename T> struct add_pointer;
template<typename T> struct add_reference;
template<template<class T> class... Metafunctions>
struct metatuple {
static const int value = 0;
};
template<>
struct metatuple<add_pointer> {
static const int value = 1;
};
template<templat... |
google | android | gen-attrs-22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-22.C | 138 | utf_8 | d4dc911729d16cf9f552259eea132935 | // PR c++/27648
// { dg-do compile { target c++11 } }
void f()
{
static_cast<float *[[gnu::unused]]>(0); // { dg-warning "ignored" }
}
|
google | android | constexpr-55573 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C | 630 | utf_8 | 6d4ae475a457ae0681963f8fdc826852 | // PR c++/55573
// { dg-do compile { target c++11 } }
// { dg-options "" }
// Ignore warning on some powerpc-ibm-aix configurations.
// { dg-prune-output "non-standard ABI extension" }
template <typename T, int N>
struct ExtVecTraits {
typedef T __attribute__((vector_size (N * sizeof (T)))) type;
};
template <typen... |
google | android | sfinae48 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae48.C | 325 | utf_8 | 7f9ec6f23b495a9ffdc2eb43224e4e97 | // PR c++/57874
// { dg-do compile { target c++11 } }
namespace NX
{
struct X {};
void foo(X) {}
}
namespace NY
{
struct Y {};
}
template<class T>
auto ADLfoo(T&&) -> decltype((foo(T{}), short()));
char ADLfoo(...);
static_assert(sizeof(ADLfoo(NY::Y{})) == 1, "");
static_assert(sizeof(ADLfoo(NX::X{})) == 2, ... |
google | android | variadic4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic4.C | 502 | utf_8 | c4cff8b389e60f8c0ad855f0a781e8cc | // { dg-options "-fabi-version=0" }
// { dg-do compile { target c++11 } }
template<typename... Args>
class tuple {};
void f_none(tuple<>) {}
void f_one(tuple<int>) {}
void f_two(tuple<int, float>) {}
void f_nested(tuple<int, tuple<double, char>, float>) { }
// { dg-final { scan-assembler "_Z6f_none5tupleIJEE" } }
//... |
google | android | defaulted4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted4.C | 446 | utf_8 | 8be400825736e4702dcd8173c1e34c09 | // PR c++/37208: SFINAE and deleted functions.
// { dg-do compile { target c++11 } }
template<int> struct A { };
template<typename T>
int& int_if_addable(A<sizeof((*(T*)0) + (*(T*)0))>*);
template<typename T>
float& int_if_addable(...);
struct X { };
struct Y { };
Y operator+(Y, Y);
struct Z { };
Z operator+(Z, Z... |
google | android | initlist45 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist45.C | 125 | utf_8 | e78b41b2aa461ebe540e52ebf6339d42 | // PR c++/46289
// { dg-do compile { target c++11 } }
struct A
{
int i[2];
};
struct B
{
A a;
B(): a({{1,2}}) { }
};
|
google | android | nullptr16 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr16.C | 581 | utf_8 | d3a9ba2ba0ca938f90a73718215a4848 | // { dg-do compile { target c++11 } }
// Test template deduction
typedef decltype(nullptr) 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 | gen-attrs-14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-14.C | 386 | utf_8 | 4f4629fb27ecf013f83e46d3022bbc0b | // { dg-do compile { target c++11 } }
// PR c++/13170
// The bogus attribute is ignored, but was in TYPE_ATTRIBUTES during
// parsing of the class, causing some variants to have it and some not.
struct [[gnu::bogus]] A // { dg-warning "ignored" "" }
{
virtual ~A();
void foo(const A&);
void bar(const A&);
}... |
google | android | nullptr11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr11.C | 1,070 | utf_8 | 479562c95d823a2e2f8c04221d516077 | // { dg-do compile { target c++11 } }
// Test relational operators
#define assert_true(b) do { char c[2 * bool(b) - 1]; } while(0)
#define assert_false(b) do { char c[1 - 2 * bool(b)]; } while(0)
void fun()
{
assert_true(nullptr == nullptr);
assert_false(nullptr != nullptr);
assert_false(nullptr < nullptr);
... |
google | android | move1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/move1.C | 194 | utf_8 | c1feee422fd37f5c7d79276a96c23d07 | // { dg-do compile { target c++11 } }
#include <utility>
class A { };
static void g ( A && ) { }
template < class T > class B {
public:
void f ( ) {
A a;
g ( std :: move ( a ) );
}
};
|
google | android | sfinae36 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae36.C | 316 | utf_8 | 4f2ae9ae2d911de1ba0967ccb6fb7031 | // PR c++/52363
// { dg-do compile { target c++11 } }
// { dg-options "-pedantic" }
#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 | variadic132 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic132.C | 547 | utf_8 | 5e0d6d5db84504f475e1534613c59eb7 | // PR c++/53305
// { dg-do compile { target c++11 } }
template<class... Ts> struct tuple { };
struct funct
{
template<class... argTs>
int operator()(argTs...);
};
template<class...> struct test;
template<template <class...> class tp,
class... arg1Ts, class... arg2Ts>
struct test<tp<arg1Ts...>, tp<arg2Ts...>>
... |
google | android | initlist21 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist21.C | 299 | utf_8 | cca8f0f32efd7aaaf7b91296cf791904 | // PR c++/40689
// { dg-do compile { target c++11 } }
class X
{
public:
X(): data {1,2} {} // { dg-error "too many initializers" }
private:
const short data[1];
};
int f(int n)
{
const float * pData = new const float[1] { 1.5, 2.5 }; // { dg-error "too many initializers" }
return 0;
}
|
google | android | defaulted47 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted47.C | 264 | utf_8 | 9c11c2857ec4e4034b1d9d143b50000f | // PR c++/54812
// { dg-do compile { target c++11 } }
class A
{
A() = default; // { dg-error "private" }
};
A a; // { dg-error "context" }
class B
{
~B() = default; // { dg-error "private" }
};
B b; // { dg-error "context" }
|
google | android | decltype-33837 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype-33837.C | 191 | utf_8 | ae3bba7fda613fe3a5a34c24f853d36d | // { dg-do compile { target c++11 } }
// PR c++/33837
void foo()
{
__decltype (A::foo()); // { dg-error "was not declared|expected" }
__decltype (B); // { dg-error "was not declared" }
}
|
google | android | constexpr-union2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-union2.C | 218 | utf_8 | 380e22b3547a08b68dd8190a2a3a282d | // PR c++/51675
// { dg-do compile { target c++11 } }
union foo
{
int x = 0;
short y;
constexpr foo() = default;
};
union bar
{
int x;
short y;
constexpr bar() = default; // { dg-error "constexpr" }
};
|
google | android | variadic58 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic58.C | 385 | utf_8 | 89f59283c2637d5a81bd41017970c117 | // { dg-do compile { target c++11 } }
#include <typeinfo>
template<typename... Args>
void foo(Args...) { }
template<typename... Args>
void bar(Args... args) {
foo(Args()...);
foo(args = args...);
foo(reinterpret_cast<void*>(&args)...);
foo(const_cast<const Args>(args)...);
foo(static_cast<void*>(&args)...);... |
google | android | rv5n | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv5n.C | 30,943 | utf_8 | 33403c2e9cca99c9041b0b60af7744eb | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overload resolution among reference types
// { dg-do compile { target c++11 } }
// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
... |
google | android | pr34056 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr34056.C | 252 | utf_8 | 033a2fba0e5bbfdf3113d3497d30d5fd | // PR c++/34056
// { dg-do compile { target c++11 } }
template<typename... T> struct A
{
void foo (T *) { ++p; } // { dg-error "not expanded|T" }
void bar (T **) { } // { dg-error "not expanded|T" }
T *p; // { dg-error "not expanded|T" }
};
|
google | android | gen-attrs-40 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-40.C | 188 | utf_8 | 07d8ce7aa1bb54786d8dcfb173bcb392 | // PR c++/46803
// { dg-do compile { target c++11 } }
int strftime(char *, int, const char *, const struct tm *)
[[gnu::__bounded__(__string__,1,2)]]; // { dg-warning "ignored" }
|
google | android | variadic114 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic114.C | 513 | utf_8 | 70a3d15bd2eb39b3a2e2344b4d64ff03 | // PR c++/49785
// { dg-do compile { target c++11 } }
template <typename, typename ...> struct B { };
template <typename> class A;
template <typename R, typename ... S>
struct A <R (S ...)> : public B <R, S ...>
{
struct C {};
template <typename D> A (D, C = C ()) { }
R operator () (...);
};
template <typename... |
google | android | constexpr-ptrmem3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem3.C | 351 | utf_8 | 4d49e9b974a931e39b282bff1452e17a | // PR c++/62129
// { dg-do compile { target c++11 } }
class Evaluator
{
int MakeChangelist ();
typedef int (Evaluator::*fac_t)();
struct CreatorEntry
{
const char *type;
fac_t factory;
};
static constexpr CreatorEntry kCreators[] = { "", &Evaluator::MakeChangelist };
};
constexpr Evaluator::Creato... |
google | android | defaulted37 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted37.C | 338 | utf_8 | 4e5d1f13c44e7395c05bba723975da1e | // DR 1402
// { dg-do compile { target c++11 } }
struct A
{
A& operator=(A&&);
};
struct B: virtual A { B& operator=(B&&) = default; }; // { dg-warning "virtual base" }
struct C: virtual A { }; // { dg-warning "virtual base" }
int main()
{
B b1, b2;
b2 = static_cast<B&&>(b1);
C c1, c2;
c2 = static... |
google | android | initlist9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist9.C | 458 | utf_8 | de6fe33f85a45970df99586b8f8f48c8 | // PR c++/37860
// { dg-do compile { target c++11 } }
struct b
{
bool t;
b() = default;
~b() = default;
b& operator=(const b&) = delete;
b(const b&) = delete; // { dg-message "declared" }
b(bool _t): t (_t) { }
};
int main()
{
// copy list initialization
b tst1 = { false };
// copy initializatio... |
google | android | alias-decl-33a | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-33a.C | 297 | utf_8 | ef3546bcba268fc183fbb79d41b4ca4a | // PR c++/51239
// { dg-require-effective-target c++11 }
// This variant should work because tail is equivalent to list.
template<class y, class... x>
class list{};
template<class a, class... b>
using tail=list<a, b...>;
template <class...T>
void f(tail<T...>);
int main()
{
f<int,int>({});
}
|
google | android | decltype-call2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype-call2.C | 187 | utf_8 | 3df1dfeae5659a7702340d1f4c142e85 | // PR c++/52748
// We don't want to instantiate A<T> here.
// { dg-require-effective-target c++11 }
template <class T> struct A: T { };
template <class T> A<T> f(T);
decltype(f(42)) *p;
|
google | android | constexpr-ex2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ex2.C | 473 | utf_8 | eb26b0abcc0f714b5c289d7e2c17a591 | // { dg-do compile { target c++11 } }
// From N2235
// 4.5.3 constant expressions
// p 4
struct A {
constexpr A(int i) : val(i) { }
constexpr operator int() { return val; }
constexpr operator long() { return -1; }
private:
int val;
};
template<int I> struct X { static const int i = I; };
constexpr A a = 42;... |
google | android | initlist50 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist50.C | 258 | utf_8 | f3fac88e7a8455137c0751872cb1eb16 | // PR c++/45418
// { dg-do compile { target c++11 } }
struct A1 { };
struct A2 {
A2();
};
template <class T> struct B {
T ar[1];
B(T t):ar{t} {}
};
int main(){
B<int> bi{1};
A1 a1;
B<A1> ba1{a1};
A2 a2;
A2 a2r[1]{{a2}};
B<A2> ba2{a2};
}
|
google | android | constexpr-49776 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C | 235 | utf_8 | 82f2c8f0f5c7475480d4139049080a32 | // PR c++/49776
// { dg-do compile { target c++11 } }
struct s
{
int i[1];
template<class... Types>
constexpr s(Types... args)
: i{args...} // { dg-error "cannot convert" }
{ }
};
int main()
{
s test = nullptr;
}
|
google | android | auto25 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto25.C | 215 | utf_8 | 5c14f66c43736918d7e4ba4ae7f74d60 | // PR c++/42056
// { dg-do compile { target c++11 } }
template<int> struct A
{
int a[auto(1)]; // { dg-error "invalid use of" }
};
template<int> void foo()
{
int a[auto(1)]; // { dg-error "invalid use of" }
}
|
google | android | range-for1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for1.C | 257 | utf_8 | 6e8e648c26d9bf237cc152180e88c2c2 | // Test for range-based for loop
// Test the loop with an array
// { dg-do run { target c++11 } }
extern "C" void abort();
int main()
{
int a[] = {1,2,3,4};
int sum = 0;
for (int x : a)
sum += x;
if (sum != 10)
abort();
}
|
google | android | decltype-call3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype-call3.C | 1,764 | utf_8 | 94b4a0fd5edd628fe8247db245d9f0ad | // Testcase for N3276 and operator overloading
// { dg-require-effective-target c++11 }
struct A;
struct B {
A operator()(int);
A operator[](int);
A operator=(int);
A operator+=(int);
A operator-=(int);
A operator*=(int);
A operator/=(int);
A operator^=(int);
A operator&=(int);
A operator|=(int);
... |
google | android | constexpr-ice7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C | 161 | utf_8 | 996613e01ba0152564096ee0dd625dd7 | // PR c++/57827
// { dg-do compile { target c++11 } }
struct C
{
constexpr int fun (int x)
{
return x + 1;
}
int a = 2;
int b = fun(a);
};
C c;
|
google | android | pr57172 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57172.C | 168 | utf_8 | 34ff4ce2dea26f675261a4d5cc053bc9 | // PR c++/57172
// { dg-do compile { target c++11 } }
template <typename T> int f (T&) { return 0; }
template <typename T> int f (T&&) = delete;
int i;
int j = f (i);
|
google | android | gen-attrs-48 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-48.C | 416 | utf_8 | e8fb8ccd7aaeba215033890ec3dc3acc | // { dg-do compile { target c++11 } }
typedef char layout_type;
struct A {
layout_type member alignas (double);
};
static_assert (alignof (A) == alignof (double),
"alignment of struct A must be alignof (double)");
struct alignas (alignof (long double)) B {
layout_type member;
};
static_assert (alignof ... |
google | android | gen-attrs-33 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-33.C | 277 | utf_8 | 638cf5d68f2f7ee3d30f801d6ad34021 | // PR c++/35546
// { dg-do compile { target c++11 } }
// { dg-options "-g" }
template <int N>
struct T
{
void foo [[gnu::format (printf,2,3)]] (char const * ...);
};
template struct T<3>;
template <typename T>
struct U
{
typedef T V [[gnu::mode (SI)]];
};
U<int>::V v;
|
google | android | alignof3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alignof3.C | 147 | utf_8 | a341935f38f4b4581206e23c9027c975 | // { dg-do compile { target c++11 } }
// { dg-options "-pedantic" }
int main(void)
{
alignof(void (void)); // { dg-warning "function type" }
}
|
google | android | udlit-general | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-general.C | 963 | utf_8 | 5a8debc38c45079da0a8f0db33528e46 | // { dg-do run { target c++11 } }
// Test user-defined literals.
// Test simple operator declaration and definition.
#include <cstring>
#include <string>
#include <complex>
#include <cassert>
long double operator"" _v(long double);
std::string operator"" _w(const char16_t*, size_t);
unsigned operator"" _w(const char... |
google | android | bind | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/bind.C | 89 | utf_8 | 1ea60b441f8073714f5b0d7662a304e9 | // { dg-do compile { target c++11 } }
struct S{};
void f(S&&);
int main()
{
f(S());
}
|
google | android | decltype13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype13.C | 393 | utf_8 | 1d189249b7e9ebf527c0d549b552ef29 | // PR c++/34269
// { dg-do compile }
void
f1 ()
{
__decltype; // { dg-error "expected" }
}
void
f2 ()
{
__decltype (; // { dg-error "expected" }
}
void
f3 ()
{
__decltype (); // { dg-error "expected" }
}
void
f4 ()
{
__typeof__; // { dg-error "expected" }
}
void
f5 ()
{
__typeof__ (; // { dg-error "e... |
google | android | trailing5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/trailing5.C | 187 | utf_8 | d76f7f4bbe8f5f32122b4fff6b20d2e1 | // PR c++/38798, DR 770
// { dg-do compile { target c++11 } }
struct A {};
auto foo() -> struct A {}
enum B {};
auto bar() -> enum B {}
auto baz() -> struct C {} {} // { dg-error "" }
|
google | android | constexpr-ctor11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor11.C | 194 | utf_8 | 209a19455d0ca9a2da35009fb3340aec | // PR c++/55856
// { dg-do compile { target c++11 } }
struct A
{
A(const char *);
};
template <class T>
struct B
{
T t;
template <class U> constexpr B(U&& u): t(u) { }
};
B<A&&> b("");
|
google | android | noexcept22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept22.C | 321 | utf_8 | 8a1b4a9dc941644e560680d40bba31d3 | // PR c++/60046
// { dg-require-effective-target c++11 }
constexpr bool foo () { return noexcept (true); }
template <typename T>
struct V
{
void bar (V &) noexcept (foo ()) {}
};
template <typename T>
struct W : public V <int>
{
void bar (W &x) { V <int>::bar (x); }
};
int
main ()
{
W <int> a, b;
a.bar (b);
}... |
google | android | pr38646 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr38646.C | 246 | utf_8 | ba5cd480c0e4153959f48a06c316daf0 | /* PR c++/38646 */
/* { dg-do compile { target c++11 } } */
template<int...> struct A;
template<int... N> struct A<N..., N...> /* { dg-error "must be at the end" } */
{
template<typename> struct B;
template<typename T> struct B<T*> {};
};
|
google | android | enum7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum7.C | 299 | utf_8 | 2b0985c5003a3baf1ba60c7c38770636 | // PR c++/37816
// { dg-do compile { target c++11 } }
class A
{
enum class Color { Red, Orange, Yellow, Green, Blue, Violet };
enum class Alert { Green, Yellow, Red };
static const Color x = Red; // { dg-error "" }
static const Color y = Color::Red;
static const Alert z = Alert::Red;
};
|
google | android | pr51226 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr51226.C | 210 | utf_8 | 5c7a5225726f074f38521fc6e5d375ef | // PR c++/51226
// { dg-do compile { target c++11 } }
template<int> struct A // { dg-error "provided" }
{
enum E : int;
};
template<> enum A<>::E : int {} // { dg-error "wrong number|expected" }
|
google | android | decltype3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype3.C | 1,588 | utf_8 | 3c6f108a24facb469527e13f665387da | // { 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, #DECLTYPE " shou... |
google | android | constexpr-initlist6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist6.C | 254 | utf_8 | b4e468222ae1d3830b36fd6eba0385b8 | // PR c++/55419
// { dg-do compile { target c++11 } }
struct P
{
P () = default;
explicit constexpr P (int x) : p (x) {}
int p;
};
struct Q
{
constexpr Q () : q (0x7f) {}
int q;
};
struct R
{
Q q;
P p;
};
void
foo (R *x)
{
*x = {};
}
|
google | android | defaulted38 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted38.C | 186 | utf_8 | 09fe10b74512ebe7c0989737c25c69f9 | // PR c++/50893
// { dg-do compile { target c++11 } }
class Base
{
public:
virtual ~Base() = default;
};
class Derived : public Base
{
public:
virtual ~Derived() = default;
};
|
google | android | variadic51 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic51.C | 179 | utf_8 | 54cdacb61f99a7a627fb8cdac11ab060 | // { dg-do compile { target c++11 } }
template<typename T1, typename T2>
float& f(T1, T2);
template<typename... Args>
int& f(Args...);
float& g() {
return f(17, 3.14159);
}
|
google | android | pr31432 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31432.C | 261 | utf_8 | a964c59c9a906e02d6ca3c6e2286e416 | // { dg-do compile { target c++11 } }
template<typename..., typename> struct A // { dg-error "parameter pack" }
{
static int i;
};
A<int, int> a; // { dg-error "mismatch|expected|invalid type" }
A<char,int> b; // { dg-error "mismatch|expected|invalid type" }
|
google | android | variadic99 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic99.C | 396 | utf_8 | 59afc7eeb0a82f753a0f0856b9198ba8 | // PR c++/43054
// { dg-do compile { target c++11 } }
template<typename R> struct future { };
template<typename Fn, typename... Args>
auto
async(Fn&& fn, Args&&... args)
-> future<decltype(fn(args...))>;
template<typename Fn, typename... Args>
auto
async(Fn&& fn, Args&&... args)
-> future<decltype(fn(args...))... |
google | android | union2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/union2.C | 282 | utf_8 | e5a0ae678823eb39ec542d492d5607d1 | // Positive test for C++11 unrestricted unions
// { dg-do compile { target c++11 } }
struct A
{
A();
A(const A&);
~A();
};
union B
{
A a;
B();
B(const B&);
~B();
};
B b;
B b2(b);
struct C
{
union
{
A a;
};
C();
C(const C&);
~C();
};
C c; |
google | android | initlist-array3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist-array3.C | 193 | utf_8 | 2689261b6dbe2bf5875e915ce8a31a53 | // PR c++/52743
// { dg-do compile { target c++11 } }
void composite (int const (&) [2]);
void composite (int const (&) [3]);
int main ()
{
composite({0,1}); // { dg-error "ambiguous" }
}
|
google | android | enum_base2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum_base2.C | 158 | utf_8 | f55b557f4964b9a55a6419d83ef1aef3 | // PR c++/60187
// { dg-require-effective-target c++11 }
template<typename... T> struct A
{
enum E : T {}; // { dg-error "parameter pack" }
};
A<int> a;
|
google | android | sfinae45 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae45.C | 686 | utf_8 | 52c404ed861cd849ac4a851c3adaff2c | // PR c++/56970
// { dg-do compile { target c++11 } }
template <typename T>
struct has
{
template <typename>
constexpr static int test(...) {
return 0;
}
template <typename C>
constexpr static int test(decltype(sizeof(C::x))) { // Doesn't compile.
return 1; // Is a member variable.
}
tem... |
google | android | rv2n | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv2n.C | 21,316 | utf_8 | c7748f57e91e1e98c4d5e35b1032ac56 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overload resolution among reference types
// { dg-do compile { target c++11 } }
// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
... |
google | android | initlist48 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist48.C | 190 | utf_8 | d375ad850b8e39546ef2da5df1ce9682 | // PR c++/48726
// { dg-do compile { target c++11 } }
#include <memory>
struct Foo{
int i;
};
typedef std::unique_ptr<Foo> up;
std::initializer_list<up> il{up{new Foo}, up{new Foo}};
|
google | android | auto36 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto36.C | 409 | utf_8 | 12c0900b92acf6ca4b7b575e0bafedb9 | // PR c++/54903
// { dg-do compile { target c++11 } }
template<int N, int D>
struct Modulus
{
static auto const value = N % D;
};
template<int N>
struct Angle
{
static auto const value = Modulus<N, 360>::value; // ERROR
//static int const value = Modulus<N, 360>::value; // OK
//static... |
google | android | rv-conv1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-conv1.C | 123 | utf_8 | 4d78acdd9f4b8ae8afa532ceaf0c07c4 | // PR c++/49267
// { dg-do compile { target c++11 } }
struct X {
operator int&();
operator int&&();
};
int&&x = X();
|
google | android | variadic-ex13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C | 1,328 | utf_8 | 924c78ba51d13b5b4432e727127c407d | // { 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...> struct Tuple {};
template<typename T1, typename T2> struct Pair {};
template<typename..... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.