PMDK C++ bindings
1.11
This is the C++ bindings documentation for PMDK's libpmemobj.
|
Go to the documentation of this file.
9 #ifndef LIBPMEMOBJ_CPP_V_HPP
10 #define LIBPMEMOBJ_CPP_V_HPP
24 namespace experimental
44 static_assert(std::is_default_constructible<T>::value,
45 "Type T must be default constructible");
82 return *
this = rhs.
get();
91 typename =
typename std::enable_if<
92 std::is_convertible<Y, T>::value>::type>
96 return *
this = rhs.
get();
108 template <
typename... Args>
110 get(Args &&... args) noexcept
113 std::forward_as_tuple(std::forward<Args>(args)...);
115 PMEMobjpool *pop = pmemobj_pool_by_ptr(
this);
119 T *value =
static_cast<T *
>(pmemobj_volatile(
120 pop, &this->vlt, &this->val,
sizeof(T),
121 pmem::detail::c_style_construct<T, decltype(arg_pack),
123 static_cast<void *
>(&arg_pack)));
145 operator T &() noexcept
void swap(v &other)
Swaps two v objects of the same type.
Definition: v.hpp:154
Persistent memory namespace.
Definition: allocation_flag.hpp:15
v & operator=(const T &rhs)
Assignment operator.
Definition: v.hpp:66
T & unsafe_get()
Retrieves reference to the object.
Definition: v.hpp:137
Commonly used functionality.
void swap(v< T > &a, v< T > &b)
Swaps two v objects of the same type.
Definition: v.hpp:180
T & get(Args &&... args) noexcept
Retrieves reference to the object.
Definition: v.hpp:110
v & operator=(v< Y > &rhs)
Converting assignment operator from a different v<>.
Definition: v.hpp:94
void swap(concurrent_map< Key, Value, Comp, Allocator > &lhs, concurrent_map< Key, Value, Comp, Allocator > &rhs)
Non-member swap.
Definition: concurrent_map.hpp:151
~v()
Destructor.
Definition: v.hpp:57
Functions for destroying arrays.
Volatile residing on pmem class.
Definition: v.hpp:42
v() noexcept
Defaulted constructor.
Definition: v.hpp:50
v & operator=(v &rhs)
Assignment operator.
Definition: v.hpp:80