38 #ifndef LIBPMEMOBJ_CPP_V_HPP
39 #define LIBPMEMOBJ_CPP_V_HPP
52 namespace experimental
77 v(
const T &_val) noexcept : vlt{0}, val{_val}
84 v() noexcept : vlt{0}, val()
94 this_type(rhs).
swap(*
this);
104 template <
typename Y,
105 typename =
typename std::enable_if<
106 std::is_convertible<Y, T>::value>::type>
110 this_type(rhs).
swap(*
this);
124 PMEMobjpool *pop = pmemobj_pool_by_ptr(
this);
128 T *value =
static_cast<T *
>(pmemobj_volatile(
129 pop, &this->vlt, &this->val,
sizeof(T),
130 pmem::detail::instantiate_volatile_object<T>, NULL));
138 operator T() const noexcept
149 std::swap(this->val, other.val);
165 swap(v<T> &a, v<T> &b)
v & operator=(const v< Y > &rhs)
Converting assignment operator from a different v<>.
Definition: v.hpp:108
Implementation details of volatile variables implementation.
pmem::obj::experimental::v - volatile resides on pmem class.
Definition: v.hpp:67
Commonly used functionality.
v & operator=(const v &rhs)
Assignment operator.
Definition: v.hpp:92
v(const T &_val) noexcept
Value constructor.
Definition: v.hpp:77
Definition: allocator.hpp:48
void swap(v &other)
Swaps two v objects of the same type.
Definition: v.hpp:147
v() noexcept
Defaulted constructor.
Definition: v.hpp:84