PMDK C++ bindings
1.8.1
This is the C++ bindings documentation for PMDK's libpmemobj.
|
Go to the documentation of this file.
38 #ifndef LIBPMEMOBJ_CPP_V_HPP
39 #define LIBPMEMOBJ_CPP_V_HPP
53 namespace experimental
70 static_assert(std::is_default_constructible<T>::value,
71 "Type T must be default constructible");
108 return *
this = rhs.
get();
116 template <
typename Y,
117 typename =
typename std::enable_if<
118 std::is_convertible<Y, T>::value>::type>
122 return *
this = rhs.
get();
134 template <
typename... Args>
136 get(Args &&... args) noexcept
139 std::forward_as_tuple(std::forward<Args>(args)...);
141 PMEMobjpool *pop = pmemobj_pool_by_ptr(
this);
145 T *value =
static_cast<T *
>(pmemobj_volatile(
146 pop, &this->vlt, &this->val,
sizeof(T),
147 pmem::detail::c_style_construct<T, decltype(arg_pack),
149 static_cast<void *
>(&arg_pack)));
171 operator T &() noexcept
182 std::swap(
get(), other.
get());
void swap(v &other)
Swaps two v objects of the same type.
Definition: v.hpp:180
A persistent version of concurrent hash map implementation Ref: https://arxiv.org/abs/1509....
Definition: allocation_flag.hpp:44
v & operator=(const T &rhs)
Assignment operator.
Definition: v.hpp:92
T & unsafe_get()
Retrieves reference to the object.
Definition: v.hpp:163
Commonly used functionality.
void swap(pmem::obj::array< T, N > &lhs, pmem::obj::array< T, N > &rhs)
Non-member swap function.
Definition: array.hpp:913
T & get(Args &&... args) noexcept
Retrieves reference to the object.
Definition: v.hpp:136
v & operator=(v< Y > &rhs)
Converting assignment operator from a different v<>.
Definition: v.hpp:120
~v()
Destructor.
Definition: v.hpp:83
Functions for destroying arrays.
pmem::obj::experimental::v - volatile resides on pmem class.
Definition: v.hpp:68
v() noexcept
Defaulted constructor.
Definition: v.hpp:76
v & operator=(v &rhs)
Assignment operator.
Definition: v.hpp:106