在线文档教程
C++
容器 | Containers

std::deque::push_front

STD::DEQUE::PUSH[医]前部

void push_front( const T& value
void push_front( T&& value (since C++11)

value到容器的开头。

所有迭代器,包括过去的结束迭代器,都是无效的.。没有引用无效。

参数

value-the value of the element to prepend

返回值

%280%29

复杂性

常量。

例外

如果引发异常,则此函数不具有%28强异常保证%29的效果。

另见

emplace_front (C++11)constructs an element in-place at the beginning (public member function)
push_backadds an element to the end (public member function)
pop_frontremoves the first element (public member function)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/container/deque/push[医]前部