int test1_2() { A a; const A ca = a; // { dg-error "deleted" } volatile A va; const volatile A cva = a; // { dg-error "deleted" } sink_1_2(va); // { dg-error "" } sink_1_2(cva); // { dg-error "" } sink_1_2(v_source()); // { dg-error "" } sink_1_2(cv_source()); // { dg-error "" } return 0; }
int test1_2() { A a; const A ca; volatile A va; const volatile A cva; sa<sizeof(sink_1_2(a)) == 2 * sizeof(long)> t1; sa<sizeof(sink_1_2(ca)) == 2 * sizeof(long)> t2; sa<sizeof(sink_1_2(source())) == 2 * sizeof(long)> t5; sa<sizeof(sink_1_2(c_source())) == 2 * sizeof(long)> t6; return 0; }
int test1_2() { A a; const A ca = a; volatile A va; const volatile A cva = a; sink_1_2(va); // { dg-error "invalid initialization" } sink_1_2(cva); // { dg-error "invalid initialization" } sink_1_2(v_source()); // { dg-error "invalid initialization" } sink_1_2(cv_source()); // { dg-error "invalid initialization" } return 0; }