4 #ifndef LIBPMEMOBJ_PAIR_HPP
5 #define LIBPMEMOBJ_PAIR_HPP
17 template <
typename F,
typename S>
19 constexpr pair() : first(), second()
23 template <
typename... Args1,
typename... Args2>
24 pair(std::piecewise_construct_t pc, std::tuple<Args1...> first_args,
25 std::tuple<Args2...> second_args)
26 : pair(pc, first_args, second_args,
27 typename make_index_sequence<Args1...>::type{},
28 typename make_index_sequence<Args2...>::type{})
32 constexpr pair(
const F &k,
const S &v) : first(k), second(v)
36 template <
typename K,
typename V>
37 constexpr pair(K &&k, V &&v)
38 : first(std::forward<K>(k)), second(std::forward<V>(v))
42 template <
typename K,
typename V>
43 constexpr pair(
const std::pair<K, V> &p)
44 : first(p.first), second(p.second)
48 template <
typename K,
typename V>
49 constexpr pair(std::pair<K, V> &&p)
50 : first(std::forward<K>(p.first)), second(std::forward<V>(p.second))
58 template <
typename... Args1,
typename... Args2,
size_t... I1,
60 pair(std::piecewise_construct_t, std::tuple<Args1...> &first_args,
61 std::tuple<Args2...> &second_args, index_sequence<I1...>,
62 index_sequence<I2...>)
63 : first(std::forward<Args1>(std::
get<I1>(first_args))...),
64 second(std::forward<Args2>(std::
get<I2>(second_args))...)
69 template <
class T1,
class T2>
71 operator==(
const pair<T1, T2> &lhs,
const pair<T1, T2> &rhs)
73 return lhs.first == rhs.first && lhs.second == rhs.second;
76 template <
class T1,
class T2>
78 operator!=(
const pair<T1, T2> &lhs,
const pair<T1, T2> &rhs)
Create c++14 style index sequence.
bool operator!=(const allocator< T, P, Tr > &lhs, const OtherAllocator &rhs)
Determines if memory from another allocator can be deallocated from this one.
Definition: allocator.hpp:536
T & get(pmem::obj::array< T, N > &a)
Non-member get function.
Definition: array.hpp:919
bool operator==(standard_alloc_policy< T > const &, standard_alloc_policy< T2 > const &)
Determines if memory from another allocator can be deallocated from this one.
Definition: allocator.hpp:420
Persistent memory namespace.
Definition: allocation_flag.hpp:15