1 // { dg-do compile { target c++11 } }
5 int move_construct = 0;
8 struct base2 // { dg-message "declares a move" }
11 base2(base2&&) {++move_construct;}
12 base2& operator=(base2&&) {++move_assign; return *this;}
18 base2 b2(b); // { dg-error "deleted" }
19 assert(move_construct == 0);
20 base2 b3(static_cast<base2&&>(b));
21 base2 b4 = static_cast<base2&&>(b);
22 assert(move_construct == 2);
23 b = b2; // { dg-error "deleted" }
24 assert(move_assign == 0);
25 b = static_cast<base2&&>(b2);
26 assert(move_assign == 1);