xtd 0.2.0
Loading...
Searching...
No Matches

◆ data() [1/2]

template<typename type_t , typename allocator_t = xtd::collections::generic::helpers::allocator<typename std::conditional<std::is_same<bool, type_t>::value, char, type_t>::type>>
virtual pointer xtd::collections::generic::list< type_t, allocator_t >::data ( )
inlinevirtualnoexcept

Returns pointer to the underlying array serving as element storage.

Returns
Pointer to the underlying element storage. For non-empty containers, the returned pointer compares equal to the address of the first element.
Remarks
The pointer is such that range [xtd::collections::generic::list::data(), xtd::collections::generic::list::data() + xtd::collections::generic::list::size()) is always a valid range, even if the container is empty (xtd::collections::generic::list::data() is not dereferenceable in that case).