std::queue<T,Container>:: front
From cppreference.com
C++
Containers library
Sequence | ||||
(C++11)
|
||||
(C++26)
|
||||
(C++11)
|
||||
Associative | ||||
Unordered associative | ||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
Adaptors | ||||
(C++23)
|
||||
(C++23)
|
||||
(C++23)
|
||||
(C++23)
|
||||
Views | ||||
(C++20)
|
||||
(C++23)
|
||||
Tables | ||||
Iterator invalidation | ||||
Member function table | ||||
Non-member function table |
std::queue
Member functions | ||||
Element access | ||||
queue::front
|
||||
Capacity | ||||
Modifiers | ||||
(C++23)
|
||||
(C++11)
|
||||
(C++11)
|
||||
Non-member functions | ||||
(C++11)
|
||||
Helper classes | ||||
(C++11)
|
||||
(C++23)
|
||||
Deduction guides (C++17) |
reference front
(
)
;
|
||
const_reference front
(
)
const
;
|
||
Returns reference to the first element in the queue. This element will be the first element to be removed on a call to pop() . Effectively calls c. front ( ) .
Parameters
(none)
Return value
Reference to the first element.
Complexity
Constant.
See also
access the last element
(public member function) |
|
removes the first element
(public member function) |
Retrieved from "
https://en.cppreference.com/mwiki/index.php?title=cpp/container/queue/front&oldid=161981
"