constexpr const_reference front() const;
Returns a reference to the first element in the container.
front on an empty container is undefined.
reference to the first element
For a container
c, the expression c.front() is equivalent to *c.begin().
Const version is marked as constexpr since c++14.
The following code uses
front to display the first element of a std::deque<char>:
The first character is o
| access the last element |
(public member function)