1 // I, Howard Hinnant, hereby place this code in the public domain.
3 // Test: Implicit cast to rvalue when eliding copy
6 // { dg-options "-std=c++0x" }
8 template <bool> struct sa;
9 template <> struct sa<true> {};
11 struct one {char x[1];};
12 struct two {char x[2];};
16 move_only(const move_only&);
17 move_only& operator=(const move_only&);
20 move_only(move_only&&) {}
21 move_only& operator=(move_only&&) {return *this;}
68 move_only t1 = test1();
69 move_only t2 = test2();
70 move_only t3 = test3(b);