59 typedef size_t size_type;
60 typedef ptrdiff_t difference_type;
62 typedef const _Tp* const_pointer;
63 typedef _Tp& reference;
64 typedef const _Tp& const_reference;
65 typedef _Tp value_type;
67 template<
typename _Tp1>
71#if __cplusplus >= 201103L
81 template<
typename _Tp1>
83 _GLIBCXX_USE_NOEXCEPT { }
88 address(reference __x)
const _GLIBCXX_NOEXCEPT
92 address(const_reference __x)
const _GLIBCXX_NOEXCEPT
98 allocate(size_type __n,
const void* = 0)
100 if (__n > this->max_size())
101 std::__throw_bad_alloc();
103 pointer __ret =
static_cast<_Tp*
>(
std::malloc(__n *
sizeof(_Tp)));
105 std::__throw_bad_alloc();
111 deallocate(pointer __p, size_type)
112 { std::free(
static_cast<void*
>(__p)); }
115 max_size()
const _GLIBCXX_USE_NOEXCEPT
116 {
return size_t(-1) /
sizeof(_Tp); }
118#if __cplusplus >= 201103L
119 template<
typename _Up,
typename... _Args>
121 construct(_Up* __p, _Args&&... __args)
124 template<
typename _Up>
126 destroy(_Up* __p) { __p->~_Up(); }
131 construct(pointer __p,
const _Tp& __val)
132 { ::new((
void *)__p) value_type(__val); }
135 destroy(pointer __p) { __p->~_Tp(); }