7 #ifndef PXR_EXEC_VDF_DEFAULT_INIT_ALLOCATOR
8 #define PXR_EXEC_VDF_DEFAULT_INIT_ALLOCATOR
13 #include <type_traits>
26 template <
typename T,
typename AllocatorBase = std::allocator<T>>
35 typename std::allocator_traits<AllocatorBase>::template
40 using AllocatorBase::AllocatorBase;
47 std::is_nothrow_default_constructible_v<U>) {
49 ::new(static_cast<void*>(
ptr)) U;
55 template <
typename U,
typename...Args>
57 std::allocator_traits<AllocatorBase>::construct(
58 static_cast<AllocatorBase&>(*
this),
60 std::forward<Args>(
args)...);
#define PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
**If you just want to fire and args
void construct(U *ptr, Args &&...args)
void construct(U *ptr) noexcept(std::is_nothrow_default_constructible_v< U >)