1 // I, Howard Hinnant, hereby place this code in the public domain.
3 // Test: Implicit cast to rvalue when eliding copy
5 // { dg-do compile { target c++11 } }
7 template <bool> struct sa;
8 template <> struct sa<true> {};
10 struct one {char x[1];};
11 struct two {char x[2];};
15 move_only(const move_only&);
16 move_only& operator=(const move_only&);
19 move_only(move_only&&) {}
20 move_only& operator=(move_only&&) {return *this;}
67 move_only t1 = test1();
68 move_only t2 = test2();
69 move_only t3 = test3(b);