19 #ifndef _libint2_src_lib_libint_util_compressedpair_h_ 20 #define _libint2_src_lib_libint_util_compressedpair_h_ 26 template <
class T1,
class T2>
30 typedef T1 first_type;
31 typedef T2 second_type;
32 typedef typename std::add_const<first_type>::type first_const_type;
33 typedef typename std::add_const<second_type>::type second_const_type;
34 typedef typename std::add_lvalue_reference<first_type>::type first_reference;
35 typedef typename std::add_lvalue_reference<second_type>::type second_reference;
36 typedef typename std::add_lvalue_reference<first_const_type>::type first_const_reference;
37 typedef typename std::add_lvalue_reference<second_const_type>::type second_const_reference;
38 typedef typename std::add_rvalue_reference<first_type>::type first_rvalue_reference;
39 typedef typename std::add_rvalue_reference<second_type>::type second_rvalue_reference;
43 first_type(x), second_type(y) {}
49 first_type(std::move(other.first_rvalref())), second_type(std::move(other.second_rvalref())) {}
52 this->first() = std::move(other.first_rvalref());
53 this->second() = std::move(other.second_rvalref());
57 first_reference first() {
return static_cast<first_reference
>(*this); }
58 first_const_reference first()
const {
return static_cast<first_const_reference
>(*this); }
59 first_rvalue_reference first_rvalref() {
return static_cast<first_rvalue_reference
>(*this); }
61 second_reference second() {
return static_cast<second_reference
>(*this); }
62 second_const_reference second()
const {
return static_cast<second_const_reference
>(*this); }
63 second_rvalue_reference second_rvalref() {
return static_cast<second_rvalue_reference
>(*this); }
66 swap(this->first(),other.first());
67 swap(this->second(),other.second());
73 #endif // header guard Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
Definition: compressed_pair.h:27