9 #ifndef LIBPMEMOBJ_CPP_MAKE_ATOMIC_IMPL_HPP
10 #define LIBPMEMOBJ_CPP_MAKE_ATOMIC_IMPL_HPP
30 template <
typename T,
typename Tuple,
typename... Args>
32 obj_constructor(PMEMobjpool *pop,
void *ptr,
void *arg)
34 auto ret = c_style_construct<T, Tuple, Args...>(ptr, arg);
39 pmemobj_persist(pop, ptr,
sizeof(T));
52 array_constructor(PMEMobjpool *pop,
void *ptr,
void *arg)
54 std::size_t N = *
static_cast<std::size_t *
>(arg);
56 T *tptr =
static_cast<T *
>(ptr);
58 for (std::size_t i = 0; i < N; ++i)
59 detail::create<T>(tptr + i);
64 pmemobj_persist(pop, ptr,
sizeof(T) * N);