[#bsl-List_AllocAndSizeWrapper] = xref:bsl.adoc[bsl]::List_AllocAndSizeWrapper :relfileprefix: ../ :mrdocs: This struct is a wrapper around the allocator and size data members of a `list`. It takes advantage of the empty‐base optimization (EBO) so that if the allocator is stateless, it takes up no space. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE, class ALLOCATOR> class List_AllocAndSizeWrapper : public allocator_traits<ALLOCATOR>::rebind_traits<List_Node<VALUE>>::allocator_type ---- == Description TBD: This struct should eventually be replaced by the use of a general EBO‐enabled component that provides a `pair`‐like interface. (A properly‐optimized `tuple` would do the job.) == Base Classes [cols="1,4"] |=== | Name| Description | `allocator_traits<ALLOCATOR>::rebind_traits<List_Node<VALUE>>::allocator_type` | |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/List_AllocAndSizeWrapper/2constructor.adoc[`List_AllocAndSizeWrapper`] [.small]#[constructor]# | Create an allocator and size wrapper having the specified `basicAllocator` and (initial) `size`. | xref:bsl/List_AllocAndSizeWrapper/size-0a.adoc[`size`] | Return a reference providing modifiable access to the `size` field of this object. | xref:bsl/List_AllocAndSizeWrapper/size-08.adoc[`size`] | Return a reference providing non‐modifiable access to the `size` field of this object. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#