33 #ifndef LIBPMEMOBJ_PAIR_HPP
34 #define LIBPMEMOBJ_PAIR_HPP
46 template <
typename F,
typename S>
48 constexpr pair() : first(), second()
52 template <
typename... Args1,
typename... Args2>
53 pair(std::piecewise_construct_t pc, std::tuple<Args1...> first_args,
54 std::tuple<Args2...> second_args)
55 : pair(pc, first_args, second_args,
56 typename make_index_sequence<Args1...>::type{},
57 typename make_index_sequence<Args2...>::type{})
61 constexpr pair(
const F &k,
const S &v) : first(k), second(v)
65 template <
typename K,
typename V>
66 constexpr pair(K &&k, V &&v)
67 : first(std::forward<K>(k)), second(std::forward<V>(v))
71 template <
typename K,
typename V>
72 constexpr pair(
const std::pair<K, V> &p)
73 : first(p.first), second(p.second)
77 template <
typename K,
typename V>
78 constexpr pair(std::pair<K, V> &&p)
79 : first(std::forward<K>(p.first)), second(std::forward<V>(p.second))
87 template <
typename... Args1,
typename... Args2,
size_t... I1,
89 pair(std::piecewise_construct_t, std::tuple<Args1...> &first_args,
90 std::tuple<Args2...> &second_args, index_sequence<I1...>,
91 index_sequence<I2...>)
92 : first(std::forward<Args1>(std::
get<I1>(first_args))...),
93 second(std::forward<Args2>(std::
get<I2>(second_args))...)