26#ifndef MYSQL_HARNESS_DEFAULT_INIT_ALLOCATOR_H_
27#define MYSQL_HARNESS_DEFAULT_INIT_ALLOCATOR_H_
39template <
class T,
class A = std::allocator<T>>
41 using a_t = std::allocator_traits<A>;
55 std::is_nothrow_default_constructible<U>::value) {
56 ::new (
static_cast<void *
>(ptr))
U;
58 template <
class U,
class... Args>
60 a_t::construct(
static_cast<A &
>(*
this), ptr, std::forward<Args>(args)...);
allocator which leaves newly constructed fields "default initialized".
Definition: default_init_allocator.h:40
void construct(U *ptr, Args &&... args)
Definition: default_init_allocator.h:59
void construct(U *ptr) noexcept(std::is_nothrow_default_constructible< U >::value)
Definition: default_init_allocator.h:54
std::allocator_traits< A > a_t
Definition: default_init_allocator.h:41
#define U
Definition: ctype-tis620.cc:75
void construct(void *mem, size_t offset, Tuple &&tuple)
Definition: ut0new.h:53
Definition: default_init_allocator.h:45