25#ifndef MYSQL_HARNESS_DEFAULT_INIT_ALLOCATOR_H_
26#define MYSQL_HARNESS_DEFAULT_INIT_ALLOCATOR_H_
38template <
class T,
class A = std::allocator<T>>
40 using a_t = std::allocator_traits<A>;
54 std::is_nothrow_default_constructible<U>::value) {
55 ::new (
static_cast<void *
>(ptr))
U;
57 template <
class U,
class... Args>
59 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:39
void construct(U *ptr, Args &&... args)
Definition: default_init_allocator.h:58
void construct(U *ptr) noexcept(std::is_nothrow_default_constructible< U >::value)
Definition: default_init_allocator.h:53
std::allocator_traits< A > a_t
Definition: default_init_allocator.h:40
#define U
Definition: ctype-tis620.cc:74
void construct(void *mem, size_t offset, Tuple &&tuple)
Definition: ut0new.h:52
Definition: default_init_allocator.h:44