6#ifndef NIM_CPP_WRAPPER_UTIL_JSON_ALLOCATOR_H_INCLUDED
7#define NIM_CPP_WRAPPER_UTIL_JSON_ALLOCATOR_H_INCLUDED
33 return static_cast<pointer>(::operator
new(n *
sizeof(T)));
44 std::memset(p, 0, n *
sizeof(T));
52 template <
typename... Args>
55 ::new (
static_cast<void*
>(p)) T(std::forward<Args>(args)...);
82template <
typename T,
typename U>
87template <
typename T,
typename U>
Definition allocator.h:17
SecureAllocator(const SecureAllocator< U > &)
Definition allocator.h:75
size_type max_size() const
Definition allocator.h:58
T value_type
Definition allocator.h:20
pointer address(reference x) const
Definition allocator.h:60
pointer allocate(size_type n)
Definition allocator.h:31
T & reference
Definition allocator.h:23
const T & const_reference
Definition allocator.h:24
std::ptrdiff_t difference_type
Definition allocator.h:26
const_pointer address(const_reference x) const
Definition allocator.h:62
const T * const_pointer
Definition allocator.h:22
std::size_t size_type
Definition allocator.h:25
T * pointer
Definition allocator.h:21
void construct(pointer p, Args &&... args)
Definition allocator.h:53
SecureAllocator()
Definition allocator.h:73
void destroy(pointer p)
Definition allocator.h:67
void deallocate(volatile pointer p, size_type n)
Definition allocator.h:43
bool operator==(const SecureAllocator< T > &, const SecureAllocator< U > &)
Definition allocator.h:83
bool operator!=(const SecureAllocator< T > &, const SecureAllocator< U > &)
Definition allocator.h:88
JSON (JavaScript Object Notation).
Definition allocator.h:14
Definition allocator.h:77