38 #ifndef LIBPMEMOBJ_CPP_MAKE_ATOMIC_IMPL_HPP
39 #define LIBPMEMOBJ_CPP_MAKE_ATOMIC_IMPL_HPP
59 template <
typename T,
typename Tuple,
typename... Args>
61 obj_constructor(PMEMobjpool *pop,
void *ptr,
void *arg)
63 auto ret = c_style_construct<T, Tuple, Args...>(ptr, arg);
68 pmemobj_persist(pop, ptr,
sizeof(T));
81 array_constructor(PMEMobjpool *pop,
void *ptr,
void *arg)
83 std::size_t N = *
static_cast<std::size_t *
>(arg);
85 T *tptr =
static_cast<T *
>(ptr);
87 for (std::size_t i = 0; i < N; ++i)
88 detail::create<T>(tptr + i);
93 pmemobj_persist(pop, ptr,
sizeof(T) * N);