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