首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::list::push_front

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)

代码语言:txt
复制
 ? cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com