5namespace Stroika::Foundation::Memory {
12 template <
typename T,
typename BASE_ALLOCATOR>
13 inline typename STLAllocator<T, BASE_ALLOCATOR>::pointer
14 STLAllocator<T, BASE_ALLOCATOR>::address (
typename STLAllocator<T, BASE_ALLOCATOR>::reference _Val)
const noexcept
18 template <
typename T,
typename BASE_ALLOCATOR>
19 inline typename STLAllocator<T, BASE_ALLOCATOR>::const_pointer
20 STLAllocator<T, BASE_ALLOCATOR>::address (
typename STLAllocator<T, BASE_ALLOCATOR>::const_reference _Val)
const noexcept
24 template <
typename T,
typename BASE_ALLOCATOR>
25 inline STLAllocator<T, BASE_ALLOCATOR>::STLAllocator ()
29 template <
typename T,
typename BASE_ALLOCATOR>
30 inline STLAllocator<T, BASE_ALLOCATOR>::STLAllocator (
const STLAllocator<T, BASE_ALLOCATOR>& from)
31 : fBaseAllocator (from.fBaseAllocator)
34 template <
typename T,
typename BASE_ALLOCATOR>
35 template <
typename OTHER>
36 inline STLAllocator<T, BASE_ALLOCATOR>::STLAllocator (
const STLAllocator<OTHER, BASE_ALLOCATOR>& from)
37 : fBaseAllocator (from.fBaseAllocator)
40 template <
typename T,
typename BASE_ALLOCATOR>
41 template <
typename OTHER>
42 inline STLAllocator<T, BASE_ALLOCATOR>& STLAllocator<T, BASE_ALLOCATOR>::operator= (
const STLAllocator<OTHER, BASE_ALLOCATOR>& rhs)
44 fBaseAllocator = rhs.from.fBaseAllocator;
47 template <
typename T,
typename BASE_ALLOCATOR>
48 inline STLAllocator<T, BASE_ALLOCATOR> STLAllocator<T, BASE_ALLOCATOR>::select_on_container_copy_construction ()
const
52 template <
typename T,
typename BASE_ALLOCATOR>
53 inline typename STLAllocator<T, BASE_ALLOCATOR>::pointer STLAllocator<T, BASE_ALLOCATOR>::allocate (size_type nElements)
56 return ((T*)fBaseAllocator.Allocate (nElements * sizeof (T)));
58 template <
typename T,
typename BASE_ALLOCATOR>
59 inline typename STLAllocator<T, BASE_ALLOCATOR>::pointer STLAllocator<T, BASE_ALLOCATOR>::allocate (size_type nElements,
const void*)
61 return (allocate (nElements));
63 template <
typename T,
typename BASE_ALLOCATOR>
64 inline void STLAllocator<T, BASE_ALLOCATOR>::deallocate (pointer ptr, size_type)
67 fBaseAllocator.Deallocate (ptr);
70 template <
typename T,
typename BASE_ALLOCATOR>
71 inline void STLAllocator<T, BASE_ALLOCATOR>::construct (pointer ptr)
75 template <
typename T,
typename BASE_ALLOCATOR>
76 inline void STLAllocator<T, BASE_ALLOCATOR>::construct (pointer ptr,
const T& v)
80 template <
typename T,
typename BASE_ALLOCATOR>
81 template <
typename OTHERT>
82 inline void STLAllocator<T, BASE_ALLOCATOR>::destroy (OTHERT* p)
86 template <
typename T,
typename BASE_ALLOCATOR>
87 template <
typename... ARGS>
88 inline void STLAllocator<T, BASE_ALLOCATOR>::construct (pointer p, ARGS&&... args)
90 ::new ((
void*)p) T{forward<ARGS> (args)...};
92 template <
typename T,
typename BASE_ALLOCATOR>
93 inline size_t STLAllocator<T, BASE_ALLOCATOR>::max_size () const noexcept
95 return numeric_limits<size_type>::max () /
sizeof (T);
97 template <
typename T,
typename BASE_ALLOCATOR>
98 inline bool STLAllocator<T, BASE_ALLOCATOR>::operator== (
const STLAllocator& )
const