plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | chromium | named_refs | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/named_refs.C | 483 | utf_8 | 7ca5e76f5da4289322f6b0b01f1db381 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test: Named rvalue references are treated as lvalues.
// { dg-do compile }
// { dg-options "-std=c++0x" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct A {};
one foo(cons... |
google | chromium | elision_neg | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/elision_neg.C | 830 | utf_8 | 3e69649c6ad000bc2903d3e850b8bcb7 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test: Implicit cast to rvalue when eliding copy
// { dg-do compile }
// { dg-options "-std=c++0x" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
class move_only
{
move_only(... |
google | chromium | variadic71 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic71.C | 369 | utf_8 | 2b332497467d8e441a154dcf78b23907 | // { dg-options "-std=gnu++0x" }
template<typename...> struct list {};
template<typename Sequence, typename Head>
struct push_front;
template<typename... Elements, typename Head>
struct push_front<list<Elements...>, Head> {
typedef list<Head, Elements> type; // { dg-error "parameter packs not expanded" }
};
// { d... |
google | chromium | decltype9 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype9.C | 216 | utf_8 | 2918e2a5d66ef09c7eb73237e6fa3b6e | // PR c++/34271
// { dg-do compile }
// { dg-options "-std=c++0x" }
template<int> struct A
{
static int i;
};
template<int N> int A<N>::i(decltype (A::i)); // { dg-error "member function|must be an expression" }
|
google | chromium | variadic-ex6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex6.C | 500 | utf_8 | 1549cb06bbcf3d95eb4c5cda1fb32438 | // { dg-options "-std=gnu++0x" }
template<class...> struct Tuple { };
template<class... Types> void f(Types&...);
template<class... Types1, class... Types2> void g(Tuple<Types1...>, Tuple<Types2...>);
void h(int x, float& y)
{
const int z = x;
f(x, y, z); // Types is deduced to int, const int, float
g(Tuple<sh... |
google | chromium | variadic10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic10.C | 453 | utf_8 | df2980d6404d65a9ba0a025e438d3fb1 | // { dg-options "-std=gnu++0x" }
template<typename T1, typename T2>
struct pair {};
template<typename... Args>
struct tuple {
static const int value = 0;
};
template<>
struct tuple<pair<int, float> > { };
template<typename... Outer>
struct X {
template<typename... Inner>
struct Y
{
typedef tuple<pair<Out... |
google | chromium | initlist7 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist7.C | 255 | utf_8 | a6aeee2987d053f8706edc0683945314 | // PR c++/37932
// { dg-options "-std=c++0x" }
typedef enum { AA=1, BB=2 } my_enum;
typedef struct { my_enum a:4 ; unsigned b:28; } stru;
void foo (char c, my_enum x, int i)
{
char arr[2] = {c+'0', 0}; // { dg-error "narrowing" }
stru s = {x,0};
}
|
google | chromium | variadic5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic5.C | 719 | utf_8 | 1dabfabca0620ceb39e08c88a86e7df4 | // { dg-options "-std=gnu++0x" }
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;
};
template<ty... |
google | chromium | decltype17 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype17.C | 502 | utf_8 | eaeefa4f782de3fac5fef150f360691b | // PR c++/36628
// { dg-options "-std=c++0x" }
// { dg-do run }
#include <typeinfo>
#include <string.h>
int rvalue();
int& lvalueref();
int&& rvalueref();
decltype(true ? rvalue() : rvalue()) f()
{}
decltype(true ? lvalueref() : lvalueref()) g()
{}
decltype(true ? rvalueref() : rvalueref()) h()
{}
int main()
{
... |
google | chromium | variadic-ex14 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C | 650 | utf_8 | 2da1a34cbd6f053d69f347755b01f580 | // { dg-options "-std=gnu++0x" }
template<class T> class A { /* ... */ };
template<class T, class U = T> class B { /* ... */ };
template<class... Types> class C { /* ... */ };
template<template<class> class P> class X { /* ... */ };
template<template<class...> class Q> class Y { /* ... */ };
X<A> xA; // okay
X<B> xB... |
google | chromium | defaulted13 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted13.C | 717 | utf_8 | 1ccbd95e1eecd428be260863e35b3b4e | // { dg-options -std=c++0x }
template<typename T>
struct NonCopyable {
NonCopyable() = default;
NonCopyable(NonCopyable const&);
};
template<>
NonCopyable<int>::NonCopyable(NonCopyable<int> const&) = delete; // { dg-error "deleted" }
template<typename T>
NonCopyable<T>::NonCopyable(NonCopyable<T> const&) = defau... |
google | chromium | variadic-ex10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C | 397 | utf_8 | 76a8254969800746445081626acf6fd9 | // { dg-options "-std=gnu++0x" }
template<typename... Types> struct Tuple { };
Tuple<> t0; // Types contains no arguments
Tuple<int> t1; // Types contains one argument: int
Tuple<int, float> t2; // Types contains two arguments: int and float
Tuple<0> error; // { dg-error "mismatch" }
// { dg-error "expected a type" ""... |
google | chromium | vt-34606 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34606.C | 228 | utf_8 | 75919a6295ef8041bbad0ab4fc7c8382 | // { dg-options "-std=c++0x" }
template<typename...> struct A;
template<typename T, typename... U> struct A<T, U> // { dg-error "parameter packs|U" }
{
template<typename> struct B;
template<typename X> struct B<X*> {};
};
|
google | chromium | vt-34314 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34314.C | 1,029 | utf_8 | 46a1e79816504e03496252645e31757a | // { dg-options "-std=c++0x" }
template<typename Fun, typename... Args> // { dg-error "template parameter" }
struct call;
template<typename Fun, typename Arg0>
struct call // { dg-error "redeclared here" }
{
template<typename Sig>
struct result;
template<typename X, typename Y>
struct result<X(Y)>
... |
google | chromium | variadic-ex4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C | 422 | utf_8 | 0f2640c107091205cf17cb64f667020f | // { dg-options "-std=gnu++0x" }
template<class X, class Y, class Z> X f(Y,Z);
template<class... Args> void f2();
void g()
{
f<int,const char*,double>("aa",3.0);
f<int,const char*>("aa",3.0); // Z is deduced to be double
f<int>("aa",3.0); // Y is deduced to be char*, and
// Z is deduced ... |
google | chromium | initlist20 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist20.C | 226 | utf_8 | f5ab523f7fe16d4a14ebcb230b425677 | // PR c++/40689
// { dg-options "-std=c++0x" }
class X
{
public:
X(): data {1,2,3,4,5} {}
private:
const short data[5];
};
int main()
{
const float * pData = new const float[4] { 1.5, 2.5, 3.5, 4.5 };
return 0;
}
|
google | chromium | enum3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/enum3.C | 225 | utf_8 | ca04611b041b2ba6bc94522bc78f2a38 | // PR c++/38064
// { dg-options "-std=c++0x" }
// { dg-do run }
enum class E { elem };
template <class T>
void f (T t);
bool f (bool b) { return b; }
int main()
{
E e = E::elem;
if (!f (e == E::elem))
return 1;
}
|
google | chromium | variadic-ex2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex2.C | 265 | utf_8 | 2ca8c6c22acd958766719aa6c0406373 | // { dg-options "-std=gnu++0x" }
template<class... Types> struct B { // { dg-error "declaration of" }
void f3();
void f4();
};
template<class... Types> void B<Types...>::f3() { } // OK
template<class... Types> void B<Types>::f4() { } // { dg-error "invalid" }
|
google | chromium | variadic85 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic85.C | 308 | utf_8 | a59ffa4f8dc05fcd24d3389f80b307f6 | // PR c++/32565
// { dg-do compile }
// { dg-options "-std=c++0x" }
template<typename...> struct A1;
template<template<int, int...> class T> struct A1<T<0, 1> > {};
template<int, int, int...> struct B1 {};
A1<B1<0, 1> > a1;
template<int...> struct B2 {};
A1<B2<0, 1> > a2; // { dg-error "incomplete type" }
|
google | chromium | vt-34050 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34050.C | 117 | utf_8 | 13506aee1ac7be5174781e30985c4074 | // { dg-options "-std=c++0x" }
struct A {};
template<typename... T> struct B : T...
{
B() : T()... {}
};
B<A> b;
|
google | chromium | static_assert4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/static_assert4.C | 331 | utf_8 | 822fb1324c32059c620a31a887c0a851 | // { dg-options "-std=c++0x --param ggc-min-heapsize=0 --param ggc-min-expand=0 " }
// PR C++/30033
// Make sure that the static assert does not crash the GC.
template <class T>
struct default_delete
{
void
operator() (T * ptr) const
{
static_assert (sizeof (T) > 0, "Can't delete pointer to incomplete type")... |
google | chromium | decltype12 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype12.C | 1,073 | utf_8 | a6caab75327a934c0a5cc960aa8a5451 | // { dg-do compile }
// { dg-options "-std=c++0x" }
template<typename T, typename U>
struct is_same
{
static const bool value = false;
};
template<typename T>
struct is_same<T, T>
{
static const bool value = true;
};
int&& f(const int&) {}
int&& (*fp)(const int&) = f;
int&& (&fr)(const int&) = f;
struct X { int&... |
google | chromium | enum_base | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/enum_base.C | 765 | utf_8 | 0da5e64b4ad2e2d41e648440cc17438b | // { dg-options "-std=c++0x" }
typedef unsigned volatile long long uvlonglong;
enum E1 : char { };
enum E2 : signed const short { };
enum E3 : uvlonglong { };
enum E4 : char {
val = 500 // { dg-error "too large" }
};
enum class E5 {
val = (unsigned long long)-1 // { dg-error "too large" }
};
typedef float Floa... |
google | chromium | variadic28 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic28.C | 910 | utf_8 | b1f604bc250da0eaa40101ceadc8384b | // { dg-options "-std=gnu++0x" }
template<typename Signature>
struct function_traits;
template<typename R, typename... ArgTypes>
struct function_traits<R(ArgTypes......)> {
typedef R result_type;
};
template<typename T, typename U>
struct same_type {
static const bool value = false;
};
template<typename T>
struc... |
google | chromium | scoped_enum | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/scoped_enum.C | 1,517 | utf_8 | 2c7626e10d7406f8f1f38d9d9b3c93eb | // { dg-options "-std=c++0x" }
enum class Color1 {
Red,
Green,
Blue
};
enum struct Color2 {
Red, // { dg-error "previously declared here" }
Orange,
Yellow,
Green,
Blue,
Indigo = Green + 2,
Violet,
Red // { dg-error "redefinition" }
};
enum Color {
Red, Green, Blue
};
enum class Color3 {
Re... |
google | chromium | variadic40 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic40.C | 122 | utf_8 | 9b07b326741489bb12551a4d16285daf | // { dg-options "-std=gnu++0x" }
template<typename... Values, typename T>
struct backward_tuple {}; // { dg-error "end" }
|
google | chromium | variadic-bind | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C | 12,173 | utf_8 | 3dcf280a61a31db3b901338f80bd09bb | // { dg-options "-std=gnu++0x" }
// { dg-do "run" }
// A basic implementation of TR1's bind using variadic teplates
#include <cassert>
// Trivial reference_wrapper
template<typename T>
struct reference_wrapper
{
reference_wrapper(T& x) : ptr(&x) { }
operator T&() const { return *ptr; }
T& get() const { return ... |
google | chromium | vt-34051 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34051.C | 177 | utf_8 | f396e2178ea8dfa6db0847bf75d89371 | // { dg-options "-std=c++0x" }
struct A
{
operator int();
};
template <typename... T> struct B : A
{
using A::operator T; // { dg-error "parameter packs|T" }
};
B<int> b;
|
google | chromium | extern_template-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/extern_template-2.C | 104 | utf_8 | 524d40ced067adb49fe43e140a933167 | // { dg-options "-std=c++0x -pedantic" }
template <typename> class S {};
extern template class S<int>;
|
google | chromium | trailing4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/trailing4.C | 226 | utf_8 | 01cafd9f1aeadd5ffc9bd644563a50b9 | // PR c++/38597
// { dg-options "-std=c++0x" }
template<class T, class U>
auto f(T,U) -> decltype(T() + U())
{ return T() + U(); }
template<class T> void g(T){}
int main() { g(f); } // { dg-error "no matching function" }
|
google | chromium | pr31434 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31434.C | 239 | utf_8 | 43bd833d393686f514da74947367f07d | // { dg-options "-std=gnu++0x" }
template<typename... T> int foo(const T&) // { dg-error "not expanded with|T" }
{
union { T t; }; // { dg-error "not expanded with|T" }
return t;
}
void bar()
{
foo(0); // { dg-error "no matching" }
}
|
google | chromium | bracket3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/bracket3.C | 294 | utf_8 | 4859776496a16f821d24207a79fe1ecc | // { dg-options "-std=c++98 -Wc++0x-compat" }
template<int N> struct X {};
X<1 >> 2> x; // { dg-warning "will be treated as|suggest parentheses" }
// From cp/parser.c
typedef int Y;
template <int V> struct Foo {};
Foo<Y () >> 5> r; // { dg-warning "will be treated as|suggest parentheses" }
|
google | chromium | vt-34102 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34102.C | 185 | utf_8 | 3a065f914060d8463e7e7daebd9c6675 | // { dg-options "-std=c++0x" }
// PR c++/34102
struct A {};
template<typename> struct B : virtual A {};
template<typename...T> struct C : B<T> {}; // { dg-error "parameter packs|T" }
|
google | chromium | variadic91 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic91.C | 363 | utf_8 | e837ebebcf5da91989eb888432453fbc | // { dg-options "-std=c++0x" }
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<typenam... |
google | chromium | variadic20 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic20.C | 1,601 | utf_8 | 2b2f6a70bc6a7f1c17e902f2894579a5 | // { dg-options "-std=gnu++0x" }
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<template<cla... |
google | chromium | vt-35026 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-35026.C | 127 | utf_8 | b4fbdd94060b76da05b2f89b9716aff5 | // { dg-options "-std=c++0x" }
template<typename... T> struct A
{
T* x[1]; // { dg-error "parameter packs|T" }
};
A<int> a;
|
google | chromium | vt-34219 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34219.C | 411 | utf_8 | e5ded9c4f13f4299049548f36f36d958 | // { dg-options "-std=c++0x" }
template<typename T, T a, T... Params>
struct max
{
static const T value = a > max<T, Params>::value ? a : max<T, Params>::value; // { dg-error "not expanded|Params" }
};
template<typename T, T a, T b>
struct max<T, a, b>
{
static const T value = a > b ? a : b;
};
static const... |
google | chromium | rv-reinterpret | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C | 173 | utf_8 | 7cc8ab49b730b1b59574f3e80ad05383 | // { dg-options -std=c++0x }
// { dg-do compile }
void f(int &);
void f(int &&ir) { ir = 42; }
int main()
{
int x;
f(reinterpret_cast<int&&>(x));
return (x != 42);
}
|
google | chromium | initlist14 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist14.C | 386 | utf_8 | a0b38c8d622f08dce2118eb927a56b1f | // Bug: We weren't doing the normal replacement of array with pointer
// for deduction in the context of a call because of the initializer list.
// { dg-options "-std=c++0x" }
#include <initializer_list>
struct string
{
string (const char *);
};
template <class T>
struct vector
{
template <class U>
vector (std... |
google | chromium | variadic-crash1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-crash1.C | 1,264 | utf_8 | 09d0cfdb30531a4ad803dbcbe2f0a1cd | // { dg-options "-std=gnu++0x" }
#define ONE
#define TWO
#define THREE
struct Something {};
Something ___;
template <class F>
struct Trial
{
F f;
public:
Trial() : f() {}
Trial( const F& ff ) : f(ff) { }
template <typename... Args>
struct Sig { typedef int ResultType; };
template <typename... Args>
struct Si... |
google | chromium | vt-35243 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-35243.C | 149 | utf_8 | c17adb75d5e2cdfccd2e7026ebde629d | // { dg-options "-std=c++0x" }
struct A {};
template<typename... T> struct B : T...
{
B() : T(x)... {} // { dg-error "not declared" }
};
B<A> b;
|
google | chromium | vt-34051-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34051-2.C | 164 | utf_8 | 0d6427afeff9588163ff9bf8ed7970ea | // { dg-options "-std=c++0x" }
template<typename... T> struct A
{
int i __attribute__((aligned(__alignof(T)))); // { dg-error "parameter packs|T" }
};
A<int> a;
|
google | chromium | variadic33 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic33.C | 280 | utf_8 | 2b52a6e1e9ef08cf89b472a1d06d0487 | // { dg-options "-std=gnu++0x" }
void print_all() {}
template<typename T, typename... Rest>
void print_all(const T& t, const Rest&... rest)
{
print_all(rest...);
}
void f()
{
print_all();
print_all(1);
print_all(1, 3.14159);
print_all("Hello, World!", 17, 3.14159);
}
|
google | chromium | variadic30 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic30.C | 156 | utf_8 | 0f676242a5f210ef183912aaa80606dd | // { dg-options "-std=gnu++0x" }
template<typename... T>
void eat(T...);
void f()
{
eat();
eat(1);
eat(1, 2);
eat(17, 3.14159, "Hello, World!");
}
|
google | chromium | decltype13 | .C | native_client/nacl-gcc/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 | chromium | variadic-new2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-new2.C | 267 | utf_8 | 86324ee10d96164a91b0b163e9c200df | // { dg-do "run" }
// { dg-options "-std=c++0x" }
// PR c++/32597
#include <assert.h>
#include <new>
template< class... Args > void f( Args... args )
{
{
int x = 17;
(void)x;
}
{
int y(args...);
assert(y == 0);
}
}
int main()
{
f();
}
|
google | chromium | variadic74 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic74.C | 742 | utf_8 | 74270e3d26f0eb4b8d346509e6794d94 | // { dg-options "-std=gnu++0x" }
template <class... Types> class A
{
public:
template <Types... Values> class X { /* ... */ }; // { dg-error "not a valid type for a template constant parameter" }
};
template<class... Types> class B
{
public:
template <Types*... Values> class X {
typename A<Types*...>::templat... |
google | chromium | scoped_enum_examples | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/scoped_enum_examples.C | 675 | utf_8 | 37da2abad6e3096ddafcb34050f6a4d6 | // { dg-do compile }
// { dg-options "-std=c++0x" }
enum class Col { red, yellow, green };
int x = Col::red; // { dg-error "cannot convert" }
Col y = Col::red;
void f()
{
if (y) { } // { dg-error "could not convert" }
}
enum direction { left='l', righ... |
google | chromium | variadic36 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic36.C | 427 | utf_8 | 1b855022d31b131d1921bedf205f407f | // { dg-options "-std=gnu++0x" }
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 expanded" }... |
google | chromium | variadic4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic4.C | 482 | utf_8 | 874e124d1552d6e04add0b9e1b3670e6 | // { dg-options "-std=gnu++0x" }
// { dg-do compile }
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_none5tupleIIEE" } }
// { dg-final { scan-a... |
google | chromium | variadic79 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic79.C | 247 | utf_8 | 015c7cc1d96ec32be3f13d07eb7cb911 | // PR c++/33213
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
template<template<typename> class...> struct A;
template<template<typename...> class... B> struct A<B...> {}; // { dg-error "mismatch|'template<class ...> class ... B ...'" }
|
google | chromium | variadic64 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic64.C | 509 | utf_8 | 89ef3e309c7cd1d8b72de2f9c1a46ba8 | // { dg-options "-std=gnu++0x" }
template<int... Indexes>
struct _Index_tuple { };
template<int _Num, typename _Tuple = _Index_tuple<> >
struct _Build_index_tuple;
template<int _Num, int... _Indexes>
struct _Build_index_tuple<_Num, _Index_tuple<_Indexes...> >
: _Build_index_tuple<_Num - 1,
... |
google | chromium | variadic80 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic80.C | 513 | utf_8 | 570af29c30773e0480c5685e60440d61 | // PR c++/31434
// { dg-do run }
// { dg-options "-std=c++0x" }
extern "C" void abort ();
template<typename... T> inline int foo (const T...) { return 1; }
template<typename... T> inline int foo (const T *...) { return 2; }
void
bar (int *a)
{
a[0] = foo (0);
a[1] = foo (*a);
a[2] = foo<int> (a);
a[3] = foo<... |
google | chromium | error1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/error1.C | 255 | utf_8 | 609d70ad463c19840a3dde6aff121c32 | // PR c++/34395
// { dg-do compile }
// { dg-options "-std=c++0x" }
template<int... N> void foo (int... x[N]) // { dg-error "int \\\[N\\\]\\.\\.\\. x" }
{
struct A
{
A () { x; } // { dg-error "use of parameter from containing function" }
};
}
|
google | chromium | pr32128 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr32128.C | 206 | utf_8 | 29f37e487774452598f03757fd3d598a | // { dg-options "-std=c++0x" }
template<typename...> struct A;
template<typename...T, typename...U>
struct A<T..., U...> {}; // { dg-error "must be at the end" }
A<int> a; // { dg-error "incomplete" }
|
google | chromium | initlist1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist1.C | 1,029 | utf_8 | 92f9edf7e87f0820e6cef61451c12789 | // Basic uses of initializer lists
// { dg-do run }
// { dg-options "-std=c++0x" }
#include <initializer_list>
extern "C" void abort();
using namespace std;
struct A { int i,j; A(int _i,int _j): i(_i), j(_j) {} };
struct B { A a; B(A _a): a(_a) {} };
struct C { B b; C(B _b): b(_b) {} };
struct D
{
int ia[3];
D... |
google | chromium | rv7n | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv7n.C | 2,671 | utf_8 | b07f962b94ee79481226ab7d685bfea3 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overload resolution among reference types
// { dg-do compile }
// { dg-options "-std=c++0x" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
struct ... |
google | chromium | rv6n | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv6n.C | 9,485 | utf_8 | 44e4d6d548ed9b97f422bb3979a620ba | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overlaod resolution among referece types
// { dg-do compile }
// { dg-options "-std=c++0x" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
struct f... |
google | chromium | rvo | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rvo.C | 369 | utf_8 | af38f46a8c779fe96c1d3cbf6782dc05 | // { dg-do "run" }
// { dg-options "-std=c++0x" }
// Contributed by Sylvain Pion
static int rvalue_constructions = 0;
struct A {
A () { }
A (const A&) { }
A (A&&) { ++rvalue_constructions; }
~A () { }
};
A f() { return A(); }
extern "C" {
void abort(void);
}
int main()
{
A c = f();
... |
google | chromium | not_special | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/not_special.C | 1,278 | utf_8 | 75397e30f20c5491ae8c425601267794 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test that move constructor and move assignement are not special.
// That is, their presence should not inhibit compiler generated
// copy ctor or assignment. Rather they should overload with the
// compiler generated special members.
// { dg... |
google | chromium | variadic-unify | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-unify.C | 329 | utf_8 | a21cb07dbbd1fe7391733da7d9eb343e | // { dg-options "-std=c++0x" }
template<typename...> struct tuple { };
template<typename... Args1, typename... Args2>
void foo(tuple<Args1..., Args2...>, tuple<Args1...>, tuple<Args2...>);
struct X{ };
void bar()
{
tuple<int, float> tif;
tuple<double, X> tdx;
tuple<int, float, double, X> tall;
foo(tall, tif,... |
google | chromium | vt-34399 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34399.C | 174 | utf_8 | 593458eca2d4ea8972c29ebe23b518fc | // { dg-options "-std=c++0x" }
template<int...> struct A
{
void foo();
};
struct B
{
template<int N> friend void A<N>::A::foo(); // { dg-error "declared as friend" }
};
|
google | chromium | auto2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto2.C | 1,101 | utf_8 | 90322be779600bd8fc9d131b0465b7a3 | // Positive test for auto
// { dg-do run }
// { dg-options "-std=c++0x" }
#include <typeinfo>
extern "C" void abort();
int f() {}
struct A
{
int i;
int f() {}
A operator+(A a) { return a; }
};
template <class T>
void g(T t)
{
auto x = t+t;
if (typeid(x) != typeid(t+t))
abort();
auto p = new auto(&t... |
google | chromium | defaulted9 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted9.C | 249 | utf_8 | a05f26a3eea0223beedf12cdefdc0294 | // PR c++/39153
// { dg-options "-std=c++0x -fno-inline" }
struct _Impl_base
{
_Impl_base() = default;
virtual ~_Impl_base() = default;
};
template<typename _Tp>
class _Impl : public _Impl_base
{ };
int main()
{
_Impl<int> i;
return 0;
}
|
google | chromium | variadic75 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic75.C | 681 | utf_8 | 36eb0d6498ae2f0ee3a250a14538e878 | // { dg-options "-std=gnu++0x" }
template<typename...> struct tuple { };
template<template<typename T> class Meta, typename... Values>
struct apply_all
{
typedef tuple<typename Meta<Values>::type...> type;
};
template<typename T, typename U>
struct is_same {
static const bool value = false;
};
template<typename... |
google | chromium | vt-35147 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-35147.C | 250 | utf_8 | 518e42cc4b8fdf93d93957379c4c6105 | // { dg-options "-std=c++0x" }
template<typename _Tp>
_Tp&& forward(_Tp&& __t) { return __t; }
void f(...);
template<typename... Args>
void g(Args&&... args)
{
f(forward<Args...>(args...)); // { dg-error "no matching" }
}
void h()
{
g();
}
|
google | chromium | vt-40092 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-40092.C | 447 | utf_8 | ecaa20d9d3a0e2a89e71efe730fd357a | // { dg-do "compile" }
// { dg-options "-std=c++0x" }
template <typename... Types> struct package {};
template <int ArgGen> struct wrapper_gen {};
template <int ArgNest> struct wrapper_nest
{
typedef wrapper_gen<ArgNest> type_nest;
};
template <int... ArgPack>
struct wrapper_pack
{
typedef package<wrapper_gen <... |
google | chromium | initlist18 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist18.C | 257 | utf_8 | c3eb0f3f2e3ddb5cea52a3aba9ff584b | // PR c++/40308, 40311
// { dg-do run }
// { dg-options "-std=c++0x" }
template< typename T >
struct test {
test() : data{} {}
T data;
};
int main()
{
test<int> x;
test<int*> y;
int * a = new int{};
int * b = new int{5};
return 0;
}
|
google | chromium | variadic98 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic98.C | 21,084 | utf_8 | ddd8ff871ff42e3b6e6a2371d1bac35e | // PR c++/42358
// { dg-do assemble }
// { dg-options -std=c++0x }
typedef __PTRDIFF_TYPE__ ptrdiff_t;
typedef __SIZE_TYPE__ size_t;
namespace std __attribute__ ((__visibility__ ("default"))) {
using ::size_t;
}
namespace std __attribute__ ((__visibility__ ("default"))) {
struct __sfinae_types {
typedef cha... |
google | chromium | vt-33964 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-33964.C | 400 | utf_8 | af7c2d788ab7151c61d2f6a6acabf230 | // { dg-options "-std=c++0x" }
template<typename ... Args>
struct foo
{
static bool const value = true;
};
template<typename ... Args>
struct foo< typename Args::is_applied... > // { dg-error "not used|Args" }
{
static bool const value = false;
};
struct not_applied { typedef void is_applied; };
struct applie... |
google | chromium | initlist19 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist19.C | 178 | utf_8 | 10876066cecb1e10ba6a97a0f2ed4d91 | // { dg-options "-std=c++0x" }
void f(double);
int main()
{
f({{1}}); // { dg-error "too many braces" }
// { dg-error "" "" { target *-*-* } 6 } allow other errors, too
}
|
google | chromium | rv1p | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv1p.C | 3,551 | utf_8 | 18338cd95adbf6caae8732e735474beb | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overlaod resolution among referece types
// { dg-do compile }
// { dg-options "-std=c++0x" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
struct f... |
google | chromium | variadic-ex13 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C | 1,323 | utf_8 | c3adbc21cc5770871b779c2477b817fe | // { dg-options "-std=gnu++0x" }
template<typename T, typename U> struct is_same {
static const bool value = false;
};
template<typename T> struct is_same<T, T> {
static const bool value = true;
};
template<typename...> struct Tuple {};
template<typename T1, typename T2> struct Pair {};
template<typename... Arg... |
google | chromium | variadic86 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic86.C | 440 | utf_8 | d373d69f887ce9eba19f932c6fa2a6a7 | // PR c++/33943
// { dg-do compile }
// { dg-options "-std=c++0x" }
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...> ... |
google | chromium | vt-34961 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34961.C | 180 | utf_8 | 3c03ffe609645612c916414af4f58122 | // { dg-options "-std=c++0x" }
template<typename... T> struct A
{
static const int i __attribute__((aligned(__alignof(T)))) = 0; // { dg-error "not expanded|T" }
};
A<int> a;
|
google | chromium | decltype6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype6.C | 767 | utf_8 | 79da2a7d594c250d90e7c90f6ff80531 | // { dg-do "compile" }
// { dg-options "-std=gnu++0x" }
template<typename T, typename U>
struct is_same
{
static const bool value = false;
};
template<typename T>
struct is_same<T, T>
{
static const bool value = true;
};
template<typename T> const T& foo();
int i;
template<typename T>
struct A
{
doubl... |
google | chromium | variadic82 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic82.C | 254 | utf_8 | e007db2c033ef0a193081e993983b116 | // PR c++/33461
// { dg-options "-std=gnu++0x" }
template<typename> struct A;
template<typename... T> struct A<T*...> // { dg-bogus "cannot expand" "" { xfail *-*-* } }
{
struct B;
};
A<void*> a; // { dg-bogus "incomplete type" "" { xfail *-*-* } }
|
google | chromium | rv7p | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv7p.C | 7,557 | utf_8 | cb664a15a4903289c2dbf39470cc428e | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overlaod resolution among referece types
// { dg-do compile }
// { dg-options "-std=c++0x" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
struct f... |
google | chromium | auto16 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto16.C | 195 | utf_8 | 6e0e63c1fb979760fac52b1ec3bcc210 | // PR c++/40619
// { dg-options "-std=c++0x" }
template<typename U> struct X {};
template<typename T> auto f(T t) -> X<decltype(t+1)> {}
template<typename T> auto g(T t) -> X<decltype(t+1)> {}
|
google | chromium | pr32114 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr32114.C | 140 | utf_8 | 7f1aaaa89f82247ea2fb1910175c7142 | // { dg-options "-std=c++0x" }
template<typename ...T> struct A
{
typedef typename T::X Y; // { dg-error "not expanded|T" }
};
A<int> a;
|
google | chromium | initlist16 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist16.C | 156 | utf_8 | 43443b363fe198a344770e0821a7e356 | // { dg-options "-std=c++0x" }
// { dg-do run }
extern "C" void abort();
void f(int i) { if (i != 42) abort(); }
int main()
{
f({42});
return {0};
}
|
google | chromium | defaulted5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted5.C | 242 | utf_8 | a542994a8950397c6e282c0db4479373 | // PR c++/37234
// { dg-do link }
// { dg-options "-std=c++0x" }
template <typename T>
class foo {
public:
foo() =default;
~foo();
};
template <typename T>
foo<T>::~foo() =default;
int main() {
foo<int> fi;
return 0;
}
|
google | chromium | variadic-function | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-function.C | 1,970 | utf_8 | 990a73de20f5c72ced1c1ed615169011 | // { dg-options "-std=gnu++0x" }
// { dg-do "run" }
// A basic implementation of TR1's function using variadic teplates
#include <cassert>
template<typename Signature>
class function;
template<typename R, typename... Args>
class invoker_base
{
public:
virtual ~invoker_base() { }
virtual R invoke(Args...) = 0;
vi... |
google | chromium | rv4p | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv4p.C | 46,184 | utf_8 | d8af4afa414adc82e3101251097e7b2b | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overlaod resolution among referece types
// { dg-do compile }
// { dg-options "-std=c++0x" }
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
struct f... |
google | chromium | enum5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/enum5.C | 299 | utf_8 | 8d128943842c7e12ad8c1ea017f3fb14 | // PR c++/40639
// { dg-options "-std=c++0x" }
template< typename T >
struct wrap {
enum E : T { val };
};
template< typename T >
struct dependant {
enum E : typename T::type { val };
};
template<typename T>
struct identity {
typedef T type;
};
wrap<int> x;
dependant<identity<int>> y;
|
google | chromium | implicit-copy | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C | 148 | utf_8 | bc7e3a994e00615a61f27328054cd892 | // { dg-options "--std=c++0x" }
struct S
{
S();
private:
S(S const &&);
S & operator=(S const &&);
};
void f()
{
S a;
S b(a);
a = b;
}
|
google | chromium | variadic57 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic57.C | 275 | utf_8 | 3df1cd01278372ac99c35513e3c8b99b | // { dg-options "-std=gnu++0x" }
template<typename T, int... Dims>
struct array {
int foo();
};
template<typename T>
struct array<T, 0> {
int bar();
};
template<typename T, int... Dims>
int array<T, Dims...>::foo() { }
template<typename T>
int array<T, 0>::bar() { }
|
google | chromium | pr32252 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr32252.C | 144 | utf_8 | cfacb3fc6991199f6bdc5857d143f048 | // { dg-options "-std=c++0x" }
int x[5];
template<int M, int N, int (&... p)[N]> struct A;
template<int M> struct A<M,5,x> {};
A<0,5,x> a;
|
google | chromium | variadic-ex1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C | 152 | utf_8 | 8b9cbac516a9cff78bdd6926ed679f1b | // { dg-options "-std=gnu++0x" }
template<typename ... Elements> class Tuple;
Tuple<>* t; // OK: Elements is empty
Tuple* u; // { dg-error "expected" }
|
google | chromium | pr31443 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31443.C | 229 | utf_8 | 67359603203bcca897778b2597f66e80 | // { dg-options "-std=gnu++0x" }
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 | chromium | pr34060 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr34060.C | 237 | utf_8 | e4082204afdcaeccf1c498832e48bf59 | // PR c++/34060
// { dg-do compile }
// { dg-options "-std=c++0x" }
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 | chromium | enum1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/enum1.C | 151 | utf_8 | 70fd9fe2b4dfef9ca8221ad6de78a13d | // PR c++/38021
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
enum : { }; // { dg-error "expected" }
enum : 3 { }; // { dg-error "expected" }
|
google | chromium | variadic95 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic95.C | 260 | utf_8 | e9c1d06fba854d7c75a89def41ba0896 | // PR c++/39863
// { dg-options -std=c++0x }
template <typename... T>
struct A {};
template <typename T, typename U>
struct S {};
template <typename... T, typename... U>
A< S<T, U>... > f(U... u)
{ return A< S<T, U>... >(); }
int main()
{
f<int>(0.0);
}
|
google | chromium | vt-34751 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-34751.C | 592 | utf_8 | 076a6a340c6519840d4022863689e6aa | // { dg-options "-std=c++0x" }
// 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" }
template<... |
google | chromium | trailing3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/trailing3.C | 1,505 | utf_8 | f98e26ccc799118e5c38e6b008728fdf | // More auto/decltype mangling tests.
// { dg-options "-std=c++0x" }
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);
template <class U>
auto fr(U u) -> decltype ... |
google | chromium | collapse | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/collapse.C | 954 | utf_8 | e6e5db803fed31ae5912983c195924e3 | // { dg-options "--std=c++0x" }
template<typename T, typename U> struct same_type;
template<typename T> struct same_type<T, T> {};
typedef int & lref;
typedef int const & clref;
typedef int && rref;
typedef int const && crref;
template<typename T>
struct S
{
typedef T & lref;
typedef T const & clref;
typedef T ... |
google | chromium | variadic-ex12 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex12.C | 226 | utf_8 | 337a319c03c6c55b482f98159615b9b4 | // { dg-options "-std=gnu++0x" }
template<typename... Types>
void f(Types... rest);
template<typename... Types>
void g(Types... rest) {
f(&rest...); // ``&rest...'' is a pack expansion, ``&rest'' is its pattern
}
|
google | chromium | iop | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/iop.C | 987 | utf_8 | 297afa54623d300c4e7d43895152f309 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test that the implicit object parameter is *not* an rvalue reference, but is instead
// identical to that specified in C++03. That is, the implicit object parameter is
// an lvalue reference that can bind to an rvalue. :-\
// See http://www.o... |
google | chromium | variadic-ex11 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C | 262 | utf_8 | 97b96a2f18f11713716e649fc5925b5f | // { dg-options "-std=gnu++0x" }
template<typename... Types>
void f(Types... args);
void g() {
f(); // okay: args contains no arguments
f(1); // okay: args contains one int argument
(2, 1.0); // okay: args contains two arguments, an int and a double
}
|
google | chromium | variadic89 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic89.C | 263 | utf_8 | e952de5f557b560e0101fa0341bf7576 | // { dg-options "-std=c++0x" }
// Contributed by Eric Niebler
template<typename T, typename U>
struct pair
{};
template<typename T>
struct test;
template<template<typename...> class T, typename... Args>
struct test<T<Args...> >
{};
test<pair<int, double> > t;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.