38 #ifndef LIBPMEMOBJ_CPP_V_HPP 39 #define LIBPMEMOBJ_CPP_V_HPP 52 namespace experimental
114 template <
typename Y,
115 typename =
typename std::enable_if<
116 std::is_convertible<Y, T>::value>::type>
137 PMEMobjpool *pop = pmemobj_pool_by_ptr(
this);
141 T *value =
static_cast<T *
>(pmemobj_volatile(
142 pop, &this->vlt, &this->val,
sizeof(T),
143 pmem::detail::instantiate_volatile_object<T>, NULL));
151 operator T &() noexcept
165 std::swap(this->val, other.val);
v & operator=(const v< Y > &rhs)
Converting assignment operator from a different v<>.
Definition: v.hpp:118
v & operator=(const T &rhs)
Assignment operator.
Definition: v.hpp:99
Implementation details of volatile variables implementation.
pmem::obj::experimental::v - volatile resides on pmem class.
Definition: v.hpp:67
Commonly used functionality.
void swap(pmem::obj::experimental::array< T, N > &lhs, pmem::obj::experimental::array< T, N > &rhs)
Non-member swap function.
Definition: array.hpp:731
v & operator=(const v &rhs)
Assignment operator.
Definition: v.hpp:85
Definition: allocator.hpp:48
void swap(v &other)
Swaps two v objects of the same type.
Definition: v.hpp:160
v() noexcept
Defaulted constructor.
Definition: v.hpp:77