std::queue<T,Container>:: front
From cppreference.net
C++
Containers library
|
(C++17)
|
||||
| Sequence | ||||
|
(C++11)
|
||||
|
(C++26)
|
||||
|
(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
;
|
||
Возвращает ссылку на первый элемент в очереди. Этот элемент будет первым удаленным элементом при вызове pop() . Фактически вызывает c. front ( ) .
Содержание |
Параметры
(нет)
Возвращаемое значение
Ссылка на первый элемент.
Сложность
Константа.
Смотрите также
|
доступ к последнему элементу
(public member function) |
|
|
удаляет первый элемент
(public member function) |