7#ifndef PXR_EXEC_VDF_DEFAULT_INIT_ALLOCATOR
8#define PXR_EXEC_VDF_DEFAULT_INIT_ALLOCATOR
15PXR_NAMESPACE_OPEN_SCOPE
26template <
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)...);
64PXR_NAMESPACE_CLOSE_SCOPE
Vdf_DefaultInitAllocator.
void construct(U *ptr) noexcept(std::is_nothrow_default_constructible_v< U >)
Value initializing construction.
void construct(U *ptr, Args &&... args)
Construction with custom constructor arguments.