4 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
11 MoveOnly(const MoveOnly
&);
12 MoveOnly
& operator=(const MoveOnly
&);
16 MoveOnly(int data
= 1) : data_(data
) {}
17 MoveOnly(MoveOnly
&& x
)
18 : data_(x
.data_
) {x
.data_
= 0;}
19 MoveOnly
& operator=(MoveOnly
&& x
)
20 {data_
= x
.data_
; x
.data_
= 0; return *this;}
22 int get() const {return data_
;}
24 bool operator==(const MoveOnly
& x
) const {return data_
== x
.data_
;}
25 bool operator< (const MoveOnly
& x
) const {return data_
< x
.data_
;}
32 : public std::unary_function
<MoveOnly
, std::size_t>
34 std::size_t operator()(const MoveOnly
& x
) const {return x
.get();}
39 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES