std::list::push_front
STD::列表::推[医]前部
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_back | adds an element to the end (public member function) |
pop_front | removes the first element (public member function) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。