40 typedef _Ty value_type;
41 typedef value_type* pointer;
42 typedef value_type& reference;
43 typedef const value_type* const_pointer;
44 typedef const value_type& const_reference;
45 typedef size_t size_type;
46 typedef ptrdiff_t difference_type;
51 template <
class _Other>
54 template <
class _Other>
59 pointer address(reference _ref)
const noexcept {
return &_ref; }
60 const_pointer address(const_reference _ref)
const noexcept {
return &_ref; }
62 template <
class _Other,
class... _Args>
63 void construct(_Other* _ptr, _Args&&... _args) {
64 ::new (
static_cast<void*
>(_ptr)) _Other(std::forward<_Args>(_args)...);
67 template <
class _Other>
68 void destroy(_Other* _ptr) {
74 pointer allocate(
size_t _count)
noexcept {
77 return reinterpret_cast<pointer
>(memory::default_allocator()->Allocate(
78 sizeof(value_type) * _count,
alignof(value_type)));
82 void deallocate(pointer _ptr, size_type)
noexcept {
83 memory::default_allocator()->Deallocate(_ptr);
86 size_type max_size() const noexcept {
87 return (~size_type(0)) /
sizeof(value_type);