﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Program My Future-随笔分类-STL study</title><link>http://www.cppblog.com/Voider/category/12197.html</link><description>Get Involed</description><language>zh-cn</language><lastBuildDate>Fri, 30 Oct 2009 07:29:38 GMT</lastBuildDate><pubDate>Fri, 30 Oct 2009 07:29:38 GMT</pubDate><ttl>60</ttl><item><title>STL note 01－－deque</title><link>http://www.cppblog.com/Voider/archive/2009/10/30/99826.html</link><dc:creator>Voider</dc:creator><author>Voider</author><pubDate>Fri, 30 Oct 2009 06:45:00 GMT</pubDate><guid>http://www.cppblog.com/Voider/archive/2009/10/30/99826.html</guid><wfw:comment>http://www.cppblog.com/Voider/comments/99826.html</wfw:comment><comments>http://www.cppblog.com/Voider/archive/2009/10/30/99826.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Voider/comments/commentRss/99826.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Voider/services/trackbacks/99826.html</trackback:ping><description><![CDATA[

<a href="http://www.cplusplus.com/reference/stl/deque/">http://www.cplusplus.com/reference/stl/deque/</a><div><a href="http://www.cplusplus.com/reference/stl/deque/"></a><span style="font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; ">Deque sequences have the following properties:<br><ul style="margin-top: 0px; margin-bottom: 0px; "><li>Individual elements can be accessed by their position index.</li><li>Iteration over the elements can be performed in any order.</li><li>Elements can be efficiently added and removed from any of its ends (<span style="text-decoration: underline;">either the beginning or the end of the sequence</span>)</li><li><br></li></ul></span><br>On the drawback side, unlike <a href="http://www.cplusplus.com/vector">vector</a>s, <a href="http://www.cplusplus.com/deque">deque</a>s
are not guaranteed to have all its elements in contiguous连续的 storage
locations, eliminating排除 thus the possibility of safe access through
<span style="text-decoration: underline;">pointer arithmetic</span>s.<br><span style="font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; ">For operations that involve frequent insertion or removals of elements at positions other than the beginning or the end,&nbsp;<a href="http://www.cplusplus.com/deque" style="color: rgb(0, 44, 153); text-decoration: none; ">deque</a>s perform worse and have less consistent iterators and references than&nbsp;<a href="http://www.cplusplus.com/list" style="color: rgb(0, 44, 153); text-decoration: none; ">list</a>s.</span>
</div><img src ="http://www.cppblog.com/Voider/aggbug/99826.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Voider/" target="_blank">Voider</a> 2009-10-30 14:45 <a href="http://www.cppblog.com/Voider/archive/2009/10/30/99826.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>