|
list::frontpublic member function
reference front ( ); const_reference front ( ) const; Access first element Returns a reference to the first element in the list container.Unlike member list::begin, which returns an iterator to this same element, this function returns a direct reference. ParametersnoneReturn valueA reference to the first element in the list container.Member types reference and const_reference are the reference types to the elements of the container (for the default storage allocation model, allocator, these are T& and const T& respectively). Example
Output:
ComplexityConstant.See also
|