9 #ifndef LIBPMEMOBJ_CPP_TEMP_VALUE_HPP
10 #define LIBPMEMOBJ_CPP_TEMP_VALUE_HPP
25 #ifndef LIBPMEMOBJ_CPP_MAX_STACK_ALLOC_SIZE
26 #define LIBPMEMOBJ_CPP_MAX_STACK_ALLOC_SIZE 64 * (1 << 10)
34 template <
typename T,
bool NoExcept,
typename Enable =
void>
42 template <
typename T,
bool NoExcept>
45 typename std::enable_if<NoExcept &&
47 LIBPMEMOBJ_CPP_MAX_STACK_ALLOC_SIZE)>::type> {
48 template <
typename... Args>
49 temp_value(Args &&... args) noexcept : t(std::forward<Args>(args)...)
67 template <
typename T,
bool NoExcept>
70 typename std::enable_if<!NoExcept ||
72 LIBPMEMOBJ_CPP_MAX_STACK_ALLOC_SIZE)>::type> {
73 template <
typename... Args>
74 temp_value(Args &&... args)
76 ptr = pmem::obj::make_persistent<T>(
77 std::forward<Args>(args)...);
82 pmem::obj::delete_persistent<T>(ptr);
Persistent pointer class.
Definition: persistent_ptr.hpp:153
persistent_ptr transactional allocation functions for objects.
Persistent memory namespace.
Definition: allocation_flag.hpp:15
Template class for caching objects based on constructor's variadic template arguments and LIBPMEMOBJ_...
Definition: temp_value.hpp:35