AllocatorHasDefaultObjectConstruct
Declared in <folly/memory/Allocator.h>
template<
typename Alloc,
typename T,
typename... Args>
struct AllocatorHasDefaultObjectConstruct
: std::negation</* implementation-defined */>
AllocatorHasDefaultObjectConstruct unambiguously inherits std::integral_constant<bool, V>, where V will be true iff the effect of std::allocator_traits::construct(a, p, args...) is the same as new (static_cast<void*>(p)) T(args...). If true then any optimizations applicable to object construction (relying on std::is_trivially_copyable<T>, for example) can be applied to objects in an allocator-aware container using an allocation of type A.
Allocator types can override V by declaring a type alias for folly_has_default_object_construct. It is helpful to do this if you define a custom allocator type that defines a construct method, but that method doesn't do anything except call placement new.
| Name | Description |
|---|---|
std::negation</* implementation-defined */> |
| Name |
|---|
AllocatorHasDefaultObjectConstruct<std::allocator<Value>, T, Args...> |