Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.
bool
exactly as other types unlike std::vector with xtd::collections::generic::helpers::allocator instead std::allocator. When the type_t
is bool
The underlying std::vector uses xtd::byte. type_t
is determined as follows. If type type_t
implements the xtd::iequatable <type_t> generic interface, then the equality comparer is the xtd::iequatable::equals method of that interface; otherwise, if the type_t
inherits of the xtd::object class, the default equality comparer is xtd::object::equals. If the type_t
does not implement the xtd::iequality <type_t> interface and does not inherit from xtd::object, the type_t
must implement the euqality operator : bool operator ==(const type_t& rhs) const noexcept
.type_t
is determined as follows. If type type_t
implements the xtd::icomparable <type_t> generic interface, then the default comparer is the xtd::icomaprable::compare_to method of that interface. If the type_t
type does not implement the xtd::icomparable <type_t> interface, the type_t
type must implement the less than operator : bool operator <(const type_t& rhs) const noexcept
. The parameterless constructor is used to create a list of strings with the default capacity. The xtd::collections::generic::list::capacity property is displayed and then the xtd::collections::generic::list::add method is used to add several items. The items are listed, and the xtd::collections::generic::list::capacity property is displayed again, along with the xtd::collections::generic::list::count property, to show that the capacity has been increased as needed.
The xtd::collections::generic::list::contains method is used to test for the presence of an item in the list, the Insert method is used to insert a new item in the middle of the list, and the contents of the list are displayed again.
The default xtd::collections::generic::list::operator [] is used to retrieve an item, the xtd::collections::generic::list::remove method is used to remove the first instance of the duplicate item added earlier, and the contents are displayed again. The xtd::collections::generic::list::remove method always removes the first instance it encounters.
The xtd::collections::generic::list::trim_excess method is used to reduce the capacity to match the count, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed. If the unused capacity had been less than 10 percent of total capacity, the list would not have been resized.
Finally, the xtd::collections::generic::list::clear method is used to remove all items from the list, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed.
Public Aliases | |
using | value_type = type_t |
Represents the list value type. | |
using | allocator_type = typename xtd::collections::generic::helpers::allocator< typename std::conditional< std::is_same< bool, value_type >::value, xtd::byte, value_type >::type > |
Represents the list allocator type. | |
using | base_type = typename std::vector< typename std::conditional< std::is_same< bool, value_type >::value, xtd::byte, value_type >::type, allocator_type > |
Represents the list base type. | |
using | size_type = xtd::size |
Represents the list size type (usually xtd::size). | |
using | difference_type = xtd::ptrdiff |
Represents the list difference type (usually xtd::ptrdiff). | |
using | reference = value_type & |
Represents the reference of list value type. | |
using | const_reference = const value_type & |
Represents the const reference of list value type. | |
using | pointer = value_type * |
Represents the pointer of list value type. | |
using | const_pointer = const value_type * |
Represents the const pointer of list value type. | |
using | iterator = typename xtd::collections::generic::ilist< type_t >::iterator |
Represents the iterator of list value type. | |
using | const_iterator = typename xtd::collections::generic::ilist< type_t >::const_iterator |
Represents the const iterator of list value type. | |
using | reverse_iterator = typename base_type::reverse_iterator |
Represents the reverse iterator of list value type. | |
using | const_reverse_iterator = typename base_type::const_reverse_iterator |
Represents the const reverse iterator of list value type. | |
using | read_only_collection = typename xtd::collections::object_model::read_only_collection< value_type > |
Represents the read only collection of of list. | |
Public Fields | |
static constexpr size_type | npos |
This is a special value equal to the maximum value representable by the type size_type. | |
Public Constructors | |
list () noexcept=default | |
Initializes a new instance of the xtd::collections::generic::list class that is empty. | |
list (const allocator_type &alloc) noexcept | |
Constructs an empty container with the given allocator. | |
list (size_type count, const type_t &value, const allocator_type &alloc=allocator_type()) | |
Constructs the container with specified count copies of elements with specified value. | |
list (size_type count, const allocator_type &alloc=allocator_type()) | |
Constructs the container with specified count default-inserted instances of type_t. No copies are made. | |
template<typename input_iterator_t > | |
list (input_iterator_t first, input_iterator_t last, const allocator_type &alloc=allocator_type()) | |
Constructs the container with the contents of the range [first, last). | |
list (const xtd::collections::generic::ienumerable< type_t > &collection, const allocator_type &alloc=allocator_type()) | |
Initializes a new instance of the xtd::collections::generic::list <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied. | |
list (const list &list) | |
Default copy constructor with specified list. | |
list (const base_type &list) | |
Copy constructor with specified base type list. | |
list (const list &list, const allocator_type &alloc) | |
Default copy constructor with specified list, and allocator. | |
list (const base_type &list, const allocator_type &alloc) | |
Default copy constructor with specified base type list, and allocator. | |
list (std::initializer_list< type_t > items, const allocator_type &alloc=allocator_type()) | |
Constructs the container with the contents of the specified initializer list, and allocator. | |
list (list &&other) | |
Move constructor with specified list. | |
list (base_type &&other) | |
Move constructor with specified base type list. | |
list (list &&other, const allocator_type &alloc) | |
Move constructor with specified list, and allocator. | |
list (base_type &&other, const allocator_type &alloc) | |
Move constructor with specified base tyoe list, and allocator. | |
Public Properties | |
virtual reference | back () |
Returns a reference to the last element in the container. | |
virtual const_reference | back () const |
Returns a reference to the last element in the container. | |
const_iterator | begin () const noexcept override |
Returns an iterator to the first element of the enumarable. | |
iterator | begin () noexcept override |
Returns an iterator to the first element of the enumarable. | |
virtual size_type | capacity () const noexcept |
Gets the total number of elements the internal data structure can hold without resizing. | |
virtual void | capacity (size_type value) |
Sets the total number of elements the internal data structure can hold without resizing. | |
const_iterator | cbegin () const noexcept override |
Returns an iterator to the first element of the enumarable. | |
const_iterator | cend () const noexcept override |
Returns an iterator to the element following the last element of the enumarable. | |
size_type | count () const noexcept override |
Gets the number of elements contained in the xtd::collections::generic::list <type_t>. | |
virtual const_reverse_iterator | crbegin () const noexcept |
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend(). | |
virtual const_reverse_iterator | crend () const noexcept |
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior. | |
virtual pointer | data () noexcept |
Returns pointer to the underlying array serving as element storage. | |
virtual const_pointer | data () const noexcept |
Returns pointer to the underlying array serving as element storage. | |
virtual bool | empty () const noexcept |
Checks if the container has no elements, i.e. whether xtd::collections::generic::list::begin() == xtd::collections::generic::list::end(). | |
const_iterator | end () const noexcept override |
Returns an iterator to the element following the last element of the enumarable. | |
iterator | end () noexcept override |
Returns an iterator to the element following the last element of the enumarable. | |
virtual reference | front () |
Returns a reference to the first element in the container. | |
virtual const_reference | front () const |
Returns a reference to the first element in the container. | |
bool | is_fixed_size () const noexcept override |
Gets a value indicating whether the xtd::collections::generic::ilist <type_t> has a fixed size. | |
bool | is_read_only () const noexcept override |
Gets a value indicating whether the xtd::collections::generic::icollection <type_t> is read-only. | |
bool | is_synchronized () const noexcept override |
Gets a value indicating whether access to the xtd::collections::generic::icollection <type_t> is synchronized (thread safe). | |
virtual const base_type & | items () const noexcept |
Returns the underlying base type items. | |
virtual base_type & | items () noexcept |
Returns the underlying base type items. | |
virtual size_type | max_size () const noexcept |
Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. std::distance(xtd::collections::generic::list::begin(), xtd::collections::generic::list::end()) for the largest container. | |
virtual reverse_iterator | rbegin () noexcept |
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend(). | |
virtual const_reverse_iterator | rbegin () const noexcept |
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend(). | |
virtual reverse_iterator | rend () noexcept |
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior. | |
virtual const_reverse_iterator | rend () const noexcept |
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior. | |
virtual size_type | size () const noexcept |
Returns the number of elements in the container, i.e. std::distance(xtd::collections::generic::list::begin(), xtd::collections::generic::list::end()). | |
const xtd::object & | sync_root () const noexcept override |
Gets an object that can be used to synchronize access to the the xtd::collections::generic::icollection <type_t>. | |
Public Methods | |
void | add (const type_t &item) override |
Adds an object to the end of the xtd::collections::generic::list <type_t>. | |
void | add_range (const xtd::collections::generic::ienumerable< type_t > &enumerable) |
Adds copy of elements from the specified collection to the end of the xtd::collections::generic::list <type_t>. | |
void | add_range (std::initializer_list< type_t > il) |
Adds copy of elements from the specified collection to the end of the xtd::collections::generic::list <type_t>. | |
void | assign (size_type count, const type_t &value) |
Replaces the contents with count copies of value value. | |
template<typename input_iterator_t > | |
void | assign (input_iterator_t first, input_iterator_t last) |
Replaces the contents with copies of those in the range [first, last). | |
read_only_collection | as_read_only () const noexcept |
Returns a read-only xtd::collections::object_model::read_only_collection <type_t> wrapper for the current collection. | |
virtual void | assign (std::initializer_list< type_t > items) |
Replaces the contents with the elements from the initializer list items. | |
virtual reference | at (size_type index) |
Returns a reference to the element at specified location pos, with bounds checking. | |
virtual const_reference | at (size_type index) const |
Returns a reference to the element at specified location pos, with bounds checking. | |
void | clear () override |
Removes all items from the xtd::collections::generic::icollection <type_t>. | |
bool | contains (const type_t &value) const noexcept override |
Determines whether the xtd::collections::generic::icollection <type_t> contains a specific value. | |
virtual void | copy_to (xtd::array< type_t > &array) const |
Copies the entire xtd::collections::generic::list <type_t> to a compatible one-dimensional array. | |
void | copy_to (xtd::array< type_t > &array, size_type array_index) const override |
Copies the elements of the xtd::collections::generic::icollection <type_t> to an xtd::array, starting at a particular xtd::array index. | |
virtual void | copy_to (size_type index, xtd::array< type_t > &array, size_type array_index, size_type count) const |
Copies the entire xtd::collections::generic::list <type_t> to a compatible one-dimensional array, starting at the specified index of the target array. | |
template<typename... args_t> | |
iterator | emplace (const_iterator pos, args_t &&... args) |
Inserts a new element into the container directly before pos . | |
template<typename... args_t> | |
reference | emplace_back (args_t &&... args) |
Appends a new element to the end of the container. The element is constructed through std::allocator_traits::construct, which typically uses placement-new to construct the element in-place at the location provided by the container. The arguments args... are forwarded to the constructor as std::forward<Args>(args)... . | |
bool | equals (const object &obj) const noexcept override |
Determines whether the specified object is equal to the current object. | |
bool | equals (const list &rhs) const noexcept override |
virtual iterator | erase (const_iterator pos) |
Erases the specified elements from the container. | |
virtual iterator | erase (const_iterator first, const_iterator last) |
Erases the specified elements from the container. | |
virtual allocator_type | get_allocator () const |
Returns the allocator associated with the container. | |
virtual base_type & | get_base_type () noexcept |
Returns the underlying base type. | |
virtual const base_type & | get_base_type () const noexcept |
Returns the underlying base type. | |
enumerator< value_type > | get_enumerator () const noexcept override |
Returns an enumerator that iterates through a collection. | |
list | get_range (size_type index, size_type count) |
Creates a shallow copy of a range of elements in the source xtd::collections::generic::list <type_t>. | |
size_type | index_of (const type_t &value) const noexcept override |
Determines the index of a specific item in the xtd::collections::generic::list <type_t>. | |
virtual size_type | index_of (const type_t &value, size_type index) const |
Determines the index of a specific item in the xtd::collections::generic::list <type_t>. | |
virtual size_type | index_of (const type_t &value, size_type index, size_type count) const |
Determines the index of a specific item in the xtd::collections::generic::list <type_t>. | |
virtual iterator | insert (const_iterator pos, const type_t &value) |
Inserts elements at the specified location in the container. | |
virtual iterator | insert (const_iterator pos, const type_t &&value) |
Inserts elements at the specified location in the container. | |
virtual iterator | insert (const_iterator pos, size_type count, const type_t &value) |
Inserts elements at the specified location in the container. | |
template<typename input_iterator_t > | |
iterator | insert (const_iterator pos, input_iterator_t first, input_iterator_t last) |
Inserts elements at the specified location in the container. | |
virtual iterator | insert (const_iterator pos, const std::initializer_list< type_t > &items) |
Inserts elements at the specified location in the container. | |
void | insert (size_type index, const type_t &value) override |
Inserts an element into the xtd::collections::generic::list <type_t> at the specified index. | |
virtual void | insert_range (size_type index, const xtd::collections::generic::ienumerable< type_t > &enumerable) |
Inserts copy of elements from a collection into the xtd::collections::generic::list <type_t> at the specified index. | |
virtual void | insert_range (size_type index, const std::initializer_list< type_t > &items) |
Inserts copy of elements from a collection into the xtd::collections::generic::list <type_t> at the specified index. | |
virtual void | pop_back () |
Removes the last element of the container. | |
virtual void | push_back (const type_t &value) |
Appends the given element value to the end of the container. | |
virtual void | push_back (type_t &&value) |
Appends the given element value to the end of the container. | |
bool | remove (const type_t &item) override |
Removes the first occurrence of a specific object from the xtd::collections::generic::icollection <type_t>. | |
void | remove_at (size_type index) override |
Removes the element at the specified index of the xtd::collections::generic::list <type_t>. | |
virtual void | remove_range (size_type index, size_type count) |
Removes a range of elements from the xtd::collections::generic::list <type_t>. | |
virtual void | reserve (size_type new_cap) |
Increase the capacity of the vector (the total number of elements that the vector can hold without requiring reallocation) to a value that's greater or equal to new_cap . If new_cap is greater than the current capacity(), new storage is allocated, otherwise the function does nothing. | |
virtual void | resize (size_type count) |
Resizes the container to contain count elements, does nothing if count == size(). @param count The new size of the container. @remarks If the current size is greater than count, the container is reduced to its first countelements. @remarks If the current size is less than count`, additional default-inserted elements are appended. | |
virtual void | resize (size_type count, const value_type &value) |
Resizes the container to contain count elements, does nothing if count == size(). @param count The new size of the container. @param value The value to initialize the new elements with. @remarks If the current size is greater than count, the container is reduced to its first countelements. @remarks If the current size is less than count, additional copies of value` are appended. | |
virtual void | shrink_to_fit () |
Requests the removal of unused capacity. | |
virtual void | swap (list &other) noexcept |
Exchanges the contents and capacity of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements. | |
virtual xtd::array< value_type > | to_array () const noexcept |
Copies the elements of the xtd::collections::generic::list <type_t> to a new array. | |
string | to_string () const noexcept override |
Returns a xtd::string that represents the current object. | |
virtual void | trim_excess () |
Sets the capacity to the actual number of elements in the xtd::collections::generic::list <type_t>, if that number is less than a threshold value. | |
Public Operators | |
list & | operator= (const list &other)=default |
Copy assignment operator. Replaces the contents with a copy of the contents of other. | |
list & | operator= (list &&other) noexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards. | |
list & | operator= (std::initializer_list< type_t > &items) |
Replaces the contents with those identified by initializer list ilist. | |
const_reference | operator[] (size_type index) const override |
Returns a reference to the element at specified location index. | |
reference | operator[] (size_type index) override |
Returns a reference to the element at specified location index. | |
operator const base_type & () const noexcept | |
Returns a reference to the underlying base type. | |
operator base_type & () noexcept | |
Returns a reference to the underlying base type. | |
Additional Inherited Members | |
![]() | |
using | iterator = typename icollection< type_t >::iterator |
Represents the iterator of xtd::collections::generic::ienumerable value type. | |
using | const_iterator = typename icollection< type_t >::const_iterator |
Represents the const iterator of xtd::collections::generic::ienumerable value type. | |
![]() | |
using | iterator = typename ienumerable< type_t >::iterator |
Represents the iterator of xtd::collections::generic::ienumerable value type. | |
using | const_iterator = typename ienumerable< type_t >::const_iterator |
Represents the const iterator of xtd::collections::generic::ienumerable value type. | |
![]() | |
using | iterator = typename enumerable_iterators< type_t, ienumerable< type_t > >::iterator |
Represents the iterator of xtd::collections::generic::ienumerable value type. | |
using | const_iterator = typename enumerable_iterators< type_t, ienumerable< type_t > >::const_iterator |
Represents the const iterator of xtd::collections::generic::ienumerable value type. | |
![]() | |
using | const_iterator = const iterator |
Represents the const iterator of enumarable value type. | |
![]() | |
static constexpr xtd::size | npos |
This is a special value equal to the maximum value representable by the type xtd::size. | |
![]() | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
![]() | |
![]() | |
![]() | |
![]() | |
![]() | |
virtual bool | equals (const type_t &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
![]() | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<typename object_a_t , typename object_b_t > | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
using xtd::collections::generic::list< type_t, allocator_t >::value_type = type_t |
Represents the list value type.
using xtd::collections::generic::list< type_t, allocator_t >::allocator_type = typename xtd::collections::generic::helpers::allocator<typename std::conditional<std::is_same<bool, value_type>::value, xtd::byte, value_type>::type> |
Represents the list allocator type.
using xtd::collections::generic::list< type_t, allocator_t >::base_type = typename std::vector<typename std::conditional<std::is_same<bool, value_type>::value, xtd::byte, value_type>::type, allocator_type> |
Represents the list base type.
using xtd::collections::generic::list< type_t, allocator_t >::size_type = xtd::size |
Represents the list size type (usually xtd::size).
using xtd::collections::generic::list< type_t, allocator_t >::difference_type = xtd::ptrdiff |
Represents the list difference type (usually xtd::ptrdiff).
using xtd::collections::generic::list< type_t, allocator_t >::reference = value_type& |
Represents the reference of list value type.
using xtd::collections::generic::list< type_t, allocator_t >::const_reference = const value_type& |
Represents the const reference of list value type.
using xtd::collections::generic::list< type_t, allocator_t >::pointer = value_type* |
Represents the pointer of list value type.
using xtd::collections::generic::list< type_t, allocator_t >::const_pointer = const value_type* |
Represents the const pointer of list value type.
using xtd::collections::generic::list< type_t, allocator_t >::iterator = typename xtd::collections::generic::ilist<type_t>::iterator |
Represents the iterator of list value type.
using xtd::collections::generic::list< type_t, allocator_t >::const_iterator = typename xtd::collections::generic::ilist<type_t>::const_iterator |
Represents the const iterator of list value type.
using xtd::collections::generic::list< type_t, allocator_t >::reverse_iterator = typename base_type::reverse_iterator |
Represents the reverse iterator of list value type.
using xtd::collections::generic::list< type_t, allocator_t >::const_reverse_iterator = typename base_type::const_reverse_iterator |
Represents the const reverse iterator of list value type.
using xtd::collections::generic::list< type_t, allocator_t >::read_only_collection = typename xtd::collections::object_model::read_only_collection<value_type> |
Represents the read only collection of of list.
|
defaultnoexcept |
Initializes a new instance of the xtd::collections::generic::list class that is empty.
|
inlineexplicitnoexcept |
Constructs an empty container with the given allocator.
alloc | The allocator to use for all memory allocations of this container. |
|
inline |
Constructs the container with specified count copies of elements with specified value.
count | The size of the container. |
value | The value to initialize elements of the container with. |
alloc | The allocator to use for all memory allocations of this container. |
|
inlineexplicit |
Constructs the container with specified count default-inserted instances of type_t. No copies are made.
count | The size of the container. |
alloc | The allocator to use for all memory allocations of this container. |
|
inline |
Constructs the container with the contents of the range [first, last).
first | The first iterator the range to copy the elements from. |
last | The last iterator the range to copy the elements from. |
alloc | The allocator to use for all memory allocations of this container. |
|
inline |
Initializes a new instance of the xtd::collections::generic::list <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
collection | The collection whose elements are copied to the new list. |
alloc | The allocator to use for all memory allocations of this container. |
|
inline |
Default copy constructor with specified list.
list | The xtd::collections::generic::list which elements will be inserted from. |
|
inline |
Copy constructor with specified base type list.
list | The xtd::collections::generic::list::base_type which elements will be inserted from. |
|
inline |
Default copy constructor with specified list, and allocator.
list | The xtd::collections::generic::list which elements will be inserted from. |
alloc | The allocator to use for all memory allocations of this container. |
|
inline |
Default copy constructor with specified base type list, and allocator.
list | The xtd::collections::generic::list which elements will be inserted from. |
alloc | The allocator to use for all memory allocations of this container. |
|
inline |
Constructs the container with the contents of the specified initializer list, and allocator.
items | The initializer list to initialize the elements of the container with. |
alloc | The allocator to use for all memory allocations of this container. |
|
inline |
Move constructor with specified list.
list | The xtd::collections::generic::list::base_type which elements will be moved from. |
|
inline |
Move constructor with specified base type list.
list | The xtd::collections::generic::list::base_type which elements will be moved from. |
|
inline |
Move constructor with specified list, and allocator.
list | The xtd::collections::generic::list::base_type which elements will be moved from. |
alloc | The allocator to use for all memory allocations of this container. |
|
inline |
Move constructor with specified base tyoe list, and allocator.
list | The xtd::collections::generic::list::base_type which elements will be moved from. |
alloc | The allocator to use for all memory allocations of this container. |
|
inlinevirtual |
Returns a reference to the last element in the container.
|
inlinevirtual |
Returns a reference to the last element in the container.
|
inlineoverridevirtualnoexcept |
Returns an iterator to the first element of the enumarable.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, ienumerable< type_t > >.
|
inlineoverridevirtualnoexcept |
Returns an iterator to the first element of the enumarable.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, ienumerable< type_t > >.
|
inlinevirtualnoexcept |
Gets the total number of elements the internal data structure can hold without resizing.
The parameterless constructor is used to create a list of strings with the default capacity. The xtd::collections::generic::list::capacity property is displayed and then the xtd::collections::generic::list::add method is used to add several items. The items are listed, and the xtd::collections::generic::list::capacity property is displayed again, along with the xtd::collections::generic::list::count property, to show that the capacity has been increased as needed.
The xtd::collections::generic::list::contains method is used to test for the presence of an item in the list, the Insert method is used to insert a new item in the middle of the list, and the contents of the list are displayed again.
The default xtd::collections::generic::list::operator [] is used to retrieve an item, the xtd::collections::generic::list::remove method is used to remove the first instance of the duplicate item added earlier, and the contents are displayed again. The xtd::collections::generic::list::remove method always removes the first instance it encounters.
The xtd::collections::generic::list::trim_excess method is used to reduce the capacity to match the count, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed. If the unused capacity had been less than 10 percent of total capacity, the list would not have been resized.
Finally, the xtd::collections::generic::list::clear method is used to remove all items from the list, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed.
|
inlinevirtual |
Sets the total number of elements the internal data structure can hold without resizing.
The parameterless constructor is used to create a list of strings with the default capacity. The xtd::collections::generic::list::capacity property is displayed and then the xtd::collections::generic::list::add method is used to add several items. The items are listed, and the xtd::collections::generic::list::capacity property is displayed again, along with the xtd::collections::generic::list::count property, to show that the capacity has been increased as needed.
The xtd::collections::generic::list::contains method is used to test for the presence of an item in the list, the Insert method is used to insert a new item in the middle of the list, and the contents of the list are displayed again.
The default xtd::collections::generic::list::operator [] is used to retrieve an item, the xtd::collections::generic::list::remove method is used to remove the first instance of the duplicate item added earlier, and the contents are displayed again. The xtd::collections::generic::list::remove method always removes the first instance it encounters.
The xtd::collections::generic::list::trim_excess method is used to reduce the capacity to match the count, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed. If the unused capacity had been less than 10 percent of total capacity, the list would not have been resized.
Finally, the xtd::collections::generic::list::clear method is used to remove all items from the list, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed.
|
inlineoverridevirtualnoexcept |
Returns an iterator to the first element of the enumarable.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, ienumerable< type_t > >.
|
inlineoverridevirtualnoexcept |
Returns an iterator to the element following the last element of the enumarable.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, ienumerable< type_t > >.
|
inlineoverridevirtualnoexcept |
Gets the number of elements contained in the xtd::collections::generic::list <type_t>.
The parameterless constructor is used to create a list of strings with the default capacity. The xtd::collections::generic::list::capacity property is displayed and then the xtd::collections::generic::list::add method is used to add several items. The items are listed, and the xtd::collections::generic::list::capacity property is displayed again, along with the xtd::collections::generic::list::count property, to show that the capacity has been increased as needed.
The xtd::collections::generic::list::contains method is used to test for the presence of an item in the list, the Insert method is used to insert a new item in the middle of the list, and the contents of the list are displayed again.
The default xtd::collections::generic::list::operator [] is used to retrieve an item, the xtd::collections::generic::list::remove method is used to remove the first instance of the duplicate item added earlier, and the contents are displayed again. The xtd::collections::generic::list::remove method always removes the first instance it encounters.
The xtd::collections::generic::list::trim_excess method is used to reduce the capacity to match the count, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed. If the unused capacity had been less than 10 percent of total capacity, the list would not have been resized.
Finally, the xtd::collections::generic::list::clear method is used to remove all items from the list, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed.
Implements xtd::collections::generic::icollection< type_t >.
|
inlinevirtualnoexcept |
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend().
|
inlinevirtualnoexcept |
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
inlinevirtualnoexcept |
Returns pointer to the underlying array serving as element storage.
|
inlinevirtualnoexcept |
Returns pointer to the underlying array serving as element storage.
|
inlinevirtualnoexcept |
Checks if the container has no elements, i.e. whether xtd::collections::generic::list::begin() == xtd::collections::generic::list::end().
|
inlineoverridevirtualnoexcept |
Returns an iterator to the element following the last element of the enumarable.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, ienumerable< type_t > >.
|
inlineoverridevirtualnoexcept |
Returns an iterator to the element following the last element of the enumarable.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, ienumerable< type_t > >.
|
inlinevirtual |
Returns a reference to the first element in the container.
|
inlinevirtual |
Returns a reference to the first element in the container.
|
inlineoverridevirtualnoexcept |
Gets a value indicating whether the xtd::collections::generic::ilist <type_t> has a fixed size.
Implements xtd::collections::generic::ilist< type_t >.
|
inlineoverridevirtualnoexcept |
Gets a value indicating whether the xtd::collections::generic::icollection <type_t> is read-only.
Implements xtd::collections::generic::icollection< type_t >.
|
inlineoverridevirtualnoexcept |
Gets a value indicating whether access to the xtd::collections::generic::icollection <type_t> is synchronized (thread safe).
synchronized
method, which provides a synchronized wrapper around the underlying collection. Implements xtd::collections::generic::icollection< type_t >.
|
inlinevirtualnoexcept |
Returns the underlying base type items.
|
inlinevirtualnoexcept |
Returns the underlying base type items.
|
inlinevirtualnoexcept |
Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. std::distance(xtd::collections::generic::list::begin(), xtd::collections::generic::list::end()) for the largest container.
|
inlinevirtualnoexcept |
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend().
|
inlinevirtualnoexcept |
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend().
|
inlinevirtualnoexcept |
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
inlinevirtualnoexcept |
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
inlinevirtualnoexcept |
Returns the number of elements in the container, i.e. std::distance(xtd::collections::generic::list::begin(), xtd::collections::generic::list::end()).
|
inlineoverridevirtualnoexcept |
Gets an object that can be used to synchronize access to the the xtd::collections::generic::icollection <type_t>.
sync_root
property. synchronized
method, which provides a synchronized wrapper around the underlying collection. However, derived classes can provide their own synchronized version of the collection using the xtd::collections::generic::icollection::sync_root property. The synchronizing code must perform operations on the xtd::collections::generic::icollection::sync_root property of the collection, not directly on the collection. This ensures proper operation of collections that are derived from other objects. Specifically, it maintains proper synchronization with other threads that might be simultaneously modifying the collection instance. synchronized
method on a collection, the expected usage for the xtd::collections::generic::icollection::sync_root looks as follows: Implements xtd::collections::generic::icollection< type_t >.
|
inlineoverridevirtual |
Adds an object to the end of the xtd::collections::generic::list <type_t>.
item | The object to be added to the end of the xtd::collections::generic::list <type_t>. @)ar Examples The following example demonstrates how to add, remove, and insert a simple business object in a xtd::collections::generic::list <type_t>. #include <xtd/xtd>
using namespace xtd;
using namespace xtd::collections::generic;
// Simple business object. A part_id is used to identify the type of part
// but the part name can change.
public:
string part_name;
int part_id = 0;
part() = default;
part(const string& name, int id) : part_name {name}, part_id {id} {}
string to_string() const noexcept override {return string::format("ID: {} Name: {}", part_id, part_name);}
bool equals(const object& obj) const noexcept override {return is<part>(obj) && equals(as<part>(obj));}
};
class example {
public:
static auto main() -> void {
// Create a list of parts.
auto parts = list<part>();
// Add parts to the list.
parts.add(part {"crank arm", 1234});
parts.add(part {"chain ring", 1334});
parts.add(part {"regular seat", 1434});
parts.add(part {"banana seat", 1444});
parts.add(part {"cassette", 1534});
parts.add(part {"shift lever", 1634});
// Write out the parts in the list. This will call the overridden ToString method
// in the part class.
console::write_line();
for (auto part : parts)
console::write_line(part);
// Check the list for part #1734. This calls the iequatable::equals method of the part class, which checks the partId for equality.
console::write_line("\ncontains(\"1734\"): {0}", parts.contains(part {"", 1734}));
// Insert a new item at position 2.
console::write_line("\nInsert(2, \"1834\")");
parts.insert(2, part {"brake lever", 1834});
//console::write_line();
for (auto part : parts)
console::write_line(part);
console::write_line("\nparts[3]: {0}", parts[3]);
console::write_line("\nremove(\"1534\")");
// This will remove part 1534 even though the partName is different, because the equals method only checks part_id for equality.
parts.remove(part {"cogs", 1534});
console::write_line();
for (auto part : parts)
console::write_line(part);
console::write_line("\nremove_at(3)");
// This will remove the part at index 3.
parts.remove_at(3);
console::write_line();
for (auto part : parts)
console::write_line(part);
}
};
startup_(example::main);
// This code produces the following output :
//
//
// ID: 1234 Name: crank arm
// ID: 1334 Name: chain ring
// ID: 1434 Name: regular seat
// ID: 1444 Name: banana seat
// ID: 1534 Name: cassette
// ID: 1634 Name: shift lever
//
// contains("1734"): false
//
// Insert(2, "1834")
// ID: 1234 Name: crank arm
// ID: 1334 Name: chain ring
// ID: 1834 Name: brake lever
// ID: 1434 Name: regular seat
// ID: 1444 Name: banana seat
// ID: 1534 Name: cassette
// ID: 1634 Name: shift lever
//
// parts[3]: ID: 1434 Name: regular seat
//
// remove("1534")
//
// ID: 1234 Name: crank arm
// ID: 1334 Name: chain ring
// ID: 1834 Name: brake lever
// ID: 1434 Name: regular seat
// ID: 1444 Name: banana seat
// ID: 1634 Name: shift lever
//
// remove_at(3)
//
// ID: 1234 Name: crank arm
// ID: 1334 Name: chain ring
// ID: 1834 Name: brake lever
// ID: 1444 Name: banana seat
// ID: 1634 Name: shift lever
|
Other properties and methods are used to search for, insert, and remove elements from the list, and finally to clear the list.
Implements xtd::collections::generic::icollection< type_t >.
|
inline |
Adds copy of elements from the specified collection to the end of the xtd::collections::generic::list <type_t>.
collection | The collection whose elements should be added to the end of the xtd::collections::generic::list <type_t>. |
|
inline |
Adds copy of elements from the specified collection to the end of the xtd::collections::generic::list <type_t>.
il | The collection whose elements should be added to the end of the xtd::collections::generic::list <type_t>. |
|
inline |
Replaces the contents with count copies of value value.
count | The new size of the container. |
value | The value to initialize elements of the container with. |
|
inline |
Replaces the contents with copies of those in the range [first, last).
first | The first iterator the range to copy the elements from. |
last | The last iterator the range to copy the elements from. |
|
inlinenoexcept |
Returns a read-only xtd::collections::object_model::read_only_collection <type_t> wrapper for the current collection.
|
inlinevirtual |
Replaces the contents with the elements from the initializer list items.
items | the initializer list to copy the values from. |
|
inlinevirtual |
Returns a reference to the element at specified location pos, with bounds checking.
index | The position of the element to return. |
std::out_of_range | If pos is not within the range of the container. |
|
inlinevirtual |
Returns a reference to the element at specified location pos, with bounds checking.
index | The position of the element to return. |
std::out_of_range | If pos is not within the range of the container. |
|
inlineoverridevirtual |
Removes all items from the xtd::collections::generic::icollection <type_t>.
xtd::not_supported_exception | The xtd::collections::generic::icollection <type_t> is read-only. |
Implements xtd::collections::generic::icollection< type_t >.
|
inlineoverridevirtualnoexcept |
Determines whether the xtd::collections::generic::icollection <type_t> contains a specific value.
item | The object to locate in the xtd::collections::generic::icollection <type_t>. |
Implements xtd::collections::generic::icollection< type_t >.
|
inlinevirtual |
Copies the entire xtd::collections::generic::list <type_t> to a compatible one-dimensional array.
array | The one-dimensional xtd::array that is the destination of the elements copied from ICollection. The xtd::array must have zero-based indexing. |
ArgumentNullException | array is null. |
ArgumentException | The number of elements in the source xtd::collections::generic::list <type_t> is greater than the number of elements that the destination array can contain. |
|
inlineoverridevirtual |
Copies the elements of the xtd::collections::generic::icollection <type_t> to an xtd::array, starting at a particular xtd::array index.
array | The one-dimensional xtd::array that is the destination of the elements copied from xtd::collections::generic::icollection <type_t>. The xtd::array must have zero-based indexing. |
array_index | The zero-based index in array at which copying begins. |
xtd::argument_exception | The number of elements in the source xtd::collections::generic::icollection <type_t> is greater than the available space from `array_index` to the end of the destination `array`. |
Implements xtd::collections::generic::icollection< type_t >.
|
inlinevirtual |
Copies the entire xtd::collections::generic::list <type_t> to a compatible one-dimensional array, starting at the specified index of the target array.
index | The zero-based index in the source xtd::collections::generic::list <type_t> at which copying begins. |
array | The one-dimensional xtd::array that is the destination of the elements copied from ICollection. The xtd::array must have zero-based indexing. |
arrayIndex | The zero-based index in array at which copying begins; |
count | The number of elements to copy. |
ArgumentNullException | array is null. |
ArgumentOutOfRangeException | The arrayIndex or count is less than 0. |
ArgumentException | The number of elements in the source xtd::collections::generic::list <type_t> is greater than the number of elements that the destination array can contain. |
|
inline |
Inserts a new element into the container directly before pos
.
pos | The iterator before which the new element will be constructed. |
args | arguments to forward to the constructor of the element. |
args...
are forwarded to the constructor as std::forward<args_t>(args)....
args...
may directly or indirectly refer to a value in the container.
|
inline |
Appends a new element to the end of the container. The element is constructed through std::allocator_traits::construct, which typically uses placement-new to construct the element in-place at the location provided by the container. The arguments args...
are forwarded to the constructor as std::forward<Args>(args)...
.
args | The arguments to forward to the constructor of the element. |
|
inlineoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
inlinevirtual |
Erases the specified elements from the container.
pos | The iterator to the element to remove. |
pos
. pos
must be valid and dereferenceable. Thus the xtd::collections::generic::list::end() iterator (which is valid, but is not dereferenceable) cannot be used as a value for pos. @remarks If
pos` refers to the last element, then thextd::collections::generic::list:: end() iterator is returned.
|
inlinevirtual |
Erases the specified elements from the container.
pos | The iterator to the element to remove. |
first
, last
). first
does not need to be dereferenceable if first == last
: erasing an empty range is a no-op. last == end()
prior to removal, then the updated xtd::collections::generic::list::end() iterator is returned. first
, last
) is an empty range, then last
is returned.
|
inlinevirtual |
Returns the allocator associated with the container.
|
inlinevirtualnoexcept |
Returns the underlying base type.
|
inlinevirtualnoexcept |
Returns the underlying base type.
|
inlineoverridevirtualnoexcept |
Returns an enumerator that iterates through a collection.
Implements xtd::collections::generic::ienumerable< type_t >.
|
inline |
Creates a shallow copy of a range of elements in the source xtd::collections::generic::list <type_t>.
index | The zero-based xtd::collections::generic::list <type_t> index at which the range starts. |
count | The number of elements in the range. |
xtd::argument_exception | index and count do ! denote a valid range of elements in the xtd::collections::generic::list <type_t>. |
|
inlineoverridevirtualnoexcept |
Determines the index of a specific item in the xtd::collections::generic::list <type_t>.
value | The object to locate in the xtd::collections::generic::list <type_t>. |
Implements xtd::collections::generic::ilist< type_t >.
|
inlinevirtual |
Determines the index of a specific item in the xtd::collections::generic::list <type_t>.
value | The object to locate in the xtd::collections::generic::list <type_t>. |
index | The zero-based starting index of the search. |
xtd::argument_out_of_range_exception | `index` is outside the range of valid indexes for the xtd::collections::generic::list <type_t>. |
|
inlinevirtual |
Determines the index of a specific item in the xtd::collections::generic::list <type_t>.
value | The object to locate in the xtd::collections::generic::list <type_t>. |
index | The zero-based starting index of the search. |
count | The number of elements in the section to search |
xtd::argument_out_of_range_exception | `index` and `countù do not specify a valid section in the xtd::collections::generic::list <type_t>. |
|
inlinevirtual |
Inserts elements at the specified location in the container.
pos | the iterator before which the content will be inserted (pos may be the end() iterator). |
value | The element value to insert. |
value
. value
before pos.
|
inlinevirtual |
Inserts elements at the specified location in the container.
pos | the iterator before which the content will be inserted (pos may be the end() iterator). |
value | The element value to insert. |
value
. value
before pos.
|
inlinevirtual |
Inserts elements at the specified location in the container.
pos | the iterator before which the content will be inserted (pos may be the end() iterator). |
count | The number of elements to insert. |
value | The element value to insert. |
pos
if count == 0
. pos
if count == 0
.
|
inline |
Inserts elements at the specified location in the container.
first | The first range of elements to insert, cannot be iterators into container for which insert is called |
last | The last range of elements to insert, cannot be iterators into container for which insert is called |
pos
if first == last
. first
, last
) before pos
. first
and last
are iterators into *this
, the behavior is undefined.
|
inlinevirtual |
Inserts elements at the specified location in the container.
pos | the iterator before which the content will be inserted (pos may be the end() iterator). |
items | The initializer list to insert the values from. |
pos
if items
is empty. value
before pos. items
before pos
.
|
inlineoverridevirtual |
Inserts an element into the xtd::collections::generic::list <type_t> at the specified index.
index | The zero-based index at which the new element should be inserted. |
value | The element should be inserted into the xtd::collections::generic::list <type_t>. |
xtd::argument_out_of_range_exception | index is is greater than xtd::collections::generic::list::count. |
Implements xtd::collections::generic::ilist< type_t >.
|
inlinevirtual |
Inserts copy of elements from a collection into the xtd::collections::generic::list <type_t> at the specified index.
index | The zero-based index at which the new elements should be inserted. |
collection | The collection whose elements should be inserted into the xtd::collections::generic::list <type_t>. |
xtd::argument_out_of_range_exception | index is is greater than xtd::collections::generic::list::count. |
|
inlinevirtual |
Inserts copy of elements from a collection into the xtd::collections::generic::list <type_t> at the specified index.
index | The zero-based index at which the new elements should be inserted. |
collection | The collection whose elements should be inserted into the xtd::collections::generic::list <type_t>. |
xtd::argument_out_of_range_exception | index is is greater than xtd::collections::generic::list::count. |
|
inlinevirtual |
Removes the last element of the container.
|
inlinevirtual |
Appends the given element value to the end of the container.
value | The value of the element to append. |
value
.
|
inlinevirtual |
Appends the given element value to the end of the container.
value | The value of the element to append. |
value
is moved into the new element.
|
inlineoverridevirtual |
Removes the first occurrence of a specific object from the xtd::collections::generic::icollection <type_t>.
item | The object to remove from the xtd::collections::generic::icollection <type_t>. |
xtd::not_supported_exception | The xtd::collections::generic::icollection <type_t> is read-only. |
Implements xtd::collections::generic::icollection< type_t >.
|
inlineoverridevirtual |
Removes the element at the specified index of the xtd::collections::generic::list <type_t>.
index | The zero-based index of the item to remove |
ArgumentOutOfRangeException | index is less than 0 or index is greater than xtd::collections::generic::list::count. |
Implements xtd::collections::generic::ilist< type_t >.
|
inlinevirtual |
Removes a range of elements from the xtd::collections::generic::list <type_t>.
index | The zero-based index of the item to remove |
count | The number of elements to remove |
xtd::argument_out_of_range_exception | index or count is less than 0 or index + count is greater than xtd::collections::generic::list::count. |
|
inlinevirtual |
Increase the capacity of the vector (the total number of elements that the vector can hold without requiring reallocation) to a value that's greater or equal to new_cap
. If new_cap is greater than the current capacity(), new storage is allocated, otherwise the function does nothing.
new_cap | The new capacity of the vector, in number of elements. |
new_cap
is greater than xtd::collections::generic::list::capacity property, all iterators, including the xtd::collections::generic::list::end iterator, and all references to the elements are invalidated; otherwise, no iterators or references are invalidated.
|
inlinevirtual |
Resizes the container to contain count
elements, does nothing if count == size(). @param count The new size of the container. @remarks If the current size is greater than
count, the container is reduced to its first
countelements. @remarks If the current size is less than
count`, additional default-inserted elements are appended.
|
inlinevirtual |
Resizes the container to contain count
elements, does nothing if count == size(). @param count The new size of the container. @param value The value to initialize the new elements with. @remarks If the current size is greater than
count, the container is reduced to its first
countelements. @remarks If the current size is less than
count, additional copies of
value` are appended.
|
inlinevirtual |
Requests the removal of unused capacity.
|
inlinevirtualnoexcept |
Exchanges the contents and capacity of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements.
|
inlinevirtualnoexcept |
Copies the elements of the xtd::collections::generic::list <type_t> to a new array.
|
inlineoverridevirtualnoexcept |
Returns a xtd::string that represents the current object.
Reimplemented from xtd::object.
|
inlinevirtual |
Sets the capacity to the actual number of elements in the xtd::collections::generic::list <type_t>, if that number is less than a threshold value.
The parameterless constructor is used to create a list of strings with the default capacity. The xtd::collections::generic::list::capacity property is displayed and then the xtd::collections::generic::list::add method is used to add several items. The items are listed, and the xtd::collections::generic::list::capacity property is displayed again, along with the xtd::collections::generic::list::count property, to show that the capacity has been increased as needed.
The xtd::collections::generic::list::contains method is used to test for the presence of an item in the list, the Insert method is used to insert a new item in the middle of the list, and the contents of the list are displayed again.
The default xtd::collections::generic::list::operator [] is used to retrieve an item, the xtd::collections::generic::list::remove method is used to remove the first instance of the duplicate item added earlier, and the contents are displayed again. The xtd::collections::generic::list::remove method always removes the first instance it encounters.
The xtd::collections::generic::list::trim_excess method is used to reduce the capacity to match the count, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed. If the unused capacity had been less than 10 percent of total capacity, the list would not have been resized.
Finally, the xtd::collections::generic::list::clear method is used to remove all items from the list, and the xtd::collections::generic::list::capacity and xtd::collections::generic::list::count properties are displayed.
|
default |
Copy assignment operator. Replaces the contents with a copy of the contents of other.
other | Another container to use as data source. |
|
inlinenoexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards.
other | Another base type container to use as data source. |
|
inline |
Replaces the contents with those identified by initializer list ilist.
items | Initializer list to use as data source |
|
inlineoverridevirtual |
Returns a reference to the element at specified location index.
index | The position of the element to return. |
std::out_of_range | If pos is not within the range of the container. |
Implements xtd::collections::generic::ilist< type_t >.
|
inlineoverridevirtual |
Returns a reference to the element at specified location index.
index | The position of the element to return. |
std::out_of_range | If `index` is not within the range of the container. |
Implements xtd::collections::generic::ilist< type_t >.
|
inlinenoexcept |
Returns a reference to the underlying base type.
|
inlinenoexcept |
Returns a reference to the underlying base type.
|
inlinestaticconstexpr |
This is a special value equal to the maximum value representable by the type size_type.