4 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
8 Emplaceable(const Emplaceable
&);
9 Emplaceable
& operator=(const Emplaceable
&);
14 Emplaceable() : int_(0), double_(0) {}
15 Emplaceable(int i
, double d
) : int_(i
), double_(d
) {}
16 Emplaceable(Emplaceable
&& x
)
17 : int_(x
.int_
), double_(x
.double_
)
18 {x
.int_
= 0; x
.double_
= 0;}
19 Emplaceable
& operator=(Emplaceable
&& x
)
20 {int_
= x
.int_
; x
.int_
= 0;
21 double_
= x
.double_
; x
.double_
= 0;
24 bool operator==(const Emplaceable
& x
) const
25 {return int_
== x
.int_
&& double_
== x
.double_
;}
26 bool operator<(const Emplaceable
& x
) const
27 {return int_
< x
.int_
|| (int_
== x
.int_
&& double_
< x
.double_
);}
29 int get() const {return int_
;}
35 struct hash
<Emplaceable
>
36 : public std::unary_function
<Emplaceable
, std::size_t>
38 std::size_t operator()(const Emplaceable
& x
) const {return x
.get();}
43 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
45 #endif // EMPLACEABLE_H