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
extern_template-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/extern_template-1.C
105
utf_8
df498e0efc0a2951008f5bfc084b5d8f
// { dg-options "-std=c++0x -pedantic" } template <typename> void f() {} extern template void f<int>();
google
chromium
long_long
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/long_long.C
77
utf_8
4a0e724ac30f59cb40f4cf66c5eb935c
// { dg-options "-std=c++0x -pedantic" } void foo() { long long x = 17; }
google
chromium
defaulted6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted6.C
197
utf_8
d55216a62be51ae4ddecbd573454b5cd
// PR c++/37906 // { dg-options "-std=c++0x" } struct b { b() = default; b(const b&) = delete; }; void test01() { static_assert(__has_trivial_constructor(b), "default ctor not trivial"); }
google
chromium
defaulted3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
302
utf_8
d2ebff8fdd5f889b2f4ed9041465fe49
// PR c++/37006 // { dg-options "-std=c++0x" } template<class T> struct A { template<class U> bool operator==(const A<U>&) = delete; // { dg-error "deleted function" } operator bool () { return true; } }; int main() { A<int> a1; A<void> a2; if(a1 == a2) {} // { dg-error "used here" } }
google
chromium
variadic76
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic76.C
213
utf_8
874a81eb8f65d81680cca4518ed1c245
// PR c++/33496 // { dg-do compile } // { dg-options "-std=gnu++0x" } template<int... N> int foo () { return sizeof... N (); // { dg-error "cannot be used as a function" } } int bar () { return foo<0> (); }
google
chromium
pr32115
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr32115.C
157
utf_8
c1b7f079bd668b594f6eb1d2ba1c6854
// { dg-options "-std=c++0x" } template<typename ...T, int = 0> struct A {}; // { dg-error "end of" } A<int> a; // { dg-error "mismatch|expected|invalid" }
google
chromium
decltype15
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype15.C
207
utf_8
c3ec86cf924ef203f6d25765332c13ec
// PR c++/38640 // { dg-do compile } // { dg-options "-std=c++0x" } template<int N> void foo (decltype (N)); template<long int N> void foo (decltype (N)); void bar (void) { foo<5> (6); foo<5L> (6L); }
google
chromium
rv6p
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv6p.C
22,783
utf_8
3dda037dd9cb215ac9bf203f6665ca1d
// 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 four {char x[4];}; struct five {char x[5];}; struct six {char x[6];}; struct seven {char x[7];}; struct eight {char x[8];}; struct A { A(); A(const volatile A&&); }; A source(); const A c_source(); volatile A v_source(); const volatile A cv_source(); // 6 at a time one sink_6_123456( A&); two sink_6_123456(const A&); three sink_6_123456(volatile A&); four sink_6_123456(const volatile A&); five sink_6_123456( A&&); six sink_6_123456(const A&&); int test6_123456() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123456(a)) == 1> t1; sa<sizeof(sink_6_123456(ca)) == 2> t2; sa<sizeof(sink_6_123456(va)) == 3> t3; sa<sizeof(sink_6_123456(cva)) == 4> t4; sa<sizeof(sink_6_123456(source())) == 5> t5; sa<sizeof(sink_6_123456(c_source())) == 6> t6; return 0; } one sink_6_123457( A&); two sink_6_123457(const A&); three sink_6_123457(volatile A&); four sink_6_123457(const volatile A&); five sink_6_123457( A&&); seven sink_6_123457(volatile A&&); int test6_123457() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123457(a)) == 1> t1; sa<sizeof(sink_6_123457(ca)) == 2> t2; sa<sizeof(sink_6_123457(va)) == 3> t3; sa<sizeof(sink_6_123457(cva)) == 4> t4; sa<sizeof(sink_6_123457(source())) == 5> t5; sa<sizeof(sink_6_123457(c_source())) == 2> t6; sa<sizeof(sink_6_123457(v_source())) == 7> t7; return 0; } one sink_6_123458( A&); two sink_6_123458(const A&); three sink_6_123458(volatile A&); four sink_6_123458(const volatile A&); five sink_6_123458( A&&); eight sink_6_123458(const volatile A&&); int test6_123458() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123458(a)) == 1> t1; sa<sizeof(sink_6_123458(ca)) == 2> t2; sa<sizeof(sink_6_123458(va)) == 3> t3; sa<sizeof(sink_6_123458(cva)) == 4> t4; sa<sizeof(sink_6_123458(source())) == 5> t5; sa<sizeof(sink_6_123458(c_source())) == 8> t6; sa<sizeof(sink_6_123458(v_source())) == 8> t7; sa<sizeof(sink_6_123458(cv_source())) == 8> t8; return 0; } one sink_6_123467( A&); two sink_6_123467(const A&); three sink_6_123467(volatile A&); four sink_6_123467(const volatile A&); six sink_6_123467(const A&&); seven sink_6_123467(volatile A&&); int test6_123467() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123467(a)) == 1> t1; sa<sizeof(sink_6_123467(ca)) == 2> t2; sa<sizeof(sink_6_123467(va)) == 3> t3; sa<sizeof(sink_6_123467(cva)) == 4> t4; sa<sizeof(sink_6_123467(c_source())) == 6> t6; sa<sizeof(sink_6_123467(v_source())) == 7> t7; return 0; } one sink_6_123468( A&); two sink_6_123468(const A&); three sink_6_123468(volatile A&); four sink_6_123468(const volatile A&); six sink_6_123468(const A&&); eight sink_6_123468(const volatile A&&); int test6_123468() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123468(a)) == 1> t1; sa<sizeof(sink_6_123468(ca)) == 2> t2; sa<sizeof(sink_6_123468(va)) == 3> t3; sa<sizeof(sink_6_123468(cva)) == 4> t4; sa<sizeof(sink_6_123468(source())) == 6> t5; sa<sizeof(sink_6_123468(c_source())) == 6> t6; sa<sizeof(sink_6_123468(v_source())) == 8> t7; sa<sizeof(sink_6_123468(cv_source())) == 8> t8; return 0; } one sink_6_123478( A&); two sink_6_123478(const A&); three sink_6_123478(volatile A&); four sink_6_123478(const volatile A&); seven sink_6_123478(volatile A&&); eight sink_6_123478(const volatile A&&); int test6_123478() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123478(a)) == 1> t1; sa<sizeof(sink_6_123478(ca)) == 2> t2; sa<sizeof(sink_6_123478(va)) == 3> t3; sa<sizeof(sink_6_123478(cva)) == 4> t4; sa<sizeof(sink_6_123478(source())) == 7> t5; sa<sizeof(sink_6_123478(c_source())) == 8> t6; sa<sizeof(sink_6_123478(v_source())) == 7> t7; sa<sizeof(sink_6_123478(cv_source())) == 8> t8; return 0; } one sink_6_123567( A&); two sink_6_123567(const A&); three sink_6_123567(volatile A&); five sink_6_123567( A&&); six sink_6_123567(const A&&); seven sink_6_123567(volatile A&&); int test6_123567() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123567(a)) == 1> t1; sa<sizeof(sink_6_123567(ca)) == 2> t2; sa<sizeof(sink_6_123567(va)) == 3> t3; sa<sizeof(sink_6_123567(source())) == 5> t5; sa<sizeof(sink_6_123567(c_source())) == 6> t6; sa<sizeof(sink_6_123567(v_source())) == 7> t7; return 0; } one sink_6_123568( A&); two sink_6_123568(const A&); three sink_6_123568(volatile A&); five sink_6_123568( A&&); six sink_6_123568(const A&&); eight sink_6_123568(const volatile A&&); int test6_123568() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123568(a)) == 1> t1; sa<sizeof(sink_6_123568(ca)) == 2> t2; sa<sizeof(sink_6_123568(va)) == 3> t3; sa<sizeof(sink_6_123568(cva)) == 8> t4; sa<sizeof(sink_6_123568(source())) == 5> t5; sa<sizeof(sink_6_123568(c_source())) == 6> t6; sa<sizeof(sink_6_123568(v_source())) == 8> t7; sa<sizeof(sink_6_123568(cv_source())) == 8> t8; return 0; } one sink_6_123578( A&); two sink_6_123578(const A&); three sink_6_123578(volatile A&); five sink_6_123578( A&&); seven sink_6_123578(volatile A&&); eight sink_6_123578(const volatile A&&); int test6_123578() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123578(a)) == 1> t1; sa<sizeof(sink_6_123578(ca)) == 2> t2; sa<sizeof(sink_6_123578(va)) == 3> t3; sa<sizeof(sink_6_123578(cva)) == 8> t4; sa<sizeof(sink_6_123578(source())) == 5> t5; sa<sizeof(sink_6_123578(c_source())) == 8> t6; sa<sizeof(sink_6_123578(v_source())) == 7> t7; sa<sizeof(sink_6_123578(cv_source())) == 8> t8; return 0; } one sink_6_123678( A&); two sink_6_123678(const A&); three sink_6_123678(volatile A&); six sink_6_123678(const A&&); seven sink_6_123678(volatile A&&); eight sink_6_123678(const volatile A&&); int test6_123678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_123678(a)) == 1> t1; sa<sizeof(sink_6_123678(ca)) == 2> t2; sa<sizeof(sink_6_123678(va)) == 3> t3; sa<sizeof(sink_6_123678(cva)) == 8> t4; sa<sizeof(sink_6_123678(c_source())) == 6> t6; sa<sizeof(sink_6_123678(v_source())) == 7> t7; sa<sizeof(sink_6_123678(cv_source())) == 8> t8; return 0; } one sink_6_124567( A&); two sink_6_124567(const A&); four sink_6_124567(const volatile A&); five sink_6_124567( A&&); six sink_6_124567(const A&&); seven sink_6_124567(volatile A&&); int test6_124567() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_124567(a)) == 1> t1; sa<sizeof(sink_6_124567(ca)) == 2> t2; sa<sizeof(sink_6_124567(va)) == 4> t3; sa<sizeof(sink_6_124567(cva)) == 4> t4; sa<sizeof(sink_6_124567(source())) == 5> t5; sa<sizeof(sink_6_124567(c_source())) == 6> t6; sa<sizeof(sink_6_124567(v_source())) == 7> t7; return 0; } one sink_6_124568( A&); two sink_6_124568(const A&); four sink_6_124568(const volatile A&); five sink_6_124568( A&&); six sink_6_124568(const A&&); eight sink_6_124568(const volatile A&&); int test6_124568() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_124568(a)) == 1> t1; sa<sizeof(sink_6_124568(ca)) == 2> t2; sa<sizeof(sink_6_124568(va)) == 4> t3; sa<sizeof(sink_6_124568(cva)) == 4> t4; sa<sizeof(sink_6_124568(source())) == 5> t5; sa<sizeof(sink_6_124568(c_source())) == 6> t6; sa<sizeof(sink_6_124568(v_source())) == 8> t7; sa<sizeof(sink_6_124568(cv_source())) == 8> t8; return 0; } one sink_6_124578( A&); two sink_6_124578(const A&); four sink_6_124578(const volatile A&); five sink_6_124578( A&&); seven sink_6_124578(volatile A&&); eight sink_6_124578(const volatile A&&); int test6_124578() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_124578(a)) == 1> t1; sa<sizeof(sink_6_124578(ca)) == 2> t2; sa<sizeof(sink_6_124578(va)) == 4> t3; sa<sizeof(sink_6_124578(cva)) == 4> t4; sa<sizeof(sink_6_124578(source())) == 5> t5; sa<sizeof(sink_6_124578(c_source())) == 8> t6; sa<sizeof(sink_6_124578(v_source())) == 7> t7; sa<sizeof(sink_6_124578(cv_source())) == 8> t8; return 0; } one sink_6_124678( A&); two sink_6_124678(const A&); four sink_6_124678(const volatile A&); six sink_6_124678(const A&&); seven sink_6_124678(volatile A&&); eight sink_6_124678(const volatile A&&); int test6_124678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_124678(a)) == 1> t1; sa<sizeof(sink_6_124678(ca)) == 2> t2; sa<sizeof(sink_6_124678(va)) == 4> t3; sa<sizeof(sink_6_124678(cva)) == 4> t4; sa<sizeof(sink_6_124678(c_source())) == 6> t6; sa<sizeof(sink_6_124678(v_source())) == 7> t7; sa<sizeof(sink_6_124678(cv_source())) == 8> t8; return 0; } one sink_6_125678( A&); two sink_6_125678(const A&); five sink_6_125678( A&&); six sink_6_125678(const A&&); seven sink_6_125678(volatile A&&); eight sink_6_125678(const volatile A&&); int test6_125678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_125678(a)) == 1> t1; sa<sizeof(sink_6_125678(ca)) == 2> t2; sa<sizeof(sink_6_125678(va)) == 7> t3; sa<sizeof(sink_6_125678(cva)) == 8> t4; sa<sizeof(sink_6_125678(source())) == 5> t5; sa<sizeof(sink_6_125678(c_source())) == 6> t6; sa<sizeof(sink_6_125678(v_source())) == 7> t7; sa<sizeof(sink_6_125678(cv_source())) == 8> t8; return 0; } one sink_6_134567( A&); three sink_6_134567(volatile A&); four sink_6_134567(const volatile A&); five sink_6_134567( A&&); six sink_6_134567(const A&&); seven sink_6_134567(volatile A&&); int test6_134567() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_134567(a)) == 1> t1; sa<sizeof(sink_6_134567(ca)) == 4> t2; sa<sizeof(sink_6_134567(va)) == 3> t3; sa<sizeof(sink_6_134567(cva)) == 4> t4; sa<sizeof(sink_6_134567(source())) == 5> t5; sa<sizeof(sink_6_134567(c_source())) == 6> t6; sa<sizeof(sink_6_134567(v_source())) == 7> t7; return 0; } one sink_6_134568( A&); three sink_6_134568(volatile A&); four sink_6_134568(const volatile A&); five sink_6_134568( A&&); six sink_6_134568(const A&&); eight sink_6_134568(const volatile A&&); int test6_134568() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_134568(a)) == 1> t1; sa<sizeof(sink_6_134568(ca)) == 4> t2; sa<sizeof(sink_6_134568(va)) == 3> t3; sa<sizeof(sink_6_134568(cva)) == 4> t4; sa<sizeof(sink_6_134568(source())) == 5> t5; sa<sizeof(sink_6_134568(c_source())) == 6> t6; sa<sizeof(sink_6_134568(v_source())) == 8> t7; sa<sizeof(sink_6_134568(cv_source())) == 8> t8; return 0; } one sink_6_134578( A&); three sink_6_134578(volatile A&); four sink_6_134578(const volatile A&); five sink_6_134578( A&&); seven sink_6_134578(volatile A&&); eight sink_6_134578(const volatile A&&); int test6_134578() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_134578(a)) == 1> t1; sa<sizeof(sink_6_134578(ca)) == 4> t2; sa<sizeof(sink_6_134578(va)) == 3> t3; sa<sizeof(sink_6_134578(cva)) == 4> t4; sa<sizeof(sink_6_134578(source())) == 5> t5; sa<sizeof(sink_6_134578(c_source())) == 8> t6; sa<sizeof(sink_6_134578(v_source())) == 7> t7; sa<sizeof(sink_6_134578(cv_source())) == 8> t8; return 0; } one sink_6_134678( A&); three sink_6_134678(volatile A&); four sink_6_134678(const volatile A&); six sink_6_134678(const A&&); seven sink_6_134678(volatile A&&); eight sink_6_134678(const volatile A&&); int test6_134678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_134678(a)) == 1> t1; sa<sizeof(sink_6_134678(ca)) == 4> t2; sa<sizeof(sink_6_134678(va)) == 3> t3; sa<sizeof(sink_6_134678(cva)) == 4> t4; sa<sizeof(sink_6_134678(c_source())) == 6> t6; sa<sizeof(sink_6_134678(v_source())) == 7> t7; sa<sizeof(sink_6_134678(cv_source())) == 8> t8; return 0; } one sink_6_135678( A&); three sink_6_135678(volatile A&); five sink_6_135678( A&&); six sink_6_135678(const A&&); seven sink_6_135678(volatile A&&); eight sink_6_135678(const volatile A&&); int test6_135678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_135678(a)) == 1> t1; sa<sizeof(sink_6_135678(ca)) == 6> t2; sa<sizeof(sink_6_135678(va)) == 3> t3; sa<sizeof(sink_6_135678(cva)) == 8> t4; sa<sizeof(sink_6_135678(source())) == 5> t5; sa<sizeof(sink_6_135678(c_source())) == 6> t6; sa<sizeof(sink_6_135678(v_source())) == 7> t7; sa<sizeof(sink_6_135678(cv_source())) == 8> t8; return 0; } one sink_6_145678( A&); four sink_6_145678(const volatile A&); five sink_6_145678( A&&); six sink_6_145678(const A&&); seven sink_6_145678(volatile A&&); eight sink_6_145678(const volatile A&&); int test6_145678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_145678(a)) == 1> t1; sa<sizeof(sink_6_145678(ca)) == 4> t2; sa<sizeof(sink_6_145678(va)) == 4> t3; sa<sizeof(sink_6_145678(cva)) == 4> t4; sa<sizeof(sink_6_145678(source())) == 5> t5; sa<sizeof(sink_6_145678(c_source())) == 6> t6; sa<sizeof(sink_6_145678(v_source())) == 7> t7; sa<sizeof(sink_6_145678(cv_source())) == 8> t8; return 0; } two sink_6_234567(const A&); three sink_6_234567(volatile A&); four sink_6_234567(const volatile A&); five sink_6_234567( A&&); six sink_6_234567(const A&&); seven sink_6_234567(volatile A&&); int test6_234567() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_234567(ca)) == 2> t2; sa<sizeof(sink_6_234567(va)) == 3> t3; sa<sizeof(sink_6_234567(cva)) == 4> t4; sa<sizeof(sink_6_234567(source())) == 5> t5; sa<sizeof(sink_6_234567(c_source())) == 6> t6; sa<sizeof(sink_6_234567(v_source())) == 7> t7; return 0; } two sink_6_234568(const A&); three sink_6_234568(volatile A&); four sink_6_234568(const volatile A&); five sink_6_234568( A&&); six sink_6_234568(const A&&); eight sink_6_234568(const volatile A&&); int test6_234568() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_234568(ca)) == 2> t2; sa<sizeof(sink_6_234568(va)) == 3> t3; sa<sizeof(sink_6_234568(cva)) == 4> t4; sa<sizeof(sink_6_234568(source())) == 5> t5; sa<sizeof(sink_6_234568(c_source())) == 6> t6; sa<sizeof(sink_6_234568(v_source())) == 8> t7; sa<sizeof(sink_6_234568(cv_source())) == 8> t8; return 0; } two sink_6_234578(const A&); three sink_6_234578(volatile A&); four sink_6_234578(const volatile A&); five sink_6_234578( A&&); seven sink_6_234578(volatile A&&); eight sink_6_234578(const volatile A&&); int test6_234578() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_234578(ca)) == 2> t2; sa<sizeof(sink_6_234578(va)) == 3> t3; sa<sizeof(sink_6_234578(cva)) == 4> t4; sa<sizeof(sink_6_234578(source())) == 5> t5; sa<sizeof(sink_6_234578(c_source())) == 8> t6; sa<sizeof(sink_6_234578(v_source())) == 7> t7; sa<sizeof(sink_6_234578(cv_source())) == 8> t8; return 0; } two sink_6_234678(const A&); three sink_6_234678(volatile A&); four sink_6_234678(const volatile A&); six sink_6_234678(const A&&); seven sink_6_234678(volatile A&&); eight sink_6_234678(const volatile A&&); int test6_234678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_234678(ca)) == 2> t2; sa<sizeof(sink_6_234678(va)) == 3> t3; sa<sizeof(sink_6_234678(cva)) == 4> t4; sa<sizeof(sink_6_234678(c_source())) == 6> t6; sa<sizeof(sink_6_234678(v_source())) == 7> t7; sa<sizeof(sink_6_234678(cv_source())) == 8> t8; return 0; } two sink_6_235678(const A&); three sink_6_235678(volatile A&); five sink_6_235678( A&&); six sink_6_235678(const A&&); seven sink_6_235678(volatile A&&); eight sink_6_235678(const volatile A&&); int test6_235678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_235678(ca)) == 2> t2; sa<sizeof(sink_6_235678(va)) == 3> t3; sa<sizeof(sink_6_235678(cva)) == 8> t4; sa<sizeof(sink_6_235678(source())) == 5> t5; sa<sizeof(sink_6_235678(c_source())) == 6> t6; sa<sizeof(sink_6_235678(v_source())) == 7> t7; sa<sizeof(sink_6_235678(cv_source())) == 8> t8; return 0; } two sink_6_245678(const A&); four sink_6_245678(const volatile A&); five sink_6_245678( A&&); six sink_6_245678(const A&&); seven sink_6_245678(volatile A&&); eight sink_6_245678(const volatile A&&); int test6_245678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_245678(a)) == 2> t1; sa<sizeof(sink_6_245678(ca)) == 2> t2; sa<sizeof(sink_6_245678(va)) == 4> t3; sa<sizeof(sink_6_245678(cva)) == 4> t4; sa<sizeof(sink_6_245678(source())) == 5> t5; sa<sizeof(sink_6_245678(c_source())) == 6> t6; sa<sizeof(sink_6_245678(v_source())) == 7> t7; sa<sizeof(sink_6_245678(cv_source())) == 8> t8; return 0; } three sink_6_345678(volatile A&); four sink_6_345678(const volatile A&); five sink_6_345678( A&&); six sink_6_345678(const A&&); seven sink_6_345678(volatile A&&); eight sink_6_345678(const volatile A&&); int test6_345678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_6_345678(a)) == 3> t1; sa<sizeof(sink_6_345678(ca)) == 4> t2; sa<sizeof(sink_6_345678(va)) == 3> t3; sa<sizeof(sink_6_345678(cva)) == 4> t4; sa<sizeof(sink_6_345678(source())) == 5> t5; sa<sizeof(sink_6_345678(c_source())) == 6> t6; sa<sizeof(sink_6_345678(v_source())) == 7> t7; sa<sizeof(sink_6_345678(cv_source())) == 8> t8; return 0; } int main() { return test6_123456() + test6_123457() + test6_123458() + test6_123467() + test6_123468() + test6_123478() + test6_123567() + test6_123568() + test6_123578() + test6_123678() + test6_124567() + test6_124568() + test6_124578() + test6_124678() + test6_125678() + test6_134567() + test6_134568() + test6_134578() + test6_134678() + test6_135678() + test6_145678() + test6_234567() + test6_234568() + test6_234578() + test6_234678() + test6_235678() + test6_245678() + test6_345678(); }
google
chromium
variadic54
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic54.C
227
utf_8
301bf335a25b68e8f266634c4f36eec0
// { dg-options "-std=gnu++0x" } template<typename F, typename... BoundArgs> class bound_functor { public: bound_functor(); }; template<typename F, typename... BoundArgs> bound_functor<F, BoundArgs...>::bound_functor() { }
google
chromium
cast
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/cast.C
512
utf_8
62a7f347a0ca8319ed02c912432716b2
// I, Howard Hinnant, hereby place this code in the public domain. // Test cast from lvalue to rvalue // { 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(const A&) {return one();} two foo(A&&) {return two();} int test1() { A a; sa<sizeof(foo(a)) == 1> t1; sa<sizeof(foo(static_cast<A&&>(a))) == 2> t2; return 0; } int main() { return test1(); }
google
chromium
variadic25
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic25.C
342
utf_8
b06cea5f9c66b27dc3d3d19a6217154c
// { dg-options "-std=gnu++0x" } template<int... Values> struct sum; template<> struct sum<> { static const int value = 0; }; template<int Value, int... Values> struct sum<Value, Values...> { static const int value = Value + sum<Values...>::value; }; int a0[sum<>::value == 0? 1 : -1]; int a1[sum<1, 2, 3, 4, 5>::value == 15? 1 : -1];
google
chromium
variadic84
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic84.C
908
utf_8
221e9719b7a3015ccd3f7255a480ae29
// PR c++/32565 // { dg-do compile } // { dg-options "-std=c++0x" } template<typename...> struct A1; template<template<int...> class T> struct A1<T<0> > {}; template<typename...> struct A2; template<template<int...> class T> struct A2<T<0, 1> > {}; template<typename...> struct A3; template<template<int, int...> class T> struct A3<T<0, 1> > {}; template<typename...> struct A4; template<template<typename...> class T> struct A4<T<int> > {}; template<typename...> struct A5; template<template<typename...> class T> struct A5<T<int, long> > {}; template<typename...> struct A6; template<template<typename, typename...> class T> struct A6<T<int, long> > {}; template<int> struct B1 {}; template<int, int> struct B2 {}; template<typename> struct B3 {}; template<typename, typename> struct B4 {}; A1<B1<0> > a1; A2<B2<0, 1> > a2; A3<B2<0, 1> > a3; A4<B3<int> > a4; A5<B4<int, long> > a5; A6<B4<int, long> > a6;
google
chromium
elision
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/elision.C
1,032
utf_8
614bd2c770efa2ba339de0abcc46f4cb
// 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(const move_only&); move_only& operator=(const move_only&); public: move_only() {} move_only(move_only&&) {} move_only& operator=(move_only&&) {return *this;} }; move_only test1() { return move_only(); } move_only test2() { move_only x; return x; } move_only test3(bool b) { move_only x1; if (b) { move_only x2; return x2; } return x1; } void test4(bool b) { if (!b) throw move_only(); } void test5(bool b) { move_only x; if (!b) throw x; } extern bool b; int main() { move_only t1 = test1(); move_only t2 = test2(); move_only t3 = test3(b); test4(b); test5(b); return 0; } bool b = true;
google
chromium
variadic1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic1.C
171
utf_8
bb6afbbf296083db4650ea62c40e7f80
// { dg-options "-std=gnu++0x" } template<typename...> class tuple; template<typename... Args> class tuple { }; template<typename T1, class... Args> class tuple1p { };
google
chromium
pr33839
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr33839.C
195
utf_8
33ff45fe18bdee32a83ed1fdfad581b7
// { dg-options -std=c++0x } template<int> struct A; void foo() { __decltype A<0>; // { dg-error "invalid declarator|expected" } __decltype (A<0>); // { dg-error "must be an expression" } }
google
chromium
variadic-new
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-new.C
271
utf_8
a5bef9fdebecb19720d8595d1210c21f
// { dg-do "run" } // { dg-options "-std=c++0x" } // Contributed by Peter Dimov // PR c++/32597 #include <assert.h> #include <new> int k = 5; template< class... Args > void f( Args... args ) { new( &k ) int( args... ); } int main() { f(); assert( k == 0 ); }
google
chromium
pr31432
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31432.C
256
utf_8
8d4acf95e9330d762724340eec4d20a0
// { dg-options "-std=gnu++0x" } 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
chromium
initlist27
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist27.C
143
utf_8
d6492e6206eb4be3215f8b76de11bea1
// PR c++/42061 // { dg-do compile } // { dg-options "-std=c++0x" } int& i = { j }; // { dg-error "invalid initialization|was not declared" }
google
chromium
variadic52
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic52.C
180
utf_8
6b2e3d5143374b8c95565d681a482621
// { dg-options "-std=gnu++0x" } 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
chromium
initlist2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist2.C
555
utf_8
b07e5a8dc17e52f03c788220d501f892
// Test that conversion to std::initializer_list takes priority over other // user-defined conversions. // { dg-do link } // { dg-options "-std=c++0x" } #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 u) {} }; template<class T, class U> struct map { void insert (pair<T,U>); void insert (std::initializer_list<pair<T,U> >) {} }; int main() { map<string,string> m; m.insert({ {"this","that"}, {"me","you"} }); }
google
chromium
pr34057
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr34057.C
190
utf_8
6ffd247ca2be2be780441467eb7dce45
// PR c++/34057 // { dg-do compile } // { dg-options "-std=c++0x" } template <typename... T> struct A { typedef T X __attribute__ ((vector_size (8))); // { dg-error "not expanded|T" } };
google
chromium
auto14
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto14.C
409
utf_8
22834457eced7ff0d65e97187ae5a79b
// PR c++/40306, c++/40307 // { dg-options "-std=c++0x" } // { dg-do run } template< typename T > struct test { test run() { auto tmp = *this; return tmp; } test run_pass() { test tmp( *this ); return tmp; } test run_fail() { auto tmp( *this ); return tmp; } }; int main() { test<int> x; x.run(); x.run_pass(); x.run_fail(); return 0; }
google
chromium
elision_weak
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/elision_weak.C
118
utf_8
af521f07a34d29e505189640746f3ea0
// { dg-do compile } struct S { S() {} S(S&) {} }; S f() { S s; return s; } void g() { S s; throw s; }
google
chromium
initlist9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist9.C
454
utf_8
b047a90d8ab317f72f56eb04c872d3e7
// PR c++/37860 // { dg-options "-std=c++0x" } struct b { bool t; b() = default; ~b() = default; b& operator=(const b&) = delete; b(const b&) = delete; // { dg-error "deleted" } b(bool _t): t (_t) { } }; int main() { // copy list initialization b tst1 = { false }; // copy initialization. b tst2 = false; // { dg-error "used here" } // direct list initialization b tst3 { false }; // default initialization b tst4; }
google
chromium
decltype2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype2.C
1,257
utf_8
8e4636150244fc51b5ba40f24e50437c
// { 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; }; #define CHECK_DECLTYPE(DECLTYPE,RESULT) \ static_assert(is_same< DECLTYPE , RESULT >::value, #RESULT) struct A {}; int a; int& b = a; const int& c = a; const int d = 5; const A e = A(); CHECK_DECLTYPE(decltype(a), int); CHECK_DECLTYPE(decltype(b), int&); CHECK_DECLTYPE(decltype(d), int*); } int foo(char); int bar(char); int bar(int); CHECK_DECLTYPE(decltype(foo), int(char)); decltype(bar) z; // { dg-error "overload" } // { dg-error "invalid type" "" { target *-*-* } 48 } CHECK_DECLTYPE(decltype(&foo), int(*)(char)); CHECK_DECLTYPE(decltype(*&foo), int(&)(char)); void array_types() { int a[10]; CHECK_DECLTYPE(decltype(a), int[10]); }
google
chromium
enum7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/enum7.C
292
utf_8
ec6b0bf4b17fabec5ae1aaf79db31e6f
// PR c++/37816 // { dg-options "-std=c++0x" } 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
chromium
variadic81
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic81.C
221
utf_8
c50ca86b3c5889ab02daaecbb96d59b9
// PR c++/33461 // { dg-options "-std=gnu++0x" } template<typename> struct A; template<typename... T> struct A<T*> // { dg-error "not expanded|T|not used|T" } { struct B; }; A<void*> a; // { dg-error "incomplete" }
google
chromium
auto3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto3.C
573
utf_8
1e03d148c052b37bfdfafeb5db47dee0
// Negative test for auto // { dg-options "-std=c++0x" } #include <initializer_list> auto x; // { dg-error "auto" } // If the type deduced for the template parameter U is not the same in each // deduction, the program is ill-formed. auto i = 42, j = 42.0; // { dg-error "" "" { xfail *-*-* } } // New CWG issue auto a[2] = { 1, 2 }; // { dg-error "auto" } template<class T> struct A { }; A<int> A1; // CWG issue 625 A<auto> A2 = A1; // { dg-error "" } auto foo() { } // { dg-error "auto" } void bar(auto i) // { dg-error "incomplete|auto" } { (void)i; }
google
chromium
variadic18
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic18.C
1,011
utf_8
a235bb78ea18efc7b76823629a43177f
// { dg-options "-std=gnu++0x" } template<typename...> class tuple { }; template<typename T, template<typename T> class... Metafunctions> struct apply_all { typedef tuple<typename Metafunctions<T>::type...> type; }; 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> struct add_pointer { typedef T* type; }; template<typename T> struct add_pointer<T&> { typedef T& type; }; template<typename T> struct add_reference { typedef T& type; }; template<typename T> struct add_reference<T&> { typedef T& type; }; int a0[is_same<apply_all<int>::type,tuple<> >::value? 1 : -1]; int a1[is_same<apply_all<int, add_pointer>::type,tuple<int*> >::value? 1 : -1]; int a2[is_same<apply_all<int, add_pointer, add_reference>::type,tuple<int*, int&> >::value? 1 : -1]; int a3[is_same<apply_all<int&, add_pointer, add_reference>::type,tuple<int&, int&> >::value? 1 : -1];
google
chromium
pr34058
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr34058.C
166
utf_8
6a5b31135f37628be4892ec76215d2a6
// PR c++/34058 // { dg-do compile } // { dg-options "-std=c++0x" } template <typename...T> struct A { typedef T X; // { dg-error "not expanded|T" } }; A<int> a;
google
chromium
initlist5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist5.C
740
utf_8
40bb48134a829e97a58bfec1928ca395
// Test for narrowing diagnostics // { dg-options "-std=c++0x" } #include <initializer_list> struct A { int i; int j; }; A a2 { 1.2 }; // { dg-error "narrowing" } A a1 { 1, 2 }; // aggregate initialization struct B { B(std::initializer_list<int>); }; B b1 { 1, 2 }; // creates initializer_list<int> and calls constructor B b2 { 1, 2.0 }; // { dg-error "narrowing" } struct C { C(int i, double j); }; C c1 = { 1, 2.2 }; // calls constructor with arguments (1, 2.2) C c2 = { 1.1, 2 }; // { dg-error "narrowing" } int j { 1 }; // initialize to 1 int k {}; // initialize to 0 // PR c++/36963 double d = 1.1; float fa[] = { d, 1.1 }; // { dg-error "narrowing conversion of 'd'" } const double d2 = 1.1; float fa2[] = { d2, 1.1 };
google
chromium
vt-37737-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C
159
utf_8
21083e5ee0d1039e33bda11cf5e195f3
// { dg-options "-std=c++0x" } void f() { } template<class U, class... T> void f(){ f<T...>(); } // { dg-error "no matching" } int main() { f<char>(); }
google
chromium
rv3p
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv3p.C
32,759
utf_8
e3984a55baa52a01cb63dfc0e8dd87f3
// 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 four {char x[4];}; struct five {char x[5];}; struct six {char x[6];}; struct seven {char x[7];}; struct eight {char x[8];}; struct A { A(); A(const volatile A&&); }; A source(); const A c_source(); volatile A v_source(); const volatile A cv_source(); // 3 at a time one sink_3_123( A&); two sink_3_123(const A&); three sink_3_123(volatile A&); int test3_123() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_123(a)) == 1> t1; sa<sizeof(sink_3_123(ca)) == 2> t2; sa<sizeof(sink_3_123(va)) == 3> t3; sa<sizeof(sink_3_123(source())) == 2> t5; sa<sizeof(sink_3_123(c_source())) == 2> t6; return 0; } one sink_3_124( A&); two sink_3_124(const A&); four sink_3_124(const volatile A&); int test3_124() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_124(a)) == 1> t1; sa<sizeof(sink_3_124(ca)) == 2> t2; sa<sizeof(sink_3_124(va)) == 4> t3; sa<sizeof(sink_3_124(cva)) == 4> t4; sa<sizeof(sink_3_124(source())) == 2> t5; sa<sizeof(sink_3_124(c_source())) == 2> t6; return 0; } one sink_3_125( A&); two sink_3_125(const A&); five sink_3_125( A&&); int test3_125() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_125(a)) == 1> t1; sa<sizeof(sink_3_125(ca)) == 2> t2; sa<sizeof(sink_3_125(source())) == 5> t5; sa<sizeof(sink_3_125(c_source())) == 2> t6; return 0; } one sink_3_126( A&); two sink_3_126(const A&); six sink_3_126(const A&&); int test3_126() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_126(a)) == 1> t1; sa<sizeof(sink_3_126(ca)) == 2> t2; sa<sizeof(sink_3_126(source())) == 6> t5; sa<sizeof(sink_3_126(c_source())) == 6> t6; return 0; } one sink_3_127( A&); two sink_3_127(const A&); seven sink_3_127(volatile A&&); int test3_127() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_127(a)) == 1> t1; sa<sizeof(sink_3_127(ca)) == 2> t2; sa<sizeof(sink_3_127(va)) == 7> t3; sa<sizeof(sink_3_127(source())) == 7> t5; sa<sizeof(sink_3_127(c_source())) == 2> t6; sa<sizeof(sink_3_127(v_source())) == 7> t7; return 0; } one sink_3_128( A&); two sink_3_128(const A&); eight sink_3_128(const volatile A&&); int test3_128() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_128(a)) == 1> t1; sa<sizeof(sink_3_128(ca)) == 2> t2; sa<sizeof(sink_3_128(va)) == 8> t3; sa<sizeof(sink_3_128(cva)) == 8> t4; sa<sizeof(sink_3_128(source())) == 8> t5; sa<sizeof(sink_3_128(c_source())) == 8> t6; sa<sizeof(sink_3_128(v_source())) == 8> t7; sa<sizeof(sink_3_128(cv_source())) == 8> t8; return 0; } one sink_3_134( A&); three sink_3_134(volatile A&); four sink_3_134(const volatile A&); int test3_134() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_134(a)) == 1> t1; sa<sizeof(sink_3_134(ca)) == 4> t2; sa<sizeof(sink_3_134(va)) == 3> t3; sa<sizeof(sink_3_134(cva)) == 4> t4; return 0; } one sink_3_135( A&); three sink_3_135(volatile A&); five sink_3_135( A&&); int test3_135() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_135(a)) == 1> t1; sa<sizeof(sink_3_135(va)) == 3> t3; sa<sizeof(sink_3_135(source())) == 5> t5; return 0; } one sink_3_136( A&); three sink_3_136(volatile A&); six sink_3_136(const A&&); int test3_136() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_136(a)) == 1> t1; sa<sizeof(sink_3_136(ca)) == 6> t2; sa<sizeof(sink_3_136(va)) == 3> t3; sa<sizeof(sink_3_136(source())) == 6> t5; sa<sizeof(sink_3_136(c_source())) == 6> t6; return 0; } one sink_3_137( A&); three sink_3_137(volatile A&); seven sink_3_137(volatile A&&); int test3_137() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_137(a)) == 1> t1; sa<sizeof(sink_3_137(va)) == 3> t3; sa<sizeof(sink_3_137(source())) == 7> t5; sa<sizeof(sink_3_137(v_source())) == 7> t7; return 0; } one sink_3_138( A&); three sink_3_138(volatile A&); eight sink_3_138(const volatile A&&); int test3_138() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_138(a)) == 1> t1; sa<sizeof(sink_3_138(ca)) == 8> t2; sa<sizeof(sink_3_138(va)) == 3> t3; sa<sizeof(sink_3_138(cva)) == 8> t4; sa<sizeof(sink_3_138(source())) == 8> t5; sa<sizeof(sink_3_138(c_source())) == 8> t6; sa<sizeof(sink_3_138(v_source())) == 8> t7; sa<sizeof(sink_3_138(cv_source())) == 8> t8; return 0; } one sink_3_145( A&); four sink_3_145(const volatile A&); five sink_3_145( A&&); int test3_145() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_145(a)) == 1> t1; sa<sizeof(sink_3_145(ca)) == 4> t2; sa<sizeof(sink_3_145(va)) == 4> t3; sa<sizeof(sink_3_145(cva)) == 4> t4; sa<sizeof(sink_3_145(source())) == 5> t5; return 0; } one sink_3_146( A&); four sink_3_146(const volatile A&); six sink_3_146(const A&&); int test3_146() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_146(a)) == 1> t1; sa<sizeof(sink_3_146(ca)) == 4> t2; sa<sizeof(sink_3_146(va)) == 4> t3; sa<sizeof(sink_3_146(cva)) == 4> t4; sa<sizeof(sink_3_146(source())) == 6> t5; sa<sizeof(sink_3_146(c_source())) == 6> t6; return 0; } one sink_3_147( A&); four sink_3_147(const volatile A&); seven sink_3_147(volatile A&&); int test3_147() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_147(a)) == 1> t1; sa<sizeof(sink_3_147(ca)) == 4> t2; sa<sizeof(sink_3_147(va)) == 4> t3; sa<sizeof(sink_3_147(cva)) == 4> t4; sa<sizeof(sink_3_147(source())) == 7> t5; sa<sizeof(sink_3_147(v_source())) == 7> t7; return 0; } one sink_3_148( A&); four sink_3_148(const volatile A&); eight sink_3_148(const volatile A&&); int test3_148() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_148(a)) == 1> t1; sa<sizeof(sink_3_148(ca)) == 4> t2; sa<sizeof(sink_3_148(va)) == 4> t3; sa<sizeof(sink_3_148(cva)) == 4> t4; sa<sizeof(sink_3_148(source())) == 8> t5; sa<sizeof(sink_3_148(c_source())) == 8> t6; sa<sizeof(sink_3_148(v_source())) == 8> t7; sa<sizeof(sink_3_148(cv_source())) == 8> t8; return 0; } one sink_3_156( A&); five sink_3_156( A&&); six sink_3_156(const A&&); int test3_156() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_156(a)) == 1> t1; sa<sizeof(sink_3_156(ca)) == 6> t2; sa<sizeof(sink_3_156(source())) == 5> t5; sa<sizeof(sink_3_156(c_source())) == 6> t6; return 0; } one sink_3_157( A&); five sink_3_157( A&&); seven sink_3_157(volatile A&&); int test3_157() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_157(a)) == 1> t1; sa<sizeof(sink_3_157(va)) == 7> t3; sa<sizeof(sink_3_157(source())) == 5> t5; sa<sizeof(sink_3_157(v_source())) == 7> t7; return 0; } one sink_3_158( A&); five sink_3_158( A&&); eight sink_3_158(const volatile A&&); int test3_158() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_158(a)) == 1> t1; sa<sizeof(sink_3_158(ca)) == 8> t2; sa<sizeof(sink_3_158(va)) == 8> t3; sa<sizeof(sink_3_158(cva)) == 8> t4; sa<sizeof(sink_3_158(source())) == 5> t5; sa<sizeof(sink_3_158(c_source())) == 8> t6; sa<sizeof(sink_3_158(v_source())) == 8> t7; sa<sizeof(sink_3_158(cv_source())) == 8> t8; return 0; } one sink_3_167( A&); six sink_3_167(const A&&); seven sink_3_167(volatile A&&); int test3_167() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_167(a)) == 1> t1; sa<sizeof(sink_3_167(ca)) == 6> t2; sa<sizeof(sink_3_167(va)) == 7> t3; sa<sizeof(sink_3_167(c_source())) == 6> t6; sa<sizeof(sink_3_167(v_source())) == 7> t7; return 0; } one sink_3_168( A&); six sink_3_168(const A&&); eight sink_3_168(const volatile A&&); int test3_168() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_168(a)) == 1> t1; sa<sizeof(sink_3_168(ca)) == 6> t2; sa<sizeof(sink_3_168(va)) == 8> t3; sa<sizeof(sink_3_168(cva)) == 8> t4; sa<sizeof(sink_3_168(source())) == 6> t5; sa<sizeof(sink_3_168(c_source())) == 6> t6; sa<sizeof(sink_3_168(v_source())) == 8> t7; sa<sizeof(sink_3_168(cv_source())) == 8> t8; return 0; } one sink_3_178( A&); seven sink_3_178(volatile A&&); eight sink_3_178(const volatile A&&); int test3_178() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_178(a)) == 1> t1; sa<sizeof(sink_3_178(ca)) == 8> t2; sa<sizeof(sink_3_178(va)) == 7> t3; sa<sizeof(sink_3_178(cva)) == 8> t4; sa<sizeof(sink_3_178(source())) == 7> t5; sa<sizeof(sink_3_178(c_source())) == 8> t6; sa<sizeof(sink_3_178(v_source())) == 7> t7; sa<sizeof(sink_3_178(cv_source())) == 8> t8; return 0; } two sink_3_234(const A&); three sink_3_234(volatile A&); four sink_3_234(const volatile A&); int test3_234() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_234(ca)) == 2> t2; sa<sizeof(sink_3_234(va)) == 3> t3; sa<sizeof(sink_3_234(cva)) == 4> t4; sa<sizeof(sink_3_234(source())) == 2> t5; sa<sizeof(sink_3_234(c_source())) == 2> t6; return 0; } two sink_3_235(const A&); three sink_3_235(volatile A&); five sink_3_235( A&&); int test3_235() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_235(ca)) == 2> t2; sa<sizeof(sink_3_235(va)) == 3> t3; sa<sizeof(sink_3_235(source())) == 5> t5; sa<sizeof(sink_3_235(c_source())) == 2> t6; return 0; } two sink_3_236(const A&); three sink_3_236(volatile A&); six sink_3_236(const A&&); int test3_236() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_236(ca)) == 2> t2; sa<sizeof(sink_3_236(va)) == 3> t3; sa<sizeof(sink_3_236(source())) == 6> t5; sa<sizeof(sink_3_236(c_source())) == 6> t6; return 0; } two sink_3_237(const A&); three sink_3_237(volatile A&); seven sink_3_237(volatile A&&); int test3_237() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_237(ca)) == 2> t2; sa<sizeof(sink_3_237(va)) == 3> t3; sa<sizeof(sink_3_237(source())) == 7> t5; sa<sizeof(sink_3_237(c_source())) == 2> t6; sa<sizeof(sink_3_237(v_source())) == 7> t7; return 0; } two sink_3_238(const A&); three sink_3_238(volatile A&); eight sink_3_238(const volatile A&&); int test3_238() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_238(ca)) == 2> t2; sa<sizeof(sink_3_238(va)) == 3> t3; sa<sizeof(sink_3_238(cva)) == 8> t4; sa<sizeof(sink_3_238(source())) == 8> t5; sa<sizeof(sink_3_238(c_source())) == 8> t6; sa<sizeof(sink_3_238(v_source())) == 8> t7; sa<sizeof(sink_3_238(cv_source())) == 8> t8; return 0; } two sink_3_245(const A&); four sink_3_245(const volatile A&); five sink_3_245( A&&); int test3_245() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_245(a)) == 2> t1; sa<sizeof(sink_3_245(ca)) == 2> t2; sa<sizeof(sink_3_245(va)) == 4> t3; sa<sizeof(sink_3_245(cva)) == 4> t4; sa<sizeof(sink_3_245(source())) == 5> t5; sa<sizeof(sink_3_245(c_source())) == 2> t6; return 0; } two sink_3_246(const A&); four sink_3_246(const volatile A&); six sink_3_246(const A&&); int test3_246() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_246(a)) == 2> t1; sa<sizeof(sink_3_246(ca)) == 2> t2; sa<sizeof(sink_3_246(va)) == 4> t3; sa<sizeof(sink_3_246(cva)) == 4> t4; sa<sizeof(sink_3_246(source())) == 6> t5; sa<sizeof(sink_3_246(c_source())) == 6> t6; return 0; } two sink_3_247(const A&); four sink_3_247(const volatile A&); seven sink_3_247(volatile A&&); int test3_247() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_247(a)) == 2> t1; sa<sizeof(sink_3_247(ca)) == 2> t2; sa<sizeof(sink_3_247(va)) == 4> t3; sa<sizeof(sink_3_247(cva)) == 4> t4; sa<sizeof(sink_3_247(source())) == 7> t5; sa<sizeof(sink_3_247(c_source())) == 2> t6; sa<sizeof(sink_3_247(v_source())) == 7> t7; return 0; } two sink_3_248(const A&); four sink_3_248(const volatile A&); eight sink_3_248(const volatile A&&); int test3_248() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_248(a)) == 2> t1; sa<sizeof(sink_3_248(ca)) == 2> t2; sa<sizeof(sink_3_248(va)) == 4> t3; sa<sizeof(sink_3_248(cva)) == 4> t4; sa<sizeof(sink_3_248(source())) == 8> t5; sa<sizeof(sink_3_248(c_source())) == 8> t6; sa<sizeof(sink_3_248(v_source())) == 8> t7; sa<sizeof(sink_3_248(cv_source())) == 8> t8; return 0; } two sink_3_256(const A&); five sink_3_256( A&&); six sink_3_256(const A&&); int test3_256() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_256(a)) == 2> t1; sa<sizeof(sink_3_256(ca)) == 2> t2; sa<sizeof(sink_3_256(source())) == 5> t5; sa<sizeof(sink_3_256(c_source())) == 6> t6; return 0; } two sink_3_257(const A&); five sink_3_257( A&&); seven sink_3_257(volatile A&&); int test3_257() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_257(a)) == 2> t1; sa<sizeof(sink_3_257(ca)) == 2> t2; sa<sizeof(sink_3_257(va)) == 7> t3; sa<sizeof(sink_3_257(source())) == 5> t5; sa<sizeof(sink_3_257(c_source())) == 2> t6; sa<sizeof(sink_3_257(v_source())) == 7> t7; return 0; } two sink_3_258(const A&); five sink_3_258( A&&); eight sink_3_258(const volatile A&&); int test3_258() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_258(a)) == 2> t1; sa<sizeof(sink_3_258(ca)) == 2> t2; sa<sizeof(sink_3_258(va)) == 8> t3; sa<sizeof(sink_3_258(cva)) == 8> t4; sa<sizeof(sink_3_258(source())) == 5> t5; sa<sizeof(sink_3_258(c_source())) == 8> t6; sa<sizeof(sink_3_258(v_source())) == 8> t7; sa<sizeof(sink_3_258(cv_source())) == 8> t8; return 0; } two sink_3_267(const A&); six sink_3_267(const A&&); seven sink_3_267(volatile A&&); int test3_267() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_267(a)) == 2> t1; sa<sizeof(sink_3_267(ca)) == 2> t2; sa<sizeof(sink_3_267(va)) == 7> t3; sa<sizeof(sink_3_267(c_source())) == 6> t6; sa<sizeof(sink_3_267(v_source())) == 7> t7; return 0; } two sink_3_268(const A&); six sink_3_268(const A&&); eight sink_3_268(const volatile A&&); int test3_268() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_268(a)) == 2> t1; sa<sizeof(sink_3_268(ca)) == 2> t2; sa<sizeof(sink_3_268(va)) == 8> t3; sa<sizeof(sink_3_268(cva)) == 8> t4; sa<sizeof(sink_3_268(source())) == 6> t5; sa<sizeof(sink_3_268(c_source())) == 6> t6; sa<sizeof(sink_3_268(v_source())) == 8> t7; sa<sizeof(sink_3_268(cv_source())) == 8> t8; return 0; } two sink_3_278(const A&); seven sink_3_278(volatile A&&); eight sink_3_278(const volatile A&&); int test3_278() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_278(a)) == 2> t1; sa<sizeof(sink_3_278(ca)) == 2> t2; sa<sizeof(sink_3_278(va)) == 7> t3; sa<sizeof(sink_3_278(cva)) == 8> t4; sa<sizeof(sink_3_278(source())) == 7> t5; sa<sizeof(sink_3_278(c_source())) == 8> t6; sa<sizeof(sink_3_278(v_source())) == 7> t7; sa<sizeof(sink_3_278(cv_source())) == 8> t8; return 0; } three sink_3_345(volatile A&); four sink_3_345(const volatile A&); five sink_3_345( A&&); int test3_345() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_345(a)) == 3> t1; sa<sizeof(sink_3_345(ca)) == 4> t2; sa<sizeof(sink_3_345(va)) == 3> t3; sa<sizeof(sink_3_345(cva)) == 4> t4; sa<sizeof(sink_3_345(source())) == 5> t5; return 0; } three sink_3_346(volatile A&); four sink_3_346(const volatile A&); six sink_3_346(const A&&); int test3_346() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_346(a)) == 3> t1; sa<sizeof(sink_3_346(ca)) == 4> t2; sa<sizeof(sink_3_346(va)) == 3> t3; sa<sizeof(sink_3_346(cva)) == 4> t4; sa<sizeof(sink_3_346(source())) == 6> t5; sa<sizeof(sink_3_346(c_source())) == 6> t6; return 0; } three sink_3_347(volatile A&); four sink_3_347(const volatile A&); seven sink_3_347(volatile A&&); int test3_347() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_347(a)) == 3> t1; sa<sizeof(sink_3_347(ca)) == 4> t2; sa<sizeof(sink_3_347(va)) == 3> t3; sa<sizeof(sink_3_347(cva)) == 4> t4; sa<sizeof(sink_3_347(source())) == 7> t5; sa<sizeof(sink_3_347(v_source())) == 7> t7; return 0; } three sink_3_348(volatile A&); four sink_3_348(const volatile A&); eight sink_3_348(const volatile A&&); int test3_348() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_348(a)) == 3> t1; sa<sizeof(sink_3_348(ca)) == 4> t2; sa<sizeof(sink_3_348(va)) == 3> t3; sa<sizeof(sink_3_348(cva)) == 4> t4; sa<sizeof(sink_3_348(source())) == 8> t5; sa<sizeof(sink_3_348(c_source())) == 8> t6; sa<sizeof(sink_3_348(v_source())) == 8> t7; sa<sizeof(sink_3_348(cv_source())) == 8> t8; return 0; } three sink_3_356(volatile A&); five sink_3_356( A&&); six sink_3_356(const A&&); int test3_356() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_356(a)) == 3> t1; sa<sizeof(sink_3_356(ca)) == 6> t2; sa<sizeof(sink_3_356(va)) == 3> t3; sa<sizeof(sink_3_356(source())) == 5> t5; sa<sizeof(sink_3_356(c_source())) == 6> t6; return 0; } three sink_3_357(volatile A&); five sink_3_357( A&&); seven sink_3_357(volatile A&&); int test3_357() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_357(a)) == 3> t1; sa<sizeof(sink_3_357(va)) == 3> t3; sa<sizeof(sink_3_357(source())) == 5> t5; sa<sizeof(sink_3_357(v_source())) == 7> t7; return 0; } three sink_3_358(volatile A&); five sink_3_358( A&&); eight sink_3_358(const volatile A&&); int test3_358() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_358(a)) == 3> t1; sa<sizeof(sink_3_358(ca)) == 8> t2; sa<sizeof(sink_3_358(va)) == 3> t3; sa<sizeof(sink_3_358(cva)) == 8> t4; sa<sizeof(sink_3_358(source())) == 5> t5; sa<sizeof(sink_3_358(c_source())) == 8> t6; sa<sizeof(sink_3_358(v_source())) == 8> t7; sa<sizeof(sink_3_358(cv_source())) == 8> t8; return 0; } three sink_3_367(volatile A&); six sink_3_367(const A&&); seven sink_3_367(volatile A&&); int test3_367() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_367(a)) == 3> t1; sa<sizeof(sink_3_367(ca)) == 6> t2; sa<sizeof(sink_3_367(va)) == 3> t3; sa<sizeof(sink_3_367(c_source())) == 6> t6; sa<sizeof(sink_3_367(v_source())) == 7> t7; return 0; } three sink_3_368(volatile A&); six sink_3_368(const A&&); eight sink_3_368(const volatile A&&); int test3_368() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_368(a)) == 3> t1; sa<sizeof(sink_3_368(ca)) == 6> t2; sa<sizeof(sink_3_368(va)) == 3> t3; sa<sizeof(sink_3_368(cva)) == 8> t4; sa<sizeof(sink_3_368(source())) == 6> t5; sa<sizeof(sink_3_368(c_source())) == 6> t6; sa<sizeof(sink_3_368(v_source())) == 8> t7; sa<sizeof(sink_3_368(cv_source())) == 8> t8; return 0; } three sink_3_378(volatile A&); seven sink_3_378(volatile A&&); eight sink_3_378(const volatile A&&); int test3_378() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_378(a)) == 3> t1; sa<sizeof(sink_3_378(ca)) == 8> t2; sa<sizeof(sink_3_378(va)) == 3> t3; sa<sizeof(sink_3_378(cva)) == 8> t4; sa<sizeof(sink_3_378(source())) == 7> t5; sa<sizeof(sink_3_378(c_source())) == 8> t6; sa<sizeof(sink_3_378(v_source())) == 7> t7; sa<sizeof(sink_3_378(cv_source())) == 8> t8; return 0; } four sink_3_456(const volatile A&); five sink_3_456( A&&); six sink_3_456(const A&&); int test3_456() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_456(a)) == 4> t1; sa<sizeof(sink_3_456(ca)) == 4> t2; sa<sizeof(sink_3_456(va)) == 4> t3; sa<sizeof(sink_3_456(cva)) == 4> t4; sa<sizeof(sink_3_456(source())) == 5> t5; sa<sizeof(sink_3_456(c_source())) == 6> t6; return 0; } four sink_3_457(const volatile A&); five sink_3_457( A&&); seven sink_3_457(volatile A&&); int test3_457() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_457(a)) == 4> t1; sa<sizeof(sink_3_457(ca)) == 4> t2; sa<sizeof(sink_3_457(va)) == 4> t3; sa<sizeof(sink_3_457(cva)) == 4> t4; sa<sizeof(sink_3_457(source())) == 5> t5; sa<sizeof(sink_3_457(v_source())) == 7> t7; return 0; } four sink_3_458(const volatile A&); five sink_3_458( A&&); eight sink_3_458(const volatile A&&); int test3_458() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_458(a)) == 4> t1; sa<sizeof(sink_3_458(ca)) == 4> t2; sa<sizeof(sink_3_458(va)) == 4> t3; sa<sizeof(sink_3_458(cva)) == 4> t4; sa<sizeof(sink_3_458(source())) == 5> t5; sa<sizeof(sink_3_458(c_source())) == 8> t6; sa<sizeof(sink_3_458(v_source())) == 8> t7; sa<sizeof(sink_3_458(cv_source())) == 8> t8; return 0; } four sink_3_467(const volatile A&); six sink_3_467(const A&&); seven sink_3_467(volatile A&&); int test3_467() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_467(a)) == 4> t1; sa<sizeof(sink_3_467(ca)) == 4> t2; sa<sizeof(sink_3_467(va)) == 4> t3; sa<sizeof(sink_3_467(cva)) == 4> t4; sa<sizeof(sink_3_467(c_source())) == 6> t6; sa<sizeof(sink_3_467(v_source())) == 7> t7; return 0; } four sink_3_468(const volatile A&); six sink_3_468(const A&&); eight sink_3_468(const volatile A&&); int test3_468() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_468(a)) == 4> t1; sa<sizeof(sink_3_468(ca)) == 4> t2; sa<sizeof(sink_3_468(va)) == 4> t3; sa<sizeof(sink_3_468(cva)) == 4> t4; sa<sizeof(sink_3_468(source())) == 6> t5; sa<sizeof(sink_3_468(c_source())) == 6> t6; sa<sizeof(sink_3_468(v_source())) == 8> t7; sa<sizeof(sink_3_468(cv_source())) == 8> t8; return 0; } four sink_3_478(const volatile A&); seven sink_3_478(volatile A&&); eight sink_3_478(const volatile A&&); int test3_478() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_478(a)) == 4> t1; sa<sizeof(sink_3_478(ca)) == 4> t2; sa<sizeof(sink_3_478(va)) == 4> t3; sa<sizeof(sink_3_478(cva)) == 4> t4; sa<sizeof(sink_3_478(source())) == 7> t5; sa<sizeof(sink_3_478(c_source())) == 8> t6; sa<sizeof(sink_3_478(v_source())) == 7> t7; sa<sizeof(sink_3_478(cv_source())) == 8> t8; return 0; } five sink_3_567( A&&); six sink_3_567(const A&&); seven sink_3_567(volatile A&&); int test3_567() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_567(a)) == 5> t1; sa<sizeof(sink_3_567(ca)) == 6> t2; sa<sizeof(sink_3_567(va)) == 7> t3; sa<sizeof(sink_3_567(source())) == 5> t5; sa<sizeof(sink_3_567(c_source())) == 6> t6; sa<sizeof(sink_3_567(v_source())) == 7> t7; return 0; } five sink_3_568( A&&); six sink_3_568(const A&&); eight sink_3_568(const volatile A&&); int test3_568() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_568(a)) == 5> t1; sa<sizeof(sink_3_568(ca)) == 6> t2; sa<sizeof(sink_3_568(va)) == 8> t3; sa<sizeof(sink_3_568(cva)) == 8> t4; sa<sizeof(sink_3_568(source())) == 5> t5; sa<sizeof(sink_3_568(c_source())) == 6> t6; sa<sizeof(sink_3_568(v_source())) == 8> t7; sa<sizeof(sink_3_568(cv_source())) == 8> t8; return 0; } five sink_3_578( A&&); seven sink_3_578(volatile A&&); eight sink_3_578(const volatile A&&); int test3_578() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_578(a)) == 5> t1; sa<sizeof(sink_3_578(ca)) == 8> t2; sa<sizeof(sink_3_578(va)) == 7> t3; sa<sizeof(sink_3_578(cva)) == 8> t4; sa<sizeof(sink_3_578(source())) == 5> t5; sa<sizeof(sink_3_578(c_source())) == 8> t6; sa<sizeof(sink_3_578(v_source())) == 7> t7; sa<sizeof(sink_3_578(cv_source())) == 8> t8; return 0; } six sink_3_678(const A&&); seven sink_3_678(volatile A&&); eight sink_3_678(const volatile A&&); int test3_678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sa<sizeof(sink_3_678(ca)) == 6> t2; sa<sizeof(sink_3_678(va)) == 7> t3; sa<sizeof(sink_3_678(cva)) == 8> t4; sa<sizeof(sink_3_678(c_source())) == 6> t6; sa<sizeof(sink_3_678(v_source())) == 7> t7; sa<sizeof(sink_3_678(cv_source())) == 8> t8; return 0; } int main() { return test3_123() + test3_124() + test3_125() + test3_126() + test3_127() + test3_128() + test3_134() + test3_135() + test3_136() + test3_137() + test3_138() + test3_145() + test3_146() + test3_147() + test3_148() + test3_156() + test3_157() + test3_158() + test3_167() + test3_168() + test3_178() + test3_234() + test3_235() + test3_236() + test3_237() + test3_238() + test3_245() + test3_246() + test3_247() + test3_248() + test3_256() + test3_257() + test3_258() + test3_267() + test3_268() + test3_278() + test3_345() + test3_346() + test3_347() + test3_348() + test3_356() + test3_357() + test3_358() + test3_367() + test3_368() + test3_378() + test3_456() + test3_457() + test3_458() + test3_467() + test3_468() + test3_478() + test3_567() + test3_568() + test3_578() + test3_678(); }
google
chromium
deduce
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/deduce.C
720
utf_8
60e95eb04b9d3bc3c37ed4c51d444e78
// { dg-options "--std=c++0x" } template<typename T, typename U> struct same_type; template<typename T> struct same_type<T, T> {}; int lval_int; int rval_int(); int const lval_const_int=0; int const rval_const_int(); template <typename T> void deduce_lval_int(T && t) { same_type<T, int &>(); } template <typename T> void deduce_rval_int(T && t) { same_type<T, int>(); } template <typename T> void deduce_lval_const_int(T && t) { same_type<T, const int &>(); } template <typename T> void deduce_rval_const_int(T && t) { same_type<T, const int>(); } void f() { deduce_lval_int(lval_int); deduce_rval_int(rval_int()); deduce_lval_const_int(lval_const_int); deduce_rval_const_int(rval_const_int()); }
google
chromium
defaulted2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
1,079
utf_8
b7f682e20b358418fc847777d5cfd70d
// Negative test for defaulted/deleted fns. // { dg-options "-std=c++0x" } void f(); // { dg-error "previous" } void f() = delete; // { dg-error "deleted" } struct A { A() { } // { dg-error "previous" } void f() = default; // { dg-error "default" } }; A::A() = default; // { dg-error "redefinition" } void g() {} // { dg-error "previous" } void g() = delete; // { dg-error "redefinition" } struct B { B() = default; }; const B b; // { dg-error "uninitialized const" } struct C { virtual void f() = delete; // { dg-error "overriding deleted" } }; struct D: public C { virtual void f(); // { dg-error "non-deleted function" } }; struct E { const B b; E() { } // { dg-error "uninitialized" } }; struct F { F() = default; F(const F&) = delete; // { dg-error "deleted" } }; struct G { G(); }; // ctor defaulted after class defn is not trivial G::G() = default; union U { G g; // { dg-error "constructor" } }; int main() { F f; F f2(f); // { dg-error "used" } B* b = new const B; // { dg-error "uninitialized const" } }
google
chromium
variadic-ttp
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ttp.C
221
utf_8
0584fcdc603bce015231b5ea40e5ecba
// { dg-options -std=c++0x } // PR c++/34101 template<typename> struct A {}; template<template<typename> class...> struct B {}; template<template<typename> class T> void foo(const B<T>&); void bar() { foo(B<A>()); }
google
chromium
static_assert1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/static_assert1.C
399
utf_8
cc518678d11c27d38238be4776df21d5
// { dg-options "-std=c++0x" } void foo() { static_assert(1, "okay"); static_assert (0 == 1, "zero is never equal to one"); // { dg-error "never equal" } } class X { static_assert(1, "okay"); static_assert (0 == 1, "zero is never equal to one"); // { dg-error "never equal" } }; static_assert(1, "okay"); static_assert (0 == 1, "zero is never equal to one"); // { dg-error "never equal" }
google
chromium
variadic39
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic39.C
303
utf_8
951b21c26ba104b2ab7d8d762bd2bec0
// { dg-options "-std=gnu++0x" } template<typename... Args> struct tuple {}; template<typename T, typename... Args> struct tuple<Args..., T> { }; // { dg-error "end" } template<int... Values> struct int_vec { }; template<int I, int... Values> struct int_vec<Values..., I> { }; // { dg-error "end" }
google
chromium
temp_default4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/temp_default4.C
355
utf_8
73c23f2dae4a3332cdef87694d9b06d5
// { dg-options "-std=c++0x" } class X { template<typename T = int> friend void f(X) { } template<typename T> friend void g(X); // { dg-error "previously declared here" } template<typename T = int> friend void h(X); // { dg-error "function template friend" } }; template<typename T = int> void g(X) // { dg-error "default template argument" } { }
google
chromium
variadic62
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic62.C
127
utf_8
71d58bebb24f823b96a6f96fcdba12d7
// { dg-options "-std=gnu++98 -pedantic-errors" } template<typename... Args> class tuple; // { dg-error "variadic templates" }
google
chromium
warn_cxx0x
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C
146
utf_8
faba28ff035a24c2911b9172d30c3e12
// { dg-options "-std=gnu++98 -Wc++0x-compat" } int static_assert; // { dg-warning "will become a keyword" } void foo() { static_assert = 5; }
google
chromium
variadic87
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic87.C
400
utf_8
3887c900d50685fb2ba16555185c042d
// PR c++/33965 // { dg-options -std=c++0x } template<typename T> struct foo { static bool const value = false; }; template<template<typename...> class T, typename... Args> struct foo<T<Args...> > { static bool const value = true; }; template<int I> struct int_ {}; int main() { static_assert(foo<int_<0> >::value == false, "picked up partial specialization, but should not have"); }
google
chromium
pr38795
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr38795.C
223
utf_8
e21108436dc5ce57312ddc9a096ec2db
// PR c++/38795 // { dg-do compile } // { dg-options "-std=gnu++0x" } template<typename... T> int foo(int i) { return *reinterpret_cast<T*>(i); // { dg-error "not expanded with|T" } } void bar(int i) { foo<int>(i); }
google
chromium
variadic7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic7.C
758
utf_8
5b504e24aee13a1f1be99a4c933d7706
// { dg-options "-std=gnu++0x" } template<typename... Args> struct tuple_base { static const int value = 0; }; template<> struct tuple_base<int> { static const int value = 1; }; template<> struct tuple_base<int, float> { static const int value = 2; }; template<> struct tuple_base<float, int> { static const int value = 3; }; template<typename... Args> struct int_tuple : tuple_base<int, Args...> { }; template<typename... Args> struct tuple_int : tuple_base<Args..., int> { }; int a0a[int_tuple<int>::value == 0? 1 : -1]; int a0b[int_tuple<int>::value == 0? 1 : -1]; int a1a[int_tuple<>::value == 1? 1 : -1]; int a1b[tuple_int<>::value == 1? 1 : -1]; int a2[int_tuple<float>::value == 2? 1 : -1]; int a3[tuple_int<float>::value == 3? 1 : -1];
google
chromium
initlist13
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist13.C
144
utf_8
63773513594757c4c4161676c5af7468
// PR c++/39056 // { dg-do compile } // { dg-options "-std=gnu++0x" } #include <complex> __complex__ int i ({0}); std::complex<int> i2 ({0});
google
chromium
auto4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto4.C
530
utf_8
8754523bb1846890e4b8d81b2740ba1e
// Testcase for deduction of std::initializer_list for auto. // { dg-do run } // { dg-options "-std=c++0x" } #include <typeinfo> #include <initializer_list> extern "C" void abort(); template <class T> void f (T t) { auto ilt = { &t, &t }; if (typeid(ilt) != typeid(std::initializer_list<T*>)) abort(); auto il = { 1, 2, 3 }; if (typeid(il) != typeid(std::initializer_list<int>)) abort(); } int main() { auto il = { 1, 2, 3 }; if (typeid(il) != typeid(std::initializer_list<int>)) abort(); f('c'); }
google
chromium
variadic14
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic14.C
642
utf_8
1e1fa2f2e9cc63d798ef3b07852ef7e5
// { dg-options "-std=gnu++0x" } template<typename R, typename... ArgTypes> struct make_function_type { typedef R type(ArgTypes...); }; 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 a0[is_same<make_function_type<int>::type, int()>::value? 1 : -1]; int a1[is_same<make_function_type<int, float>::type, int(float)>::value? 1 : -1]; int a2[is_same<make_function_type<int, float>::type, int(float)>::value? 1 : -1]; int a3[is_same<make_function_type<int, float, double>::type, int(float, double)>::value? 1 : -1];
google
chromium
variadic6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic6.C
214
utf_8
eaf0e0608619f023add0529c66304933
// { dg-options "-std=gnu++0x" } 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
chromium
enum6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/enum6.C
229
utf_8
5a96d9ee2ceb86e0a460ce4cb00b069b
// PR c++/37946 // { dg-options "-std=c++0x" } enum class E : char { e1, e2 }; inline E operator| (E a1, E a2) { char ret = static_cast<char> (a1) | static_cast<char> (a2); return static_cast<E>(ret); }
google
chromium
variadic34
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic34.C
257
utf_8
a5a7ff3f76db794e3fb5e07d6c505021
// { dg-options "-std=gnu++0x" } template<int I, typename... Args> void get_ith(const Args&... args); void f() { get_ith<1>(1, 2, 3); get_ith<1, int>(1, 2.0, 'x'); get_ith<1, int, double>(1, 2.0, 'x'); get_ith<1, int, double, char>(1, 2.0, 'x'); }
google
chromium
overload
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/overload.C
11,255
utf_8
024dbba780b4ddae1997baffae78e4c7
// { dg-options "--std=c++0x" } // { dg-do link } // Generated by overload.py struct S{}; S l; // lvalue (l) S const cl = l; // const lvalue (cl) S r() { return l; } // rvalue (r) S const cr() { return l; } // const rvalue (cr) S & nl = l; // named lvalue reference (nl) S const & ncl = l; // named const lvalue reference (ncl) S && nr = l; // named rvalue reference (nr) S const && ncr = l; // named const rvalue reference (ncr) S & ul() { return l; } // unnamed lvalue reference (ul) S const & ucl() { return l; } // unnamed const lvalue reference (ucl) S && ur() { return l; } // unnamed rvalue reference (ur) S const && ucr() { return l; } // unnamed const rvalue reference (ucr) void l0001(const S&&) {} void l0010(S&&) {} void l0011(S&&) {} void l0011(const S&&); void l0100(const S&) {} void l0101(const S&) {} void l0101(const S&&); void l0110(const S&) {} void l0110(S&&); void l0111(const S&) {} void l0111(S&&); void l0111(const S&&); void l1000(S&) {} void l1001(S&) {} void l1001(const S&&); void l1010(S&) {} void l1010(S&&); void l1011(S&) {} void l1011(S&&); void l1011(const S&&); void l1100(S&) {} void l1100(const S&); void l1101(S&) {} void l1101(const S&); void l1101(const S&&); void l1110(S&) {} void l1110(const S&); void l1110(S&&); void l1111(S&) {} void l1111(const S&); void l1111(S&&); void l1111(const S&&); void cl0001(const S&&) {} void cl0011(S&&); void cl0011(const S&&) {} void cl0100(const S&) {} void cl0101(const S&) {} void cl0101(const S&&); void cl0110(const S&) {} void cl0110(S&&); void cl0111(const S&) {} void cl0111(S&&); void cl0111(const S&&); void cl1001(S&); void cl1001(const S&&) {} void cl1011(S&); void cl1011(S&&); void cl1011(const S&&) {} void cl1100(S&); void cl1100(const S&) {} void cl1101(S&); void cl1101(const S&) {} void cl1101(const S&&); void cl1110(S&); void cl1110(const S&) {} void cl1110(S&&); void cl1111(S&); void cl1111(const S&) {} void cl1111(S&&); void cl1111(const S&&); void r0001(const S&&) {} void r0010(S&&) {} void r0011(S&&) {} void r0011(const S&&); void r0100(const S&) {} void r0101(const S&); void r0101(const S&&) {} void r0110(const S&); void r0110(S&&) {} void r0111(const S&); void r0111(S&&) {} void r0111(const S&&); void r1001(S&); void r1001(const S&&) {} void r1010(S&); void r1010(S&&) {} void r1011(S&); void r1011(S&&) {} void r1011(const S&&); void r1100(S&); void r1100(const S&) {} void r1101(S&); void r1101(const S&); void r1101(const S&&) {} void r1110(S&); void r1110(const S&); void r1110(S&&) {} void r1111(S&); void r1111(const S&); void r1111(S&&) {} void r1111(const S&&); void cr0001(const S&&) {} void cr0011(S&&); void cr0011(const S&&) {} void cr0100(const S&) {} void cr0101(const S&); void cr0101(const S&&) {} void cr0110(const S&) {} void cr0110(S&&); void cr0111(const S&); void cr0111(S&&); void cr0111(const S&&) {} void cr1001(S&); void cr1001(const S&&) {} void cr1011(S&); void cr1011(S&&); void cr1011(const S&&) {} void cr1100(S&); void cr1100(const S&) {} void cr1101(S&); void cr1101(const S&); void cr1101(const S&&) {} void cr1110(S&); void cr1110(const S&) {} void cr1110(S&&); void cr1111(S&); void cr1111(const S&); void cr1111(S&&); void cr1111(const S&&) {} void nl0001(const S&&) {} void nl0010(S&&) {} void nl0011(S&&) {} void nl0011(const S&&); void nl0100(const S&) {} void nl0101(const S&) {} void nl0101(const S&&); void nl0110(const S&) {} void nl0110(S&&); void nl0111(const S&) {} void nl0111(S&&); void nl0111(const S&&); void nl1000(S&) {} void nl1001(S&) {} void nl1001(const S&&); void nl1010(S&) {} void nl1010(S&&); void nl1011(S&) {} void nl1011(S&&); void nl1011(const S&&); void nl1100(S&) {} void nl1100(const S&); void nl1101(S&) {} void nl1101(const S&); void nl1101(const S&&); void nl1110(S&) {} void nl1110(const S&); void nl1110(S&&); void nl1111(S&) {} void nl1111(const S&); void nl1111(S&&); void nl1111(const S&&); void ncl0001(const S&&) {} void ncl0011(S&&); void ncl0011(const S&&) {} void ncl0100(const S&) {} void ncl0101(const S&) {} void ncl0101(const S&&); void ncl0110(const S&) {} void ncl0110(S&&); void ncl0111(const S&) {} void ncl0111(S&&); void ncl0111(const S&&); void ncl1001(S&); void ncl1001(const S&&) {} void ncl1011(S&); void ncl1011(S&&); void ncl1011(const S&&) {} void ncl1100(S&); void ncl1100(const S&) {} void ncl1101(S&); void ncl1101(const S&) {} void ncl1101(const S&&); void ncl1110(S&); void ncl1110(const S&) {} void ncl1110(S&&); void ncl1111(S&); void ncl1111(const S&) {} void ncl1111(S&&); void ncl1111(const S&&); void nr0001(const S&&) {} void nr0010(S&&) {} void nr0011(S&&) {} void nr0011(const S&&); void nr0100(const S&) {} void nr0101(const S&) {} void nr0101(const S&&); void nr0110(const S&) {} void nr0110(S&&); void nr0111(const S&) {} void nr0111(S&&); void nr0111(const S&&); void nr1000(S&) {} void nr1001(S&) {} void nr1001(const S&&); void nr1010(S&) {} void nr1010(S&&); void nr1011(S&) {} void nr1011(S&&); void nr1011(const S&&); void nr1100(S&) {} void nr1100(const S&); void nr1101(S&) {} void nr1101(const S&); void nr1101(const S&&); void nr1110(S&) {} void nr1110(const S&); void nr1110(S&&); void nr1111(S&) {} void nr1111(const S&); void nr1111(S&&); void nr1111(const S&&); void ncr0001(const S&&) {} void ncr0011(S&&); void ncr0011(const S&&) {} void ncr0100(const S&) {} void ncr0101(const S&) {} void ncr0101(const S&&); void ncr0110(const S&) {} void ncr0110(S&&); void ncr0111(const S&) {} void ncr0111(S&&); void ncr0111(const S&&); void ncr1001(S&); void ncr1001(const S&&) {} void ncr1011(S&); void ncr1011(S&&); void ncr1011(const S&&) {} void ncr1100(S&); void ncr1100(const S&) {} void ncr1101(S&); void ncr1101(const S&) {} void ncr1101(const S&&); void ncr1110(S&); void ncr1110(const S&) {} void ncr1110(S&&); void ncr1111(S&); void ncr1111(const S&) {} void ncr1111(S&&); void ncr1111(const S&&); void ul0001(const S&&) {} void ul0010(S&&) {} void ul0011(S&&) {} void ul0011(const S&&); void ul0100(const S&) {} void ul0101(const S&) {} void ul0101(const S&&); void ul0110(const S&) {} void ul0110(S&&); void ul0111(const S&) {} void ul0111(S&&); void ul0111(const S&&); void ul1000(S&) {} void ul1001(S&) {} void ul1001(const S&&); void ul1010(S&) {} void ul1010(S&&); void ul1011(S&) {} void ul1011(S&&); void ul1011(const S&&); void ul1100(S&) {} void ul1100(const S&); void ul1101(S&) {} void ul1101(const S&); void ul1101(const S&&); void ul1110(S&) {} void ul1110(const S&); void ul1110(S&&); void ul1111(S&) {} void ul1111(const S&); void ul1111(S&&); void ul1111(const S&&); void ucl0001(const S&&) {} void ucl0011(S&&); void ucl0011(const S&&) {} void ucl0100(const S&) {} void ucl0101(const S&) {} void ucl0101(const S&&); void ucl0110(const S&) {} void ucl0110(S&&); void ucl0111(const S&) {} void ucl0111(S&&); void ucl0111(const S&&); void ucl1001(S&); void ucl1001(const S&&) {} void ucl1011(S&); void ucl1011(S&&); void ucl1011(const S&&) {} void ucl1100(S&); void ucl1100(const S&) {} void ucl1101(S&); void ucl1101(const S&) {} void ucl1101(const S&&); void ucl1110(S&); void ucl1110(const S&) {} void ucl1110(S&&); void ucl1111(S&); void ucl1111(const S&) {} void ucl1111(S&&); void ucl1111(const S&&); void ur0001(const S&&) {} void ur0010(S&&) {} void ur0011(S&&) {} void ur0011(const S&&); void ur0100(const S&) {} void ur0101(const S&); void ur0101(const S&&) {} void ur0110(const S&); void ur0110(S&&) {} void ur0111(const S&); void ur0111(S&&) {} void ur0111(const S&&); void ur1001(S&); void ur1001(const S&&) {} void ur1010(S&); void ur1010(S&&) {} void ur1011(S&); void ur1011(S&&) {} void ur1011(const S&&); void ur1100(S&); void ur1100(const S&) {} void ur1101(S&); void ur1101(const S&); void ur1101(const S&&) {} void ur1110(S&); void ur1110(const S&); void ur1110(S&&) {} void ur1111(S&); void ur1111(const S&); void ur1111(S&&) {} void ur1111(const S&&); void ucr0001(const S&&) {} void ucr0011(S&&); void ucr0011(const S&&) {} void ucr0100(const S&) {} void ucr0101(const S&); void ucr0101(const S&&) {} void ucr0110(const S&) {} void ucr0110(S&&); void ucr0111(const S&); void ucr0111(S&&); void ucr0111(const S&&) {} void ucr1001(S&); void ucr1001(const S&&) {} void ucr1011(S&); void ucr1011(S&&); void ucr1011(const S&&) {} void ucr1100(S&); void ucr1100(const S&) {} void ucr1101(S&); void ucr1101(const S&); void ucr1101(const S&&) {} void ucr1110(S&); void ucr1110(const S&) {} void ucr1110(S&&); void ucr1111(S&); void ucr1111(const S&); void ucr1111(S&&); void ucr1111(const S&&) {} int main() { l0001(l); l0010(l); l0011(l); l0100(l); l0101(l); l0110(l); l0111(l); l1000(l); l1001(l); l1010(l); l1011(l); l1100(l); l1101(l); l1110(l); l1111(l); cl0001(cl); cl0011(cl); cl0100(cl); cl0101(cl); cl0110(cl); cl0111(cl); cl1001(cl); cl1011(cl); cl1100(cl); cl1101(cl); cl1110(cl); cl1111(cl); r0001(r()); r0010(r()); r0011(r()); r0100(r()); r0101(r()); r0110(r()); r0111(r()); r1001(r()); r1010(r()); r1011(r()); r1100(r()); r1101(r()); r1110(r()); r1111(r()); cr0001(cr()); cr0011(cr()); cr0100(cr()); cr0101(cr()); cr0110(cr()); cr0111(cr()); cr1001(cr()); cr1011(cr()); cr1100(cr()); cr1101(cr()); cr1110(cr()); cr1111(cr()); nl0001(nl); nl0010(nl); nl0011(nl); nl0100(nl); nl0101(nl); nl0110(nl); nl0111(nl); nl1000(nl); nl1001(nl); nl1010(nl); nl1011(nl); nl1100(nl); nl1101(nl); nl1110(nl); nl1111(nl); ncl0001(ncl); ncl0011(ncl); ncl0100(ncl); ncl0101(ncl); ncl0110(ncl); ncl0111(ncl); ncl1001(ncl); ncl1011(ncl); ncl1100(ncl); ncl1101(ncl); ncl1110(ncl); ncl1111(ncl); nr0001(nr); nr0010(nr); nr0011(nr); nr0100(nr); nr0101(nr); nr0110(nr); nr0111(nr); nr1000(nr); nr1001(nr); nr1010(nr); nr1011(nr); nr1100(nr); nr1101(nr); nr1110(nr); nr1111(nr); ncr0001(ncr); ncr0011(ncr); ncr0100(ncr); ncr0101(ncr); ncr0110(ncr); ncr0111(ncr); ncr1001(ncr); ncr1011(ncr); ncr1100(ncr); ncr1101(ncr); ncr1110(ncr); ncr1111(ncr); ul0001(ul()); ul0010(ul()); ul0011(ul()); ul0100(ul()); ul0101(ul()); ul0110(ul()); ul0111(ul()); ul1000(ul()); ul1001(ul()); ul1010(ul()); ul1011(ul()); ul1100(ul()); ul1101(ul()); ul1110(ul()); ul1111(ul()); ucl0001(ucl()); ucl0011(ucl()); ucl0100(ucl()); ucl0101(ucl()); ucl0110(ucl()); ucl0111(ucl()); ucl1001(ucl()); ucl1011(ucl()); ucl1100(ucl()); ucl1101(ucl()); ucl1110(ucl()); ucl1111(ucl()); ur0001(ur()); ur0010(ur()); ur0011(ur()); ur0100(ur()); ur0101(ur()); ur0110(ur()); ur0111(ur()); ur1001(ur()); ur1010(ur()); ur1011(ur()); ur1100(ur()); ur1101(ur()); ur1110(ur()); ur1111(ur()); ucr0001(ucr()); ucr0011(ucr()); ucr0100(ucr()); ucr0101(ucr()); ucr0110(ucr()); ucr0111(ucr()); ucr1001(ucr()); ucr1011(ucr()); ucr1100(ucr()); ucr1101(ucr()); ucr1110(ucr()); ucr1111(ucr()); return 0; }
google
chromium
pr31993
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31993.C
162
utf_8
768b8078f11c2cd0df3f94ec3bf1b895
// { dg-options "-std=c++0x" } template<typename...> struct A; template<template<int> class... T> struct A<T<0>...> { template<int> struct B {}; B<0> b; };
google
chromium
variadic83
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic83.C
239
utf_8
c97406e379935ecd6f83c7d4d33ae631
// PR c++/31441 // { dg-options "-std=gnu++0x" } template<typename> struct A; template<typename... T> struct A<T...> { }; // { dg-bogus "cannot expand" "" { xfail *-*-* } } A<int> a; // { dg-bogus "incomplete type" "" { xfail *-*-* } }
google
chromium
initlist15
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist15.C
291
utf_8
3864f9848076d8d646afb07c367c806b
// { dg-options "-std=c++0x" } #include <vector> #include <typeinfo> using namespace std; template< typename ... ArgTypes > void test( ArgTypes ... args ) { vector<type_info*> x = { &typeid(ArgTypes)... }; // { dg-error "" } } int main() { test( 1, 3.14f, 2.78 ); return 0; }
google
chromium
variadic19
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic19.C
613
utf_8
889187171d4926a249fbd74039393097
// { dg-options "-std=gnu++0x" } template<typename... Args> struct tuple { static const int value = 0; }; template<typename T, template<class T> class... Metafunctions> struct tuple<Metafunctions<T>...> { static const int value = 1; }; template<typename T> struct add_pointer; template<typename T> struct add_reference; int a0[tuple<int, float>::value == 0? 1 : -1]; int a1[tuple<add_pointer<int>, add_pointer<float> >::value == 0? 1 : -1]; int a2[tuple<>::value == 0? 1 : -1]; int a3[tuple<add_pointer<int> >::value == 1? 1 : -1]; int a4[tuple<add_pointer<int>, add_reference<int> >::value == 1? 1 : -1];
google
chromium
variadic-lambda
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-lambda.C
1,830
utf_8
d27ab0ca2e970e8b526763be97fd98e7
// { dg-options "-std=c++0x" } struct int_placeholder; template<typename T> struct do_replace { typedef T type; }; template<> struct do_replace<int_placeholder> { typedef int type; }; template<typename T> struct lambdalike { typedef T type; }; template<template<typename...> class TT, typename... Args> struct lambdalike<TT<Args...> > { typedef TT<typename do_replace<Args>::type...> type; }; 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... Elements> struct tuple; template<typename T1, typename T2> struct pair; static_assert(is_same<lambdalike<tuple<float, int_placeholder, double>>::type, tuple<float, int, double>>::value, "MPL lambda-like replacement on tuple"); static_assert(is_same<lambdalike<pair<float, int_placeholder>>::type, pair<float, int>>::value, "MPL lambda-like replacement on pair"); struct _1 {}; template<typename Arg0, typename Lambda> struct eval { typedef Lambda type; }; template<typename Arg0> struct eval<Arg0, _1> { typedef Arg0 type; }; template<typename Arg0, template<typename...> class T, typename... Pack> struct eval<Arg0, T<Pack...> > { typedef T< typename eval<Arg0, Pack>::type... > type; }; static_assert(is_same<eval<int, tuple<float, _1, double>>::type, tuple<float, int, double>>::value, "eval tuple"); static_assert(is_same<eval<int, pair<_1, double>>::type, pair<int, double>>::value, "eval pair"); static_assert(is_same<eval<int, tuple<pair<_1, _1>, pair<float, float>, pair<double, _1>>>::type, tuple<pair<int, int>, pair<float, float>, pair<double, int>>>::value, "recursive eval");
google
chromium
reference_collapsing
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/reference_collapsing.C
7,329
utf_8
2dd310aa31b211b87c38209f2ae84388
// I, Howard Hinnant, hereby place this code in the public domain. // Test the reference collapsing rules. Note that there are recent differences // for how cv-qualifications are applied to reference types. 7.1.3, 14.3.1 // { dg-do compile } // { dg-options "-std=c++0x" } template <bool> struct sa; template <> struct sa<true> {}; template <class T, T v> struct integral_constant { static const T value = v; typedef T value_type; typedef integral_constant<T, v> type; }; typedef integral_constant<bool, true> true_type; typedef integral_constant<bool, false> false_type; template <class T> struct is_lvalue_reference : public integral_constant<bool, false> {}; template <class T> struct is_lvalue_reference<T&> : public integral_constant<bool, true> {}; template <class T> struct is_rvalue_reference : public integral_constant<bool, false> {}; template <class T> struct is_rvalue_reference<T&&> : public integral_constant<bool, true> {}; template <class T> struct remove_reference {typedef T type;}; template <class T> struct remove_reference<T&> {typedef T type;}; template <class T> struct remove_reference<T&&> {typedef T type;}; template <class T> struct is_const : public integral_constant<bool, false> {}; template <class T> struct is_const<T const> : public integral_constant<bool, true> {}; template <class T> struct is_volatile : public integral_constant<bool, false> {}; template <class T> struct is_volatile<T volatile> : public integral_constant<bool, true> {}; struct A {}; typedef A& Alref; typedef const A& cAlref; typedef volatile A& vAlref; typedef const volatile A& cvAlref; typedef A&& Arref; typedef const A&& cArref; typedef volatile A&& vArref; typedef const volatile A&& cvArref; template <class T, bool is_lvalue_ref, bool is_rvalue_ref, bool s_const, bool s_volatile> void test() { sa<is_lvalue_reference<T>::value == is_lvalue_ref> t1; sa<is_rvalue_reference<T>::value == is_rvalue_ref> t2; sa<is_const <typename remove_reference<T>::type>::value == s_const> t3; sa<is_volatile<typename remove_reference<T>::type>::value == s_volatile> t4; sa<is_const <typename remove_reference<const T>::type>::value == s_const > t5; sa<is_volatile<typename remove_reference< volatile T>::type>::value == s_volatile> t6; } int main() { // sanity check test< A&, true, false, false, false>(); test<const A&, true, false, true, false>(); test< volatile A&, true, false, false, true>(); test<const volatile A&, true, false, true, true>(); test< A&&, false, true, false, false>(); test<const A&&, false, true, true, false>(); test< volatile A&&, false, true, false, true>(); test<const volatile A&&, false, true, true, true>(); // lvalue reference test // Alref test< Alref&, true, false, false, false>(); test<const Alref&, true, false, false, false>(); test< volatile Alref&, true, false, false, false>(); test<const volatile Alref&, true, false, false, false>(); // cAlref test< cAlref&, true, false, true, false>(); test<const cAlref&, true, false, true, false>(); test< volatile cAlref&, true, false, true, false>(); test<const volatile cAlref&, true, false, true, false>(); // vAlref test< vAlref&, true, false, false, true>(); test<const vAlref&, true, false, false, true>(); test< volatile vAlref&, true, false, false, true>(); test<const volatile vAlref&, true, false, false, true>(); // cvAlref test< cvAlref&, true, false, true, true>(); test<const cvAlref&, true, false, true, true>(); test< volatile cvAlref&, true, false, true, true>(); test<const volatile cvAlref&, true, false, true, true>(); // Arref test< Arref&, true, false, false, false>(); test<const Arref&, true, false, false, false>(); test< volatile Arref&, true, false, false, false>(); test<const volatile Arref&, true, false, false, false>(); // cArref test< cArref&, true, false, true, false>(); test<const cArref&, true, false, true, false>(); test< volatile cArref&, true, false, true, false>(); test<const volatile cArref&, true, false, true, false>(); // vArref test< vArref&, true, false, false, true>(); test<const vArref&, true, false, false, true>(); test< volatile vArref&, true, false, false, true>(); test<const volatile vArref&, true, false, false, true>(); // vArref test< cvArref&, true, false, true, true>(); test<const cvArref&, true, false, true, true>(); test< volatile cvArref&, true, false, true, true>(); test<const volatile cvArref&, true, false, true, true>(); // rvalue reference test // Alref test< Alref&&, true, false, false, false>(); test<const Alref&&, true, false, false, false>(); test< volatile Alref&&, true, false, false, false>(); test<const volatile Alref&&, true, false, false, false>(); // cAlref test< cAlref&&, true, false, true, false>(); test<const cAlref&&, true, false, true, false>(); test< volatile cAlref&&, true, false, true, false>(); test<const volatile cAlref&&, true, false, true, false>(); // vAlref test< vAlref&&, true, false, false, true>(); test<const vAlref&&, true, false, false, true>(); test< volatile vAlref&&, true, false, false, true>(); test<const volatile vAlref&&, true, false, false, true>(); // cvAlref test< cvAlref&&, true, false, true, true>(); test<const cvAlref&&, true, false, true, true>(); test< volatile cvAlref&&, true, false, true, true>(); test<const volatile cvAlref&&, true, false, true, true>(); // Arref test< Arref&&, false, true, false, false>(); test<const Arref&&, false, true, false, false>(); test< volatile Arref&&, false, true, false, false>(); test<const volatile Arref&&, false, true, false, false>(); // cArref test< cArref&&, false, true, true, false>(); test<const cArref&&, false, true, true, false>(); test< volatile cArref&&, false, true, true, false>(); test<const volatile cArref&&, false, true, true, false>(); // vArref test< vArref&&, false, true, false, true>(); test<const vArref&&, false, true, false, true>(); test< volatile vArref&&, false, true, false, true>(); test<const volatile vArref&&, false, true, false, true>(); // cvArref test< cvArref&&, false, true, true, true>(); test<const cvArref&&, false, true, true, true>(); test< volatile cvArref&&, false, true, true, true>(); test<const volatile cvArref&&, false, true, true, true>(); return 0; }
google
chromium
variadic-ex5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex5.C
182
utf_8
815176396f7bae2155254aba877dc22c
// { dg-options "-std=gnu++0x" } template<typename... Types> void f(Types... values); void g() { f<int*, float*>(0, 0, 0); // Types is deduced to the sequence int*, float*, int }
google
chromium
initlist22
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist22.C
796
utf_8
4bdc8b28203fe557b8c5257e826d9e95
// Core issue 934 // { dg-options "-std=c++0x" } int i; int& r1{ i }; // OK, direct binding int&& r2{ i }; // OK, direct binding int& r3{ }; // { dg-error "" } reference to temporary int&& r4{ }; // OK, reference to temporary struct A { int i; } a; A& r5 { i }; // { dg-error "" } reference to temporary A&& r6 { i }; // OK, aggregate initialization of temporary A& r7 { a }; // { dg-error "" } invalid aggregate initializer for A A&& r8 { a }; // { dg-error "" } invalid aggregate initializer for A struct B { B(int); int i; } b(0); B& r9 { i }; // { dg-error "" } reference to temporary B&& r10 { i }; // OK, make temporary with B(int) constructor B& r11 { b }; // { dg-error "" } reference to temporary B&& r12 { b }; // OK, make temporary with copy constructor
google
chromium
variadic41
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic41.C
121
utf_8
f644441efd07d9c78d08c0c4d120b7f7
// { dg-options "-std=gnu++0x" } template<typename... Args> void f(const Args&... args, int oops); // { dg-error "end" }
google
chromium
auto5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto5.C
259
utf_8
fd8b8fe7fe5a5692d13a285ecdb8f37d
// Testcase for non-dependent auto in templates // { dg-options "-std=c++0x" } struct A { template<class> void f(); } a; template <class T> void g() { auto aa = a; aa.f<int>(); auto p = new auto (a); p->f<int>(); } int main() { g<double>(); }
google
chromium
variadic-tuple
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C
7,393
utf_8
f931cf5d1654ae4d7fb0f5c475bb7f6b
// { dg-options "-std=gnu++0x" } // { dg-do "run" } // An implementation of TR1's <tuple> using variadic teplates #include <string> #include <cassert> #include <cstring> // Trivial reference_wrapper template<typename T> struct reference_wrapper { reference_wrapper(T& x) : ptr(&x) { } operator T&() const { return *ptr; } T* ptr; }; template<typename T> reference_wrapper<T> ref(T& x) { return x; } template<typename T> reference_wrapper<const T> cref(const T& x) { return x; } // Simple type-traits we'll need template<typename T> struct add_reference { typedef T& type; }; template<typename T> struct add_reference<T&> { typedef T& type; }; 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; }; // For creating the constructor parameters of tuple<> template<typename T> struct add_const_reference { typedef const T& type; }; template<typename T> struct add_const_reference<T&> { typedef T& type; }; // 6.1.3 Class template tuple template<typename... Values> class tuple; template<> class tuple<> { }; template<typename Head, typename... Tail> class tuple<Head, Tail...> : private tuple<Tail...> { typedef tuple<Tail...> inherited; public: tuple() { } // implicit copy-constructor is okay tuple(typename add_const_reference<Head>::type v, typename add_const_reference<Tail>::type... vtail) : m_head(v), inherited(vtail...) { } template<typename... VValues> tuple(const tuple<VValues...>& other) : m_head(other.head()), inherited(other.tail()) { } template<typename... VValues> tuple& operator=(const tuple<VValues...>& other) { m_head = other.head(); tail() = other.tail(); return *this; } typename add_reference<Head>::type head() { return m_head; } typename add_reference<const Head>::type head() const { return m_head; } inherited& tail() { return *this; } const inherited& tail() const { return *this; } protected: Head m_head; }; template<typename T> struct make_tuple_result { typedef T type; }; template<typename T> struct make_tuple_result<reference_wrapper<T> > { typedef T& type; }; // 6.1.3.2 Tuple creation functions struct ignore_t { template<typename T> ignore_t& operator=(const T&) { return *this; } } ignore; template<typename... Values> tuple<typename make_tuple_result<Values>::type...> make_tuple(const Values&... values) { return tuple<typename make_tuple_result<Values>::type...>(values...); } template<typename... Values> tuple<Values&...> tie(Values&... values) { return tuple<Values&...>(values...); } // 6.1.3.3 Tuple helper classes template<typename Tuple> struct tuple_size; template<> struct tuple_size<tuple<> > { static const std::size_t value = 0; }; template<typename Head, typename... Tail> struct tuple_size<tuple<Head, Tail...> > { static const std::size_t value = 1 + tuple_size<tuple<Tail...> >::value; }; template<int I, typename Tuple> struct tuple_element; template<int I, typename Head, typename... Tail> struct tuple_element<I, tuple<Head, Tail...> > { typedef typename tuple_element<I-1, tuple<Tail...> >::type type; }; template<typename Head, typename... Tail> struct tuple_element<0, tuple<Head, Tail...> > { typedef Head type; }; // 6.1.3.4 Element access template<int I, typename Tuple> class get_impl; template<int I, typename Head, typename... Values> class get_impl<I, tuple<Head, Values...> > { typedef typename tuple_element<I-1, tuple<Values...> >::type Element; typedef typename add_reference<Element>::type RJ; typedef typename add_const_reference<Element>::type PJ; typedef get_impl<I-1, tuple<Values...> > Next; public: static RJ get(tuple<Head, Values...>& t) { return Next::get(t.tail()); } static PJ get(const tuple<Head, Values...>& t) { return Next::get(t.tail()); } }; template<typename Head, typename... Values> class get_impl<0, tuple<Head, Values...> > { typedef typename add_reference<Head>::type RJ; typedef typename add_const_reference<Head>::type PJ; public: static RJ get(tuple<Head, Values...>& t) { return t.head(); } static PJ get(const tuple<Head, Values...>& t) { return t.head(); } }; template<int I, typename... Values> typename add_reference< typename tuple_element<I, tuple<Values...> >::type >::type get(tuple<Values...>& t) { return get_impl<I, tuple<Values...> >::get(t); } template<int I, typename... Values> typename add_const_reference< typename tuple_element<I, tuple<Values...> >::type >::type get(const tuple<Values...>& t) { return get_impl<I, tuple<Values...> >::get(t); } // 6.1.3.5 Relational operators inline bool operator==(const tuple<>&, const tuple<>&) { return true; } template<typename T, typename... TTail, typename U, typename... UTail> bool operator==(const tuple<T, TTail...>& t, const tuple<U, UTail...>& u) { return t.head() == u.head() && t.tail() == u.tail(); } template<typename... TValues, typename... UValues> bool operator!=(const tuple<TValues...>& t, const tuple<UValues...>& u) { return !(t == u); } inline bool operator<(const tuple<>&, const tuple<>&) { return false; } template<typename T, typename... TTail, typename U, typename... UTail> bool operator<(const tuple<T, TTail...>& t, const tuple<U, UTail...>& u) { return (t.head() < u.head() || (!(t.head() < u.head()) && t.tail() < u.tail())); } template<typename... TValues, typename... UValues> bool operator>(const tuple<TValues...>& t, const tuple<UValues...>& u) { return u < t; } template<typename... TValues, typename... UValues> bool operator<=(const tuple<TValues...>& t, const tuple<UValues...>& u) { return !(u < t); } template<typename... TValues, typename... UValues> bool operator>=(const tuple<TValues...>& t, const tuple<UValues...>& u) { return !(t < u); } int a0[tuple_size<tuple<> >::value == 0? 1 : -1]; int a1[tuple_size<tuple<int, float, double> >::value == 3? 1 : -1]; int a2a[is_same<tuple_element<0, tuple<int, float, double> >::type, int> ::value? 1 : -1]; int a2b[is_same<tuple_element<1, tuple<int, float, double> >::type, float> ::value? 1 : -1]; int a2c[is_same<tuple_element<2, tuple<int, float, double> >::type, double> ::value? 1 : -1]; int main() { tuple<> t0; tuple<int> t1(1); tuple<int, float> t2(1, 3.14159f); tuple<int, float, const char*> t3a(1, 3.14159f, "Hello, world!"); tuple<long, double, std::string> t3b(t3a); t3b = t3a; // t3a = t3b; DPG: triggers an error, as it should. tuple<int, float, std::string> t3c = make_tuple(17, 2.718281828, std::string("Fun")); int seventeen = 17; double pi = 3.14159; tuple<int&, double&> seventeen_pi = make_tuple(ref(seventeen), ref(pi)); tuple<int&, const double&> seventeen_pi2 = make_tuple(ref(seventeen), cref(pi)); tuple<int&, double&> seventeen_pi_tied = tie(seventeen, pi); assert(get<0>(t3a) == 1); assert(get<1>(t3a) == 3.14159f); assert(std::strcmp(get<2>(t3a), "Hello, world!") == 0); assert(t3a == t3b); assert(!(t3a != t3b)); assert(!(t3a < t3b)); assert(!(t3a > t3b)); assert(t3a <= t3b && t3b <= t3a); assert(t3a >= t3b && t3b >= t3a); }
google
chromium
rv3n
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv3n.C
19,626
utf_8
25844518c6a118cce05cbe065baca9e4
// 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 four {char x[4];}; struct five {char x[5];}; struct six {char x[6];}; struct seven {char x[7];}; struct eight {char x[8];}; struct A { A(); A(const volatile A&&); }; A source(); const A c_source(); volatile A v_source(); const volatile A cv_source(); // 3 at a time one sink_3_123( A&); // { dg-message "candidates" } two sink_3_123(const A&); // { dg-message "note" } three sink_3_123(volatile A&); // { dg-message "note" } int test3_123() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_123(cva); // { dg-error "no match" } sink_3_123(v_source()); // { dg-error "no match" } sink_3_123(cv_source()); // { dg-error "no match" } return 0; } one sink_3_125( A&); // { dg-message "candidates" } two sink_3_125(const A&); // { dg-message "note" } five sink_3_125( A&&); // { dg-message "note" } one sink_3_124( A&); // { dg-message "candidates" } two sink_3_124(const A&); // { dg-message "note" } four sink_3_124(const volatile A&); // { dg-message "note" } int test3_124() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_124(v_source()); // { dg-error "no match" } sink_3_124(cv_source()); // { dg-error "no match" } return 0; } int test3_125() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_125(va); // { dg-error "no match" } sink_3_125(cva); // { dg-error "no match" } sink_3_125(v_source()); // { dg-error "no match" } sink_3_125(cv_source()); // { dg-error "no match" } return 0; } one sink_3_126( A&); // { dg-message "candidates" } two sink_3_126(const A&); // { dg-message "note" } six sink_3_126(const A&&); // { dg-message "note" } int test3_126() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_126(va); // { dg-error "no match" } sink_3_126(cva); // { dg-error "no match" } sink_3_126(v_source()); // { dg-error "no match" } sink_3_126(cv_source()); // { dg-error "no match" } return 0; } one sink_3_127( A&); // { dg-message "candidates" } two sink_3_127(const A&); // { dg-message "note" } seven sink_3_127(volatile A&&); // { dg-message "note" } int test3_127() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_127(cva); // { dg-error "no match" } sink_3_127(cv_source()); // { dg-error "no match" } return 0; } one sink_3_134( A&); // { dg-message "candidates" } three sink_3_134(volatile A&); // { dg-message "note" } four sink_3_134(const volatile A&); // { dg-message "note" } int test3_134() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_134(source()); // { dg-error "no match" } sink_3_134(c_source()); // { dg-error "no match" } sink_3_134(v_source()); // { dg-error "no match" } sink_3_134(cv_source()); // { dg-error "no match" } return 0; } one sink_3_135( A&); // { dg-message "candidates" } three sink_3_135(volatile A&); // { dg-message "note" } five sink_3_135( A&&); // { dg-message "note" } int test3_135() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_135(ca); // { dg-error "no match" } sink_3_135(cva); // { dg-error "no match" } sink_3_135(c_source()); // { dg-error "no match" } sink_3_135(v_source()); // { dg-error "no match" } sink_3_135(cv_source()); // { dg-error "no match" } return 0; } one sink_3_136( A&); // { dg-message "candidates" } three sink_3_136(volatile A&); // { dg-message "note" } six sink_3_136(const A&&); // { dg-message "note" } int test3_136() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_136(cva); // { dg-error "no match" } sink_3_136(v_source()); // { dg-error "no match" } sink_3_136(cv_source()); // { dg-error "no match" } return 0; } one sink_3_137( A&); // { dg-message "candidates" } three sink_3_137(volatile A&); // { dg-message "note" } seven sink_3_137(volatile A&&); // { dg-message "note" } int test3_137() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_137(ca); // { dg-error "no match" } sink_3_137(cva); // { dg-error "no match" } sink_3_137(c_source()); // { dg-error "no match" } sink_3_137(cv_source()); // { dg-error "no match" } return 0; } one sink_3_145( A&); // { dg-message "candidates" } four sink_3_145(const volatile A&); // { dg-message "note" } five sink_3_145( A&&); // { dg-message "note" } int test3_145() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_145(c_source()); // { dg-error "no match" } sink_3_145(v_source()); // { dg-error "no match" } sink_3_145(cv_source()); // { dg-error "no match" } return 0; } one sink_3_146( A&); // { dg-message "candidates" } four sink_3_146(const volatile A&); // { dg-message "note" } six sink_3_146(const A&&); // { dg-message "note" } int test3_146() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_146(v_source()); // { dg-error "no match" } sink_3_146(cv_source()); // { dg-error "no match" } return 0; } one sink_3_147( A&); // { dg-message "candidates" } four sink_3_147(const volatile A&); // { dg-message "note" } seven sink_3_147(volatile A&&); // { dg-message "note" } int test3_147() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_147(c_source()); // { dg-error "no match" } sink_3_147(cv_source()); // { dg-error "no match" } return 0; } one sink_3_156( A&); // { dg-message "candidates" } five sink_3_156( A&&); // { dg-message "note" } six sink_3_156(const A&&); // { dg-message "note" } int test3_156() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_156(va); // { dg-error "no match" } sink_3_156(cva); // { dg-error "no match" } sink_3_156(v_source()); // { dg-error "no match" } sink_3_156(cv_source()); // { dg-error "no match" } return 0; } one sink_3_157( A&); // { dg-message "candidates" } five sink_3_157( A&&); // { dg-message "note" } seven sink_3_157(volatile A&&); // { dg-message "note" } int test3_157() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_157(ca); // { dg-error "no match" } sink_3_157(cva); // { dg-error "no match" } sink_3_157(c_source()); // { dg-error "no match" } sink_3_157(cv_source()); // { dg-error "no match" } return 0; } one sink_3_167( A&); // { dg-message "candidates" } six sink_3_167(const A&&); // { dg-message "note" } seven sink_3_167(volatile A&&); // { dg-message "note" } int test3_167() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_167(cva); // { dg-error "no match" } sink_3_167(source()); // { dg-error "ambiguous" } sink_3_167(cv_source()); // { dg-error "no match" } return 0; } two sink_3_234(const A&); // { dg-message "candidates" } three sink_3_234(volatile A&); // { dg-message "note" } four sink_3_234(const volatile A&); // { dg-message "note" } int test3_234() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_234(a); // { dg-error "ambiguous" } sink_3_234(v_source()); // { dg-error "no match" } sink_3_234(cv_source()); // { dg-error "no match" } return 0; } two sink_3_235(const A&); // { dg-message "candidates" } three sink_3_235(volatile A&); // { dg-message "note" } five sink_3_235( A&&); // { dg-message "note" } int test3_235() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_235(a); // { dg-error "ambiguous" } sink_3_235(cva); // { dg-error "no match" } sink_3_235(v_source()); // { dg-error "no match" } sink_3_235(cv_source()); // { dg-error "no match" } return 0; } two sink_3_236(const A&); // { dg-message "candidates" } three sink_3_236(volatile A&); // { dg-message "note" } six sink_3_236(const A&&); // { dg-message "note" } int test3_236() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_236(a); // { dg-error "ambiguous" } sink_3_236(cva); // { dg-error "no match" } sink_3_236(v_source()); // { dg-error "no match" } sink_3_236(cv_source()); // { dg-error "no match" } return 0; } two sink_3_237(const A&); // { dg-message "candidates" } three sink_3_237(volatile A&); // { dg-message "note" } seven sink_3_237(volatile A&&); // { dg-message "note" } int test3_237() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_237(a); // { dg-error "ambiguous" } sink_3_237(cva); // { dg-error "no match" } sink_3_237(cv_source()); // { dg-error "no match" } return 0; } two sink_3_238(const A&); // { dg-message "candidates" } three sink_3_238(volatile A&); // { dg-message "note" } eight sink_3_238(const volatile A&&); // { dg-message "note" } int test3_238() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_238(a); // { dg-error "ambiguous" } return 0; } two sink_3_245(const A&); // { dg-message "candidates" } four sink_3_245(const volatile A&); // { dg-message "note" } five sink_3_245( A&&); // { dg-message "note" } int test3_245() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_245(v_source()); // { dg-error "no match" } sink_3_245(cv_source()); // { dg-error "no match" } return 0; } two sink_3_246(const A&); // { dg-message "candidates" } four sink_3_246(const volatile A&); // { dg-message "note" } six sink_3_246(const A&&); // { dg-message "note" } int test3_246() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_246(v_source()); // { dg-error "no match" } sink_3_246(cv_source()); // { dg-error "no match" } return 0; } two sink_3_247(const A&); // { dg-message "candidates" } four sink_3_247(const volatile A&); // { dg-message "note" } seven sink_3_247(volatile A&&); // { dg-message "note" } int test3_247() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_247(cv_source()); // { dg-error "no match" } return 0; } two sink_3_256(const A&); // { dg-message "candidates" } five sink_3_256( A&&); // { dg-message "note" } six sink_3_256(const A&&); // { dg-message "note" } int test3_256() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_256(va); // { dg-error "no match" } sink_3_256(cva); // { dg-error "no match" } sink_3_256(v_source()); // { dg-error "no match" } sink_3_256(cv_source()); // { dg-error "no match" } return 0; } two sink_3_257(const A&); // { dg-message "candidates" } five sink_3_257( A&&); // { dg-message "note" } seven sink_3_257(volatile A&&); // { dg-message "note" } int test3_257() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_257(cva); // { dg-error "no match" } sink_3_257(cv_source()); // { dg-error "no match" } return 0; } two sink_3_267(const A&); // { dg-message "candidates" } six sink_3_267(const A&&); // { dg-message "note" } seven sink_3_267(volatile A&&); // { dg-message "note" } int test3_267() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_267(cva); // { dg-error "no match" } sink_3_267(source()); // { dg-error "ambiguous" } sink_3_267(cv_source()); // { dg-error "no match" } return 0; } three sink_3_345(volatile A&); // { dg-message "candidates" } four sink_3_345(const volatile A&); // { dg-message "note" } five sink_3_345( A&&); // { dg-message "note" } int test3_345() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_345(c_source()); // { dg-error "no match" } sink_3_345(v_source()); // { dg-error "no match" } sink_3_345(cv_source()); // { dg-error "no match" } return 0; } three sink_3_346(volatile A&); // { dg-message "candidates" } four sink_3_346(const volatile A&); // { dg-message "note" } six sink_3_346(const A&&); // { dg-message "note" } int test3_346() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_346(v_source()); // { dg-error "no match" } sink_3_346(cv_source()); // { dg-error "no match" } return 0; } three sink_3_347(volatile A&); // { dg-message "candidates" } four sink_3_347(const volatile A&); // { dg-message "note" } seven sink_3_347(volatile A&&); // { dg-message "note" } int test3_347() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_347(c_source()); // { dg-error "no match" } sink_3_347(cv_source()); // { dg-error "no match" } return 0; } three sink_3_356(volatile A&); // { dg-message "candidates" } five sink_3_356( A&&); // { dg-message "note" } six sink_3_356(const A&&); // { dg-message "note" } int test3_356() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_356(cva); // { dg-error "no match" } sink_3_356(v_source()); // { dg-error "no match" } sink_3_356(cv_source()); // { dg-error "no match" } return 0; } three sink_3_357(volatile A&); // { dg-message "candidates" } five sink_3_357( A&&); // { dg-message "note" } seven sink_3_357(volatile A&&); // { dg-message "note" } int test3_357() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_357(ca); // { dg-error "no match" } sink_3_357(cva); // { dg-error "no match" } sink_3_357(c_source()); // { dg-error "no match" } sink_3_357(cv_source()); // { dg-error "no match" } return 0; } three sink_3_367(volatile A&); // { dg-message "candidates" } six sink_3_367(const A&&); // { dg-message "note" } seven sink_3_367(volatile A&&); // { dg-message "note" } int test3_367() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_367(cva); // { dg-error "no match" } sink_3_367(source()); // { dg-error "ambiguous" } sink_3_367(cv_source()); // { dg-error "no match" } return 0; } four sink_3_456(const volatile A&); // { dg-message "candidates" } five sink_3_456( A&&); // { dg-message "note" } six sink_3_456(const A&&); // { dg-message "note" } int test3_456() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_456(v_source()); // { dg-error "no match" } sink_3_456(cv_source()); // { dg-error "no match" } return 0; } four sink_3_457(const volatile A&); // { dg-message "candidates" } five sink_3_457( A&&); // { dg-message "note" } seven sink_3_457(volatile A&&); // { dg-message "note" } int test3_457() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_457(c_source()); // { dg-error "no match" } sink_3_457(cv_source()); // { dg-error "no match" } return 0; } four sink_3_467(const volatile A&); // { dg-message "candidates" } six sink_3_467(const A&&); // { dg-message "note" } seven sink_3_467(volatile A&&); // { dg-message "note" } int test3_467() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_467(source()); // { dg-error "ambiguous" } sink_3_467(cv_source()); // { dg-error "no match" } return 0; } five sink_3_567( A&&); // { dg-message "candidates" } six sink_3_567(const A&&); // { dg-message "note" } seven sink_3_567(volatile A&&); // { dg-message "note" } int test3_567() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_567(cva); // { dg-error "no match" } sink_3_567(cv_source()); // { dg-error "no match" } return 0; } six sink_3_678(const A&&); // { dg-message "candidates" } seven sink_3_678(volatile A&&); // { dg-message "note" } eight sink_3_678(const volatile A&&); // { dg-message "note" } int test3_678() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_3_678(a); // { dg-error "ambiguous" } sink_3_678(source()); // { dg-error "ambiguous" } return 0; } int main() { return test3_123() + test3_125() + test3_126() + test3_127() + test3_135() + test3_136() + test3_137() + test3_156() + test3_157() + test3_167() + test3_234() + test3_235() + test3_236() + test3_237() + test3_238() + test3_256() + test3_257() + test3_267() + test3_356() + test3_357() + test3_367() + test3_467() + test3_567() + test3_678(); }
google
chromium
initlist6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist6.C
394
utf_8
b19685379b0985bb49fa641f27aa5b00
// Test for initlist lifetime // { dg-options "-std=c++0x" } // { dg-do run } #include <initializer_list> int c; struct A { A(int,int) { ++c; } ~A() { --c; } }; void f (std::initializer_list<A> l) { } int main() { f({ {1,2}, {3,4} }); if (c != 0) return 1; { std::initializer_list<A> l { {1,2}, {3,4} }; if (c != 2) return 2; } if (c != 0) return 3; }
google
chromium
pr34056
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr34056.C
266
utf_8
cd35023d6996f43d62bf64762abdc8f5
// PR c++/34056 // { dg-do compile } // { dg-options "-std=c++0x" } 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
chromium
variadic15
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic15.C
677
utf_8
6ed2e036536de09852464be3cd9a350a
// { dg-options "-std=gnu++0x" } template<typename R, typename... ArgTypes> struct make_function_type { typedef R type(const ArgTypes&...); }; 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 a0[is_same<make_function_type<int>::type, int()>::value? 1 : -1]; int a1[is_same<make_function_type<int, float>::type, int(const float&)>::value? 1 : -1]; int a2[is_same<make_function_type<int, float>::type, int(const float&)>::value? 1 : -1]; int a3[is_same<make_function_type<int, float, double>::type, int(const float&, double const&)>::value? 1 : -1];
google
chromium
variadic13
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic13.C
719
utf_8
783f5b8f3855933722495d6a6f85bf18
// { dg-options "-std=gnu++0x" } template<typename... Args> struct tuple1 { }; template<typename... Args> struct tuple2 { }; template<typename T, typename U> struct same_tuple_args { static const bool value = false; }; template<typename... Args> struct same_tuple_args<tuple1<Args...>, tuple2<Args...> > { static const bool value = true; }; int same0[same_tuple_args<tuple1<>, tuple2<> >::value? 1 : -1]; int same1[same_tuple_args<tuple1<int>, tuple2<int> >::value? 1 : -1]; int same2[same_tuple_args<tuple1<float, int>, tuple2<float, int> >::value? 1 : -1]; int diff0[!same_tuple_args<tuple1<>, tuple2<int> >::value? 1 : -1]; int diff1[!same_tuple_args<tuple1<int, float>, tuple2<float, int> >::value? 1 : -1];
google
chromium
decltype3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype3.C
1,585
utf_8
8fc62db200adb5d7fb2b1d4ec897fbe4
// { 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; }; #define CHECK_DECLTYPE(DECLTYPE,RESULT) \ static_assert(is_same< DECLTYPE , RESULT >::value, #DECLTYPE " should be " #RESULT) class A { public: int a; int& b; static int c; A(int& b) : b(b) { } void foo() { CHECK_DECLTYPE(decltype(a), int); CHECK_DECLTYPE(decltype(this->a), int); CHECK_DECLTYPE(decltype((*this).a), int); CHECK_DECLTYPE(decltype(b), int&); } }; int b; A aa(b); const A& caa = aa; CHECK_DECLTYPE(decltype(aa.a), int); CHECK_DECLTYPE(decltype(aa.b), int&); CHECK_DECLTYPE(decltype(caa.a), int); class B { public: int a; enum B_enum { b }; decltype(a) c; decltype(a) foo() { } decltype(b) enums_are_in_scope() { return b; } // ok }; CHECK_DECLTYPE(decltype(aa.*&A::a), int&); decltype(aa.*&A::b) zz; // { dg-error "cannot create pointer to reference member" } // { dg-error "invalid type" "" { target *-*-* } 58 } CHECK_DECLTYPE(decltype(caa.*&A::a), const int&); class X { void foo() { CHECK_DECLTYPE(decltype(this), X*); CHECK_DECLTYPE(decltype(*this), X&); } void bar() const { CHECK_DECLTYPE(decltype(this), const X*); CHECK_DECLTYPE(decltype(*this), const X&); } };
google
chromium
pr31439
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31439.C
237
utf_8
8d3383cdc1fb385e8fa753a53991fb1a
// { dg-options "-std=c++0x" } template<typename...> struct A; template<char> struct A<> {}; // { dg-error "not used in partial specialization|anonymous" } template<typename T, typename... U> struct A<T, U...> : A<U...> {}; A<int> a;
google
chromium
decltype14
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype14.C
148
utf_8
4ec2723baddfc9d905467688b0a93e32
// PR c++/37540 struct A { int g() {return 0;} }; template <typename T_> void f(A a) { __decltype(a.g()) i; } int main() { f<int>(A()); }
google
chromium
variadic-ex9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex9.C
428
utf_8
6669599e2ab36b110102b547028387b6
// { dg-options "-std=gnu++0x" } template<typename... Args> char& f(Args... args); // #1 template<typename T1, typename... Args> short& f(T1 a1, Args... args); // #2 template<typename T1, typename T2> int& f(T1 a2, T2 a3); // #3 void g() { char& x = f(); // calls #1 short& y = f(1, 2, 3); // calls #2 int& z = f(1, 2); // calls #3 }
google
chromium
variadic-throw
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C
387
utf_8
99415d5105880b51d9a3574c4223224f
// { dg-options -std=c++0x } // PR c++/33509 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() throw (pair <M, N>...) // { dg-error "mismatched|no matching" } { return 1; } }; int bar () { return S<0, 1, 2>::foo<0, 1, 3> (); } int wibble() { return S<0, 1, 2>::foo<0, 1> (); }
google
chromium
variadic-ex8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic-ex8.C
823
utf_8
69a34444b58e83f3dc18d0e759baf595
// { dg-options "-std=gnu++0x" } template<class> struct X { static const bool primary = true; }; template<class R, class... ArgTypes> struct X<R(int, ArgTypes...)> { static const bool primary = false; }; template<class... Types> struct Y { static const bool primary = true; }; template<class T, class... Types> struct Y<T, Types&...> { static const bool primary = false; }; static_assert (X<int>::primary, "uses primary template"); static_assert (!X<int(int, float, double)>::primary, "uses partial specialization"); static_assert (X<int(float, int)>::primary, "uses primary template"); static_assert (Y<>::primary, "uses primary template"); static_assert (!Y<int&, float&, double&>::primary, "uses partial specialization"); static_assert (Y<int, float, double>::primary, "uses primary template");
google
chromium
enum_base_warn
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/enum_base_warn.C
424
utf_8
bf868bae8ff5bad206ff223cb32f9072
// { dg-do run } // { dg-options "-O2 -Wtype-limits -std=c++0x" } extern void link_error (void); enum Alpha : unsigned char { ZERO = 0, ONE, TWO, THREE }; Alpha a2; int m1 = -1; int GetM1() { return m1; } int main() { a2 = static_cast<Alpha>(GetM1()); if (a2 == -1) { // { dg-warning "always false due" } link_error (); } if (-1 == a2) { // { dg-warning "always false due" } link_error (); } return 0; }
google
chromium
variadic26
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic26.C
655
utf_8
15323c0aa074c2cef89f77370fbea950
// { dg-options "-std=gnu++0x" } template<template<int, int> class Meta, int Initial, int... Values> struct accumulate { static const int value = Initial; }; template<template<int, int> class Meta, int Initial, int Value, int... Rest> struct accumulate<Meta, Initial, Value, Rest...> { static const int value = Meta<Value, accumulate<Meta, Initial, Rest...>::value>::value; }; template<int X, int Y> struct sum { static const int value = X + Y; }; template<int X, int Y> struct prod { static const int value = X * Y; }; int a0[accumulate<sum,0,1,2,3,4,5>::value == 15? 1 : -1]; int a1[accumulate<prod,1,1,2,3,4,5>::value == 120? 1 : -1];
google
chromium
temp_default3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/temp_default3.C
206
utf_8
84de15e07b6c82c85cd264f1e2e41bb1
// { dg-options "-std=c++0x" } template<typename T, typename U = typename T::value_type> void f(T); void f(...); struct X { typedef int value_type; }; void g() { f(X()); // okay f(17); // okay? }
google
chromium
variadic63
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic63.C
83
utf_8
4fd21efb8e7dbf2adf626840e85c2242
// { dg-options "-std=gnu++0x -pedantic" } template<typename... Args> class tuple;
google
chromium
decltype-33838
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C
152
utf_8
6c7df891cd8dd4306ac98d8d406ffd5f
// { dg-options -std=c++0x } // PR c++/33838 template<typename T> struct A { __decltype (T* foo()); // { dg-error "expected|no arguments|accept" } };
google
chromium
initlist-deduce
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist-deduce.C
520
utf_8
81d19e9429c014cc6fc39082d98b479d
// 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 -std=c++0x } // { dg-do run } #include <initializer_list> struct A { A(std::initializer_list<int>) { } }; void f (A a) { } template <class T> auto g (T&& t) -> decltype (f(t)) // { dg-warning "call" } { return f(t); } int main() { g({1}); // { dg-warning "deduc" } }
google
chromium
pr34061
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr34061.C
157
utf_8
fa9fefbf49d938e0bb7bc95e80a16b94
// PR c++/34061 // { dg-do compile } // { dg-options "-std=c++0x" } template<template<int> class ...T> struct A : T<0> {}; // { dg-error "not expanded|T" }
google
chromium
variadic68
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic68.C
407
utf_8
1bb219987b62433ec1ed551722126eda
// { dg-do "run" } // { dg-options "-std=gnu++0x" } extern "C" void abort(); template<typename T, T... Values> void f(T* expected_values, int n) { if (sizeof...(Values) != n) abort (); T values[] = { Values... }; for (int i = 0; i < n; ++i) if (values[i] != expected_values[i]) abort(); } int main() { int test_arr1[3] = { 1, 2, 3 }; f<int, 1, 2, 3>(test_arr1, 3); return 0; }
google
chromium
cast-bug
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/cast-bug.C
131
utf_8
7a47c96ccc25ad3c9076e60422fc834f
// { dg-options "--std=c++0x" } struct S { S(); S(S &&); private: S(S &); }; S f() { S s; return static_cast<S&&>(s); }
google
chromium
auto9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/auto9.C
3,469
utf_8
91d863ef4cf14690b1a45a8323f2f8f0
// PR c++/37962 // Negative test for auto // { dg-do compile } // { dg-options "-std=c++0x" } #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_cast <auto *>(q); // { dg-error "auto" } const std::type_info &t1 = typeid (auto); // { dg-error "auto" } const std::type_info &t2 = typeid (auto *); // { dg-error "auto" } struct A { operator auto (); // { dg-error "auto" } operator auto *(); // { dg-error "auto" } }; struct A2 { operator auto () -> int; // { dg-error "invalid use of" } operator auto *() -> int; // { dg-error "auto" } }; template <typename> struct B { enum { e }; }; template <typename T> struct C { C () : i () {} int i; }; bool d = (auto (A::*)()) 0; // { dg-error "auto" } void foo () { (auto) { 0 }; // { dg-error "auto" } C<int> c; int i = auto (0); // { dg-error "auto" } auto p1 = new (auto); // { dg-error "auto" } auto p2 = new (auto) (42); // { dg-error "invalid use of|deduce" } offsetof (auto, fld); // { dg-error "auto" } offsetof (auto *, fld); // { dg-error "auto" } sizeof (auto); // { dg-error "auto" } sizeof (auto *); // { dg-error "auto" } } void foo2 (void) { __alignof__ (auto); // { dg-error "auto" } __alignof__ (auto *); // { dg-error "auto" } __typeof__ (auto) v1; // { dg-error "auto" } __typeof__ (auto *) v2; // { dg-error "auto" } __is_class (auto); // { dg-error "auto|expected" } __is_pod (auto *); // { dg-error "auto|expected" } __is_base_of (int, auto); // { dg-error "auto|expected" } __is_base_of (auto, int); // { dg-error "auto|expected" } __is_base_of (auto, auto *); // { dg-error "auto|expected" } } B<auto> b; // { dg-error "auto|invalid" } C<auto> c; // { dg-error "auto|invalid" } C<auto *> c2; // { dg-error "auto|invalid" } enum : auto { EE = 0 }; // { dg-error "must be an integral type" } enum struct D : auto * { FF = 0 }; // { dg-error "declar|expected" } void bar () { try { } catch (auto i) { } // { dg-error "invalid use of" } try { } catch (auto) { } // { dg-error "invalid use of" } try { } catch (auto *i) { } // { dg-error "invalid use of" } try { } catch (auto *) { } // { dg-error "invalid use of" } } void baz (int i, ...) { va_list ap; va_start (ap, i); va_arg (ap, auto); // { dg-error "invalid use of" } va_arg (ap, auto *); // { dg-error "invalid use of|expected" } va_arg (ap, auto &); // { dg-error "invalid use of|expected" } va_end (ap); } template <typename T = auto> struct E {}; // { dg-error "invalid use of" } template <class T = auto *> struct F {}; // { dg-error "invalid use of|expected" } auto fnlate () -> auto; // { dg-error "invalid use of" } auto fnlate2 () -> auto *; // { dg-error "invalid use of|expected" } void badthrow () throw (auto) // { dg-error "invalid use of" } { } void badthrow2 () throw (auto &) // { dg-error "invalid use of|expected" } { } template <auto V = 4> struct G {}; // { dg-error "auto" } template <typename T> struct H { H (); ~H (); }; H<auto> h; // { dg-error "invalid" } void qq (auto); // { dg-error "auto" } void qr (auto*); // { dg-error "auto" }
google
chromium
__func__
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/__func__.C
83
utf_8
fd509d418a54163fd3341bc1594e68f8
// { dg-options "-std=c++0x -pedantic" } const char* foo() { return __func__; }
google
chromium
pr31442
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr31442.C
270
utf_8
5fe41c6f9f1b7c523ca74ef42239a6dd
// { dg-options "-std=gnu++0x" } template<typename... T, T = 0> struct A {}; // { dg-error "parameter packs|T|the end|parameter packs|anonymous" } struct B { template <template <typename...> class C> B(C<int>); }; B b = A<int>(); // { dg-error "mismatch|expected" }
google
chromium
rv-trivial-bug
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C
566
utf_8
502f5ac10c2ab96a80d6c603bdf2cfd2
// { dg-do "run" } // { dg-options "-std=c++0x" } // PR c++/33235 #include <cassert> int move_construct = 0; int move_assign = 0; struct base2 { base2() {} base2(base2&&) {++move_construct;} base2& operator=(base2&&) {++move_assign; return *this;} }; int test2() { base2 b; base2 b2(b); assert(move_construct == 0); base2 b3(static_cast<base2&&>(b)); assert(move_construct == 1); b = b2; assert(move_assign == 0); b = static_cast<base2&&>(b2); assert(move_assign == 1); } int main() { test2(); return 0; }
google
chromium
variadic46
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic46.C
178
utf_8
1d4336e9606ac11d13c11822d5c1aa1d
// { dg-options "-std=gnu++0x" } template<typename... Args> int& f(Args&...); template<typename... Args> float& f(const Args&...); int& g(int x, float y) { return f(x, y); }
google
chromium
overload-conv-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/overload-conv-2.C
161
utf_8
a280ecf17238784796b3effb1fd26248
// { dg-options "--std=c++0x" } // { dg-do link } struct T {}; struct S { S(T const &) {} }; void f(const S&); void f(S&&) {} int main() { T t; f(t); }
google
chromium
variadic77
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic77.C
369
utf_8
da25de7dbe6004c16da766f4081b6da7
// PR c++/33496 // { dg-do compile } // { dg-options "-std=gnu++0x" } 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 () { return sizeof... (pair<M, N>); // { dg-error "mismatched argument pack lengths" } } }; int bar () { return S<0, 1, 2>::foo<0, 1> (); }
google
chromium
scoped_enum_98
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/scoped_enum_98.C
164
utf_8
fd6131462c6e3edcb0e1d2d7c01ff384
// { dg-do compile } // { dg-options "-std=c++98" } enum class E1 { e1 }; // { dg-warning "scoped enums" } enum E2 : char { e2 }; // { dg-warning "scoped enums" }
google
chromium
named
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/named.C
671
utf_8
d6c971d57aa73f0e85d3dc1d3ecf603f
// { dg-options "--std=c++0x" } // { dg-do link } struct S {}; struct T { T(S && s_) : s(s_) {} S && get() { return s; } operator S&&() { return s; } S && s; }; void named(S const &) {} void named(S&&); void unnamed(S const &); void unnamed(S&&) {} void f(S && p) { S && s(p); T t(s); named(s); // variable reference named(p); // parameter reference named(t.s); // class member access unnamed(t.get()); // function return unnamed(t); // implicit conversion unnamed(static_cast<S&&>(s)); // cast to rvalue } int main() { }
google
chromium
temp-va-arg-bug
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/temp-va-arg-bug.C
195
utf_8
7712df2d9e36aa563428755742fff74c
// { dg-options "--std=c++0x" } // { dg-options "-Wno-abi --std=c++0x" { target arm_eabi } } #include <stdarg.h> struct S { }; void f(S const &); void g(va_list args) { f(va_arg(args, S)); }
google
chromium
initlist29
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist29.C
172
utf_8
2dfea3afb901b42654dc87a5c89c66f0
// PR c++/42331 // { dg-options "-std=c++0x" } class Mesh { public: Mesh(const char*) { typele={0}; } // { dg-error "" } private: int typele[7][2]; }; Mesh m(0);
google
chromium
pr32566
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr32566.C
149
utf_8
04413fdf6bfed8674a0e127cb7d47fd5
// { dg-options "-std=c++0x" } template<int...> struct A; template<template<int> class... T> struct A<T...> {}; // { dg-error "mismatch|expected" }
google
chromium
variadic55
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic55.C
276
utf_8
148188bbd7fdf8cb6e329fdcf2074726
// { dg-options "-std=gnu++0x" } template<typename F, typename... BoundArgs> class bound_functor { public: bound_functor(const BoundArgs&... bound_args); }; template<typename F, typename... BoundArgs> bound_functor<F, BoundArgs...>::bound_functor(const BoundArgs&...) { }
google
chromium
pr32127
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/pr32127.C
169
utf_8
40e7a635680d6d648eb6005a7755c36f
// { dg-options "-std=c++0x" } template<typename...T> struct A { static T i; // { dg-error "parameter packs|T" } }; int j = A<int>::i; // { dg-error "not a member" }
google
chromium
variadic38
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic38.C
184
utf_8
dee0de0dca97dfb06bf59cb3474c28bd
// { dg-options "-std=gnu++0x" } template<int... Values> struct int_vec {}; template<int... Values> struct int_vec<0, (Values+1)...> {}; // { dg-error "involves template parameter" }
google
chromium
variadic93
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic93.C
157
utf_8
761ecd4bd3764522d66074c7008f1879
// PR c++/35297 // { dg-options "-std=c++0x" } template <class T=int, class... ARGS> struct test2 {}; int main() { test2<> a; return 0; }
google
chromium
variadic51
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/variadic51.C
174
utf_8
67318b70279649a692937f82fc969fad
// { dg-options "-std=gnu++0x" } template<typename T1, typename T2> float& f(T1, T2); template<typename... Args> int& f(Args...); float& g() { return f(17, 3.14159); }
google
chromium
initlist12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp0x/initlist12.C
272
utf_8
88ca216d97a186e8c3400a3591c5b88d
// PR c++/38698 // { dg-options "-std=c++0x" } struct A { int i; }; A a({1,2}); // { dg-error "too many initializers" } union U { int i,j; }; U u({1,2}); // { dg-error "too many initializers" } union V {}; V v({1}); // { dg-error "too many initializers" }