MCPcopy Create free account
hub / github.com/dengwirda/jigsaw / _wrap_alloc

Class _wrap_alloc

src/libcpp/allocators/alloc_wrap.hpp:63–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 typename A
62 >
63 class _wrap_alloc
64 {
65/*-------- pointer to base allocator: stateful allocators */
66 public :
67 typedef A allocator ;
68
69 typedef _wrap_alloc<allocator> self_type ;
70
71 typedef typename
72 allocator::size_type size_type ;
73 typedef typename
74 allocator::diff_type diff_type ;
75
76 private :
77
78 allocator *_aptr ;
79
80 public :
81
82 /*
83 --------------------------------------------------------
84 * _WRAP_ALLOC: construct alloc. wrapper.
85 --------------------------------------------------------
86 */
87
88 __inline_call _wrap_alloc (
89 allocator *_asrc = nullptr
90 ) : _aptr( _asrc ) {}
91
92 __inline_call~_wrap_alloc () = default ;
93
94 __inline_call _wrap_alloc (
95 self_type const& _src
96 ) = default ;
97 __inline_call _wrap_alloc (
98 self_type && _src
99 ) = default ;
100
101 __inline_call
102 self_type& operator = (
103 self_type const& _src
104 ) = default ;
105 __inline_call
106 self_type& operator = (
107 self_type && _src
108 ) = default ;
109
110 /*
111 --------------------------------------------------------
112 * GET/PUT_ALLOCATOR: access to base obj.
113 --------------------------------------------------------
114 */
115
116 __inline_call
117 allocator & put_allocator (
118 )
119 {
120 return *this->_aptr ;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected