9 #ifndef LIBPMEMOBJ_CPP_V_HPP
10 #define LIBPMEMOBJ_CPP_V_HPP
24 namespace experimental
41 static_assert(std::is_default_constructible<T>::value,
42 "Type T must be default constructible");
79 return *
this = rhs.
get();
88 typename =
typename std::enable_if<
89 std::is_convertible<Y, T>::value>::type>
93 return *
this = rhs.
get();
105 template <
typename... Args>
107 get(Args &&... args) noexcept
110 std::forward_as_tuple(std::forward<Args>(args)...);
112 PMEMobjpool *pop = pmemobj_pool_by_ptr(
this);
116 T *value =
static_cast<T *
>(pmemobj_volatile(
117 pop, &this->vlt, &this->val,
sizeof(T),
118 pmem::detail::c_style_construct<T, decltype(arg_pack),
120 static_cast<void *
>(&arg_pack)));
142 operator T &() noexcept