31 typedef T1 first_type;
32 typedef T2 second_type;
33 typedef typename std::add_const<first_type>::type first_const_type;
34 typedef typename std::add_const<second_type>::type second_const_type;
35 typedef typename std::add_lvalue_reference<first_type>::type first_reference;
37 typename std::add_lvalue_reference<second_type>::type second_reference;
38 typedef typename std::add_lvalue_reference<first_const_type>::type
39 first_const_reference;
40 typedef typename std::add_lvalue_reference<second_const_type>::type
41 second_const_reference;
42 typedef typename std::add_rvalue_reference<first_type>::type
43 first_rvalue_reference;
44 typedef typename std::add_rvalue_reference<second_type>::type
45 second_rvalue_reference;
49 : first_type(x), second_type(y) {}
55 : first_type(std::move(other.first_rvalref())),
56 second_type(std::move(other.second_rvalref())) {}
59 this->first() = std::move(other.first_rvalref());
60 this->second() = std::move(other.second_rvalref());
64 first_reference first() {
return static_cast<first_reference
>(*this); }
65 first_const_reference first()
const {
66 return static_cast<first_const_reference
>(*this);
68 first_rvalue_reference first_rvalref() {
69 return static_cast<first_rvalue_reference
>(*this);
72 second_reference second() {
return static_cast<second_reference
>(*this); }
73 second_const_reference second()
const {
74 return static_cast<second_const_reference
>(*this);
76 second_rvalue_reference second_rvalref() {
77 return static_cast<second_rvalue_reference
>(*this);
81 swap(this->first(), other.first());
82 swap(this->second(), other.second());