]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/ptr_container/doc/ptr_container.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / ptr_container / doc / ptr_container.html
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
7 <title>Boost Pointer Container Library</title>
8 <meta name="author" content="Thorsten Ottosen" />
9 <meta name="date" content="27th of October 2007" />
10 <meta name="copyright" content="Thorsten Ottosen 2004-2007. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt)." />
11 <style type="text/css">
12
13 /*
14 :Author: David Goodger
15 :Contact: goodger@users.sourceforge.net
16 :Date: $Date$
17 :Revision: $Revision$
18 :Copyright: This stylesheet has been placed in the public domain.
19
20 Default cascading style sheet for the HTML output of Docutils.
21
22 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
23 customize this style sheet.
24 */
25
26 /* "! important" is used here to override other ``margin-top`` and
27 ``margin-bottom`` styles that are later in the stylesheet or
28 more specific. See http://www.w3.org/TR/CSS1#the-cascade */
29 .first {
30 margin-top: 0 ! important }
31
32 .last, .with-subtitle {
33 margin-bottom: 0 ! important }
34
35 .hidden {
36 display: none }
37
38 a.toc-backref {
39 text-decoration: none ;
40 color: black }
41
42 blockquote.epigraph {
43 margin: 2em 5em ; }
44
45 dl.docutils dd {
46 margin-bottom: 0.5em }
47
48 /* Uncomment (and remove this text!) to get bold-faced definition list terms
49 dl.docutils dt {
50 font-weight: bold }
51 */
52
53 div.abstract {
54 margin: 2em 5em }
55
56 div.abstract p.topic-title {
57 font-weight: bold ;
58 text-align: center }
59
60 div.admonition, div.attention, div.caution, div.danger, div.error,
61 div.hint, div.important, div.note, div.tip, div.warning {
62 margin: 2em ;
63 border: medium outset ;
64 padding: 1em }
65
66 div.admonition p.admonition-title, div.hint p.admonition-title,
67 div.important p.admonition-title, div.note p.admonition-title,
68 div.tip p.admonition-title {
69 font-weight: bold ;
70 font-family: sans-serif }
71
72 div.attention p.admonition-title, div.caution p.admonition-title,
73 div.danger p.admonition-title, div.error p.admonition-title,
74 div.warning p.admonition-title {
75 color: red ;
76 font-weight: bold ;
77 font-family: sans-serif }
78
79 /* Uncomment (and remove this text!) to get reduced vertical space in
80 compound paragraphs.
81 div.compound .compound-first, div.compound .compound-middle {
82 margin-bottom: 0.5em }
83
84 div.compound .compound-last, div.compound .compound-middle {
85 margin-top: 0.5em }
86 */
87
88 div.dedication {
89 margin: 2em 5em ;
90 text-align: center ;
91 font-style: italic }
92
93 div.dedication p.topic-title {
94 font-weight: bold ;
95 font-style: normal }
96
97 div.figure {
98 margin-left: 2em }
99
100 div.footer, div.header {
101 clear: both;
102 font-size: smaller }
103
104 div.line-block {
105 display: block ;
106 margin-top: 1em ;
107 margin-bottom: 1em }
108
109 div.line-block div.line-block {
110 margin-top: 0 ;
111 margin-bottom: 0 ;
112 margin-left: 1.5em }
113
114 div.sidebar {
115 margin-left: 1em ;
116 border: medium outset ;
117 padding: 1em ;
118 background-color: #ffffee ;
119 width: 40% ;
120 float: right ;
121 clear: right }
122
123 div.sidebar p.rubric {
124 font-family: sans-serif ;
125 font-size: medium }
126
127 div.system-messages {
128 margin: 5em }
129
130 div.system-messages h1 {
131 color: red }
132
133 div.system-message {
134 border: medium outset ;
135 padding: 1em }
136
137 div.system-message p.system-message-title {
138 color: red ;
139 font-weight: bold }
140
141 div.topic {
142 margin: 2em }
143
144 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
145 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
146 margin-top: 0.4em }
147
148 h1.title {
149 text-align: center }
150
151 h2.subtitle {
152 text-align: center }
153
154 hr.docutils {
155 width: 75% }
156
157 img.align-left {
158 clear: left }
159
160 img.align-right {
161 clear: right }
162
163 img.borderless {
164 border: 0 }
165
166 ol.simple, ul.simple {
167 margin-bottom: 1em }
168
169 ol.arabic {
170 list-style: decimal }
171
172 ol.loweralpha {
173 list-style: lower-alpha }
174
175 ol.upperalpha {
176 list-style: upper-alpha }
177
178 ol.lowerroman {
179 list-style: lower-roman }
180
181 ol.upperroman {
182 list-style: upper-roman }
183
184 p.attribution {
185 text-align: right ;
186 margin-left: 50% }
187
188 p.caption {
189 font-style: italic }
190
191 p.credits {
192 font-style: italic ;
193 font-size: smaller }
194
195 p.label {
196 white-space: nowrap }
197
198 p.rubric {
199 font-weight: bold ;
200 font-size: larger ;
201 color: maroon ;
202 text-align: center }
203
204 p.sidebar-title {
205 font-family: sans-serif ;
206 font-weight: bold ;
207 font-size: larger }
208
209 p.sidebar-subtitle {
210 font-family: sans-serif ;
211 font-weight: bold }
212
213 p.topic-title {
214 font-weight: bold }
215
216 pre.address {
217 margin-bottom: 0 ;
218 margin-top: 0 ;
219 font-family: serif ;
220 font-size: 100% }
221
222 pre.line-block {
223 font-family: serif ;
224 font-size: 100% }
225
226 pre.literal-block, pre.doctest-block {
227 margin-left: 2em ;
228 margin-right: 2em ;
229 background-color: #eeeeee }
230
231 span.classifier {
232 font-family: sans-serif ;
233 font-style: oblique }
234
235 span.classifier-delimiter {
236 font-family: sans-serif ;
237 font-weight: bold }
238
239 span.interpreted {
240 font-family: sans-serif }
241
242 span.option {
243 white-space: nowrap }
244
245 span.pre {
246 white-space: pre }
247
248 span.problematic {
249 color: red }
250
251 span.section-subtitle {
252 /* font-size relative to parent (h1..h6 element) */
253 font-size: 80% }
254
255 table.citation {
256 border-left: solid thin gray }
257
258 table.docinfo {
259 margin: 2em 4em }
260
261 table.docutils {
262 margin-top: 0.5em ;
263 margin-bottom: 0.5em }
264
265 table.footnote {
266 border-left: solid thin black }
267
268 table.docutils td, table.docutils th,
269 table.docinfo td, table.docinfo th {
270 padding-left: 0.5em ;
271 padding-right: 0.5em ;
272 vertical-align: top }
273
274 table.docutils th.field-name, table.docinfo th.docinfo-name {
275 font-weight: bold ;
276 text-align: left ;
277 white-space: nowrap ;
278 padding-left: 0 }
279
280 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
281 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
282 font-size: 100% }
283
284 tt.docutils {
285 background-color: #eeeeee }
286
287 ul.auto-toc {
288 list-style-type: none }
289
290 </style>
291 </head>
292 <body>
293 <div class="document" id="boost-pointer-container-library">
294 <h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
295 <table class="docinfo" frame="void" rules="none">
296 <col class="docinfo-name" />
297 <col class="docinfo-content" />
298 <tbody valign="top">
299 <tr><th class="docinfo-name">Author:</th>
300 <td>Thorsten Ottosen</td></tr>
301 <tr><th class="docinfo-name">Contact:</th>
302 <td><a class="first reference" href="mailto:nesotto&#64;cs.aau.dk">nesotto&#64;cs.aau.dk</a> or <a class="last reference" href="mailto:tottosen&#64;dezide.com">tottosen&#64;dezide.com</a></td></tr>
303 <tr class="field"><th class="docinfo-name">Organizations:</th><td class="field-body"><a class="reference" href="http://www.cs.aau.dk">Department of Computer Science</a>, Aalborg University, and <a class="reference" href="http://www.dezide.com">Dezide Aps</a></td>
304 </tr>
305 <tr><th class="docinfo-name">Date:</th>
306 <td>27th of October 2007</td></tr>
307 <tr><th class="docinfo-name">Copyright:</th>
308 <td>Thorsten Ottosen 2004-2007. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td></tr>
309 </tbody>
310 </table>
311 <div class="section">
312 <h1><a id="overview" name="overview">Overview</a></h1>
313 <p>Boost.Pointer Container provides containers for holding heap-allocated
314 objects in an exception-safe manner and with minimal overhead.
315 The aim of the library is in particular to make OO programming
316 easier in C++ by establishing a standard set of classes, methods
317 and designs for dealing with OO specific problems</p>
318 <ul class="simple">
319 <li><a class="reference" href="#motivation">Motivation</a></li>
320 <li><a class="reference" href="tutorial.html">Tutorial</a></li>
321 <li><a class="reference" href="reference.html">Reference</a></li>
322 <li><a class="reference" href="guidelines.html">Usage guidelines</a></li>
323 <li><a class="reference" href="examples.html">Examples</a></li>
324 <li><a class="reference" href="headers.html">Library headers</a></li>
325 <li><a class="reference" href="faq.html">FAQ</a></li>
326 <li><a class="reference" href="#upgrading-from-boost-v-1-33">Upgrading from Boost v. 1.33.*</a></li>
327 <li><a class="reference" href="#upgrading-from-boost-v-1-34">Upgrading from Boost v. 1.34.*</a></li>
328 <li><a class="reference" href="#upgrading-from-boost-v-1-35">Upgrading from Boost v. 1.35.*</a></li>
329 <li><a class="reference" href="#future-developments">Future Developments</a></li>
330 <li><a class="reference" href="#acknowledgements">Acknowledgements</a></li>
331 <li><a class="reference" href="#references">References</a></li>
332 </ul>
333 <!-- - `Conventions <conventions.html>`_
334 - `The Clonable Concept <reference.html#the-clonable-concept>`_
335 - `The Clone Allocator Concept <reference.html#the-clone-allocator-concept>`_
336 - `Pointer container adapters <reference.html#pointer-container-adapters>`_
337 - `Sequence container classes <reference.html#sequence-containers>`_
338
339 - `ptr_vector <ptr_vector.html>`_
340 - `ptr_deque <ptr_deque.html>`_
341 - `ptr_list <ptr_list.html>`_
342 - `ptr_array <ptr_array.html>`_
343 - `Associative container classes <reference.html#associative-containers>`_
344
345 - `ptr_set <ptr_set.html>`_
346 - `ptr_multiset <ptr_multiset.html>`_
347 - `ptr_map <ptr_map.html>`_
348 - `ptr_multimap <ptr_multimap.html>`_
349 - `Indirected functions <indirect_fun.html>`_
350 - `Class nullable <reference.html#class-nullable>`_
351 - `Exception classes <reference.html#exception-classes>`_ -->
352 </div>
353 <div class="section">
354 <h1><a id="motivation" name="motivation">Motivation</a></h1>
355 <p>Whenever a programmer wants to have a container of pointers to
356 heap-allocated objects, there is usually only one exception-safe way:
357 to make a container of smart pointers like <a class="reference" href="../../smart_ptr/shared_ptr.htm">boost::shared_ptr</a>
358 This approach is suboptimal if</p>
359 <ol class="arabic simple">
360 <li>the stored objects are not shared, but owned exclusively, or</li>
361 </ol>
362 <!-- -->
363 <ol class="arabic simple" start="2">
364 <li>the overhead implied by smart pointers is inappropriate</li>
365 </ol>
366 <p>This library therefore provides standard-like containers that are for storing
367 heap-allocated or <a class="reference" href="reference.html#the-clonable-concept">cloned</a> objects (or in case of a map, the mapped object must be
368 a heap-allocated or cloned object). For each of the standard
369 containers there is a pointer container equivalent that takes ownership of
370 the objects in an exception safe manner. In this respect the library is intended
371 to solve the so-called
372 <a class="reference" href="faq.html#what-is-the-polymorphic-class-problem">polymorphic class problem</a>.</p>
373 <p>The advantages of pointer containers are</p>
374 <ol class="arabic simple">
375 <li>Exception-safe pointer storage and manipulation.</li>
376 </ol>
377 <!-- -->
378 <ol class="arabic simple" start="2">
379 <li>Notational convenience compared to the use of containers of pointers.</li>
380 </ol>
381 <!-- -->
382 <ol class="arabic simple" start="3">
383 <li>Can be used for types that are neither Assignable nor Copy Constructible.</li>
384 </ol>
385 <!-- -->
386 <ol class="arabic simple" start="4">
387 <li>No memory-overhead as containers of smart pointers can have (see <a class="footnote-reference" href="#id23" id="id2" name="id2">[11]</a> and <a class="footnote-reference" href="#id25" id="id3" name="id3">[12]</a>).</li>
388 </ol>
389 <!-- -->
390 <ol class="arabic simple" start="5">
391 <li>Usually faster than using containers of smart pointers (see <a class="footnote-reference" href="#id23" id="id4" name="id4">[11]</a> and <a class="footnote-reference" href="#id25" id="id5" name="id5">[12]</a>).</li>
392 </ol>
393 <!-- -->
394 <ol class="arabic simple" start="6">
395 <li>The interface is slightly changed towards the domain of pointers
396 instead of relying on the normal value-based interface. For example,
397 now it is possible for <tt class="docutils literal"><span class="pre">pop_back()</span></tt> to return the removed element.</li>
398 </ol>
399 <!-- -->
400 <ol class="arabic simple" start="7">
401 <li>Propagates constness such that one cannot modify the objects via a <tt class="docutils literal"><span class="pre">const_iterator</span></tt>.</li>
402 </ol>
403 <!-- -->
404 <ol class="arabic simple" start="8">
405 <li>Built-in support for deep-copy semantics via the <a class="reference" href="reference.html#the-clonable-concept">the Clonable concept</a></li>
406 </ol>
407 <p>The disadvantages are</p>
408 <ol class="arabic simple">
409 <li>Less flexible than containers of smart pointers like <a class="reference" href="../../smart_ptr/shared_ptr.htm">boost::shared_ptr</a></li>
410 </ol>
411 <p>When you do need shared semantics, this library is not what you need.</p>
412 </div>
413 <div class="section">
414 <h1><a id="upgrading-from-boost-v-1-33" name="upgrading-from-boost-v-1-33">Upgrading from Boost v. <tt class="docutils literal"><span class="pre">1.33.*</span></tt></a></h1>
415 <p>If you upgrade from one of these versions of Boost, then there has been one
416 major interface change: map iterators now mimic iterators from <tt class="docutils literal"><span class="pre">std::map</span></tt>.
417 Previously you may have written</p>
418 <pre class="literal-block">
419 for( boost::ptr_map&lt;std::string,T&gt;::iterator i = m.begin(), e = m.end();
420 i != e; ++i )
421 {
422 std::cout &lt;&lt; &quot;key:&quot; &lt;&lt; i.key();
423 std::cout &lt;&lt; &quot;value:&quot; &lt;&lt; *i;
424 i-&gt;foo(); // call T::foo()
425 }
426 </pre>
427 <p>and this now needs to be converted into</p>
428 <pre class="literal-block">
429 for( boost::ptr_map&lt;std::string,T&gt;::iterator i = m.begin(), e = m.end();
430 i != e; ++i )
431 {
432 std::cout &lt;&lt; &quot;key:&quot; &lt;&lt; i-&gt;first;
433 std::cout &lt;&lt; &quot;value:&quot; &lt;&lt; *i-&gt;second;
434 i-&gt;second-&gt;foo(); // call T::foo()
435 }
436 </pre>
437 <p>Apart from the above change, the library now also introduces</p>
438 <ul>
439 <li><p class="first"><tt class="docutils literal"><span class="pre">std::auto_ptr&lt;T&gt;</span></tt> overloads:</p>
440 <pre class="literal-block">
441 std::auto_ptr&lt;T&gt; p( new T );
442 container.push_back( p );
443 </pre>
444 </li>
445 <li><p class="first">Derived-to-Base conversion in <tt class="docutils literal"><span class="pre">transfer()</span></tt>:</p>
446 <pre class="literal-block">
447 boost::ptr_vector&lt;Base&gt; vec;
448 boost::ptr_list&lt;Derived&gt; list;
449 ...
450 vec.transfer( vec.begin(), list ); // now ok
451 </pre>
452 </li>
453 </ul>
454 <p>Also note that <a class="reference" href="../../assign/index.html">Boost.Assign</a> introduces better support
455 for pointer containers.</p>
456 </div>
457 <div class="section">
458 <h1><a id="upgrading-from-boost-v-1-34" name="upgrading-from-boost-v-1-34">Upgrading from Boost v. <tt class="docutils literal"><span class="pre">1.34.*</span></tt></a></h1>
459 <p>Serialization has now been made optional thanks to Sebastian Ramacher.
460 You simply include <tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize.hpp&gt;</span></tt> or perhaps
461 just one of the more specialized headers.</p>
462 <p>All containers are now copy-constructible and assignable. So you can e.g. now
463 do:</p>
464 <pre class="literal-block">
465 boost::ptr_vector&lt;Derived&gt; derived = ...;
466 boost::ptr_vector&lt;Base&gt; base( derived );
467 base = derived;
468 </pre>
469 <p>As the example shows, derived-to-base class conversions are also allowed.</p>
470 <p>A few general functions have been added:</p>
471 <pre class="literal-block">
472 VoidPtrContainer&amp; base();
473 const VoidPtrContainer&amp; base() const;
474 </pre>
475 <p>These allow direct access to the wrapped container which is
476 sometimes needed when you want to provide extra functionality.</p>
477 <p>A few new functions have been added to sequences:</p>
478 <pre class="literal-block">
479 void resize( size_type size );
480 void resize( size_type size, T* to_clone );
481 </pre>
482 <p><tt class="docutils literal"><span class="pre">ptr_vector&lt;T&gt;</span></tt> has a few new helper functions to integrate better with C-arrays:</p>
483 <pre class="literal-block">
484 void transfer( iterator before, T** from, size_type size, bool delete_from = true );
485 T** c_array();
486 </pre>
487 <p>Finally, you can now also &quot;copy&quot; and &quot;assign&quot; an <tt class="docutils literal"><span class="pre">auto_type</span></tt> ptr by calling <tt class="docutils literal"><span class="pre">move()</span></tt>:</p>
488 <pre class="literal-block">
489 boost::ptr_vector&lt;T&gt;::auto_type move_ptr = ...;
490 return boost::ptr_container::move( move_ptr );
491 </pre>
492 </div>
493 <div class="section">
494 <h1><a id="upgrading-from-boost-v-1-35" name="upgrading-from-boost-v-1-35">Upgrading from Boost v. <tt class="docutils literal"><span class="pre">1.35.*</span></tt></a></h1>
495 <p>The library has been fairly stable, but a few new containers have been supported:</p>
496 <ul class="simple">
497 <li><tt class="docutils literal"><span class="pre">boost::ptr_unordered_set&lt;T&gt;</span></tt> in <tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/ptr_unordered_set.hpp&gt;</span></tt></li>
498 <li><tt class="docutils literal"><span class="pre">boost::ptr_unordered_map&lt;Key,T&gt;</span></tt> in <tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/ptr_unordered_map.hpp&gt;</span></tt></li>
499 <li><tt class="docutils literal"><span class="pre">boost::ptr_circular_buffer&lt;T&gt;</span></tt> in <tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/ptr_circular_buffer.hpp&gt;</span></tt></li>
500 </ul>
501 <p>There are no docs for these classes yet, but they are almost identical to
502 <tt class="docutils literal"><span class="pre">boost::ptr_set&lt;T&gt;</span></tt>, <tt class="docutils literal"><span class="pre">boost::ptr_map&lt;Key,T&gt;</span></tt> and <tt class="docutils literal"><span class="pre">boost::ptr_array&lt;T,N&gt;</span></tt>, respectively.
503 The underlying containers stem from the two boost libraries</p>
504 <ul class="simple">
505 <li><a class="reference" href="../../unordered/index.html">Boost.Unordered</a></li>
506 <li><a class="reference" href="../../circular_buffer/index.html">Boost.Circular Buffer</a></li>
507 </ul>
508 <p>Furthermore, <a class="reference" href="ptr_inserter.html">insert iterators</a> have been added.</p>
509 </div>
510 <div class="section">
511 <h1><a id="future-developments" name="future-developments">Future Developments</a></h1>
512 <p>There are indications that the <tt class="docutils literal"><span class="pre">void*</span></tt> implementation has a slight
513 performance overhead compared to a <tt class="docutils literal"><span class="pre">T*</span></tt> based implementation. Furthermore, a
514 <tt class="docutils literal"><span class="pre">T*</span></tt> based implementation is so much easier to use type-safely
515 with algorithms. Therefore I anticipate to move to a <tt class="docutils literal"><span class="pre">T*</span></tt> based implementation.</p>
516 <p>Furthermore, the clone allocator might be allowed to have state.
517 This design requires some thought, so if you have good ideas and use-cases'
518 for this, please don't hesitate to contact me.</p>
519 <p>Also, support for Boost.Interprocess is on the todo list.</p>
520 <p>There has been a few request for <tt class="docutils literal"><span class="pre">boost::ptr_multi_index_container&lt;T,...&gt;</span></tt>.
521 I investigated how difficult it would be, and it did turn out to be difficult, albeit
522 not impossible. But I don't have the resources to implement this beast
523 for years to come, so if someone really needs this container, I suggest that they
524 talk with me in private about how it can be done.</p>
525 </div>
526 <div class="section">
527 <h1><a id="acknowledgements" name="acknowledgements">Acknowledgements</a></h1>
528 <p>The following people have been very helpful:</p>
529 <ul class="simple">
530 <li>Bjørn D. Rasmussen for unintentionally motivating me to start this library</li>
531 <li>Pavel Vozenilek for asking me to make the adapters</li>
532 <li>David Abrahams for the <tt class="docutils literal"><span class="pre">indirect_fun</span></tt> design</li>
533 <li>Pavol Droba for being review manager</li>
534 <li>Ross Boylan for trying out a prototype for real</li>
535 <li>Felipe Magno de Almeida for giving fedback based on using the
536 library in production code even before the library was part of boost</li>
537 <li>Jonathan Turkanis for supplying his <tt class="docutils literal"><span class="pre">move_ptr</span></tt> framework
538 which is used internally</li>
539 <li>Stefan Slapeta and Howard Hinnant for Metrowerks support</li>
540 <li>Russell Hind for help with Borland compatibility</li>
541 <li>Jonathan Wakely for his great help with GCC compatibility and bug fixes</li>
542 <li>Pavel Chikulaev for comments and bug-fixes</li>
543 <li>Andreas Hommel for fixing the nasty Metrowerks bug</li>
544 <li>Charles Brockman for his many comments on the documentation</li>
545 <li>Sebastian Ramacher for implementing the optional serialization support</li>
546 </ul>
547 </div>
548 <div class="section">
549 <h1><a id="references" name="references">References</a></h1>
550 <table class="docutils footnote" frame="void" id="id8" rules="none">
551 <colgroup><col class="label" /><col /></colgroup>
552 <tbody valign="top">
553 <tr><td class="label"><a name="id8">[1]</a></td><td>Matt Austern: <a class="reference" href="http://www.cuj.com/documents/s=7990/cujcexp1910austern/">&quot;The Standard Librarian: Containers of Pointers&quot;</a> , C/C++ Users Journal Experts Forum.</td></tr>
554 </tbody>
555 </table>
556 <table class="docutils footnote" frame="void" id="id10" rules="none">
557 <colgroup><col class="label" /><col /></colgroup>
558 <tbody valign="top">
559 <tr><td class="label"><a name="id10">[2]</a></td><td>Bjarne Stroustrup, &quot;The C++ Programming Language&quot;, <a class="reference" href="http://www.research.att.com/~bs/3rd_safe.pdf">Appendix E: &quot;Standard-Library Exception Safety&quot;</a></td></tr>
560 </tbody>
561 </table>
562 <table class="docutils footnote" frame="void" id="id12" rules="none">
563 <colgroup><col class="label" /><col /></colgroup>
564 <tbody valign="top">
565 <tr><td class="label"><a name="id12">[3]</a></td><td>Herb Sutter, &quot;Exceptional C++&quot;.</td></tr>
566 </tbody>
567 </table>
568 <table class="docutils footnote" frame="void" id="id13" rules="none">
569 <colgroup><col class="label" /><col /></colgroup>
570 <tbody valign="top">
571 <tr><td class="label"><a name="id13">[4]</a></td><td>Herb Sutter, &quot;More Exceptional C++&quot;.</td></tr>
572 </tbody>
573 </table>
574 <table class="docutils footnote" frame="void" id="id14" rules="none">
575 <colgroup><col class="label" /><col /></colgroup>
576 <tbody valign="top">
577 <tr><td class="label"><a name="id14">[5]</a></td><td>Kevlin Henney: <a class="reference" href="http://www.cuj.com/documents/s=7986/cujcexp2002henney/henney.htm">&quot;From Mechanism to Method: The Safe Stacking of Cats&quot;</a> , C++ Experts Forum, February 2002.</td></tr>
578 </tbody>
579 </table>
580 <table class="docutils footnote" frame="void" id="id16" rules="none">
581 <colgroup><col class="label" /><col /></colgroup>
582 <tbody valign="top">
583 <tr><td class="label"><a name="id16">[6]</a></td><td>Some of the few earlier attempts of pointer containers I have seen are the rather interesting <a class="reference" href="http://www.ntllib.org/asp.html">NTL</a> and the
584 <a class="reference" href="http://ootips.org/yonat/4dev/pointainer.h">pointainer</a>.
585 As of this writing both libraries are not exceptions-safe and can leak.</td></tr>
586 </tbody>
587 </table>
588 <table class="docutils footnote" frame="void" id="id17" rules="none">
589 <colgroup><col class="label" /><col /></colgroup>
590 <tbody valign="top">
591 <tr><td class="label"><a name="id17">[7]</a></td><td>INTERNATIONAL STANDARD, Programming languages --- C++, ISO/IEC 14882, 1998. See section 23 in particular.</td></tr>
592 </tbody>
593 </table>
594 <table class="docutils footnote" frame="void" id="id18" rules="none">
595 <colgroup><col class="label" /><col /></colgroup>
596 <tbody valign="top">
597 <tr><td class="label"><a name="id18">[8]</a></td><td>C++ Standard Library Closed Issues List (Revision 27),
598 Item 218, <a class="reference" href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#218">Algorithms do not use binary predicate objects for default comparisons</a>.</td></tr>
599 </tbody>
600 </table>
601 <table class="docutils footnote" frame="void" id="id20" rules="none">
602 <colgroup><col class="label" /><col /></colgroup>
603 <tbody valign="top">
604 <tr><td class="label"><a name="id20">[9]</a></td><td>C++ Standard Library Active Issues List (Revision 27),
605 Item 226, <a class="reference" href="http://gcc.gnu.org/onlinedocs/libstdc++/ext/lwg-active.html#226">User supplied specializations or overloads of namespace std function templates</a>.</td></tr>
606 </tbody>
607 </table>
608 <table class="docutils footnote" frame="void" id="id22" rules="none">
609 <colgroup><col class="label" /><col /></colgroup>
610 <tbody valign="top">
611 <tr><td class="label"><a name="id22">[10]</a></td><td>Harald Nowak, &quot;A remove_if for vector&quot;, C/C++ Users Journal, July 2001.</td></tr>
612 </tbody>
613 </table>
614 <table class="docutils footnote" frame="void" id="id23" rules="none">
615 <colgroup><col class="label" /><col /></colgroup>
616 <tbody valign="top">
617 <tr><td class="label"><a name="id23">[11]</a></td><td><em>(<a class="fn-backref" href="#id2">1</a>, <a class="fn-backref" href="#id4">2</a>)</em> Boost smart pointer <a class="reference" href="http://www.boost.org/libs/smart_ptr/smarttests.htm">timings</a></td></tr>
618 </tbody>
619 </table>
620 <table class="docutils footnote" frame="void" id="id25" rules="none">
621 <colgroup><col class="label" /><col /></colgroup>
622 <tbody valign="top">
623 <tr><td class="label"><a name="id25">[12]</a></td><td><em>(<a class="fn-backref" href="#id3">1</a>, <a class="fn-backref" href="#id5">2</a>)</em> <a class="reference" href="http://www.ntllib.org/asp.html">NTL</a>: Array vs std::vector and boost::shared_ptr</td></tr>
624 </tbody>
625 </table>
626 <table class="docutils footnote" frame="void" id="id26" rules="none">
627 <colgroup><col class="label" /><col /></colgroup>
628 <tbody valign="top">
629 <tr><td class="label"><a name="id26">[13]</a></td><td>Kevlin Henney, <a class="reference" href="http://www.two-sdg.demon.co.uk/curbralan/papers/europlop/NullObject.pdf">Null Object</a>, 2002.</td></tr>
630 </tbody>
631 </table>
632 <hr><table class="docutils field-list" frame="void" rules="none">
633 <col class="field-name" />
634 <col class="field-body" />
635 <tbody valign="top">
636 <tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006.</td>
637 </tr>
638 </tbody>
639 </table>
640 </div>
641 </div>
642 </body>
643 </html>