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">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
7 <title>Boost Pointer Container Library</title>
8 <style type="text/css">
11 :Author: David Goodger (goodger@python.org)
12 :Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
13 :Copyright: This stylesheet has been placed in the public domain.
15 Default cascading style sheet for the HTML output of Docutils.
17 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
18 customize this style sheet.
21 /* used to remove borders from tables and images */
22 .borderless, table.borderless td, table.borderless th {
25 table.borderless td, table.borderless th {
26 /* Override padding for "table.docutils td" with "! important".
27 The right padding separates the table cells. */
28 padding: 0 0.5em 0 0 ! important }
31 /* Override more specific margin styles with "! important". */
32 margin-top: 0 ! important }
34 .last, .with-subtitle {
35 margin-bottom: 0 ! important }
45 vertical-align: super;
49 text-decoration: none ;
56 margin-bottom: 0.5em }
58 object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
62 /* Uncomment (and remove this text!) to get bold-faced definition list terms
70 div.abstract p.topic-title {
74 div.admonition, div.attention, div.caution, div.danger, div.error,
75 div.hint, div.important, div.note, div.tip, div.warning {
77 border: medium outset ;
80 div.admonition p.admonition-title, div.hint p.admonition-title,
81 div.important p.admonition-title, div.note p.admonition-title,
82 div.tip p.admonition-title {
84 font-family: sans-serif }
86 div.attention p.admonition-title, div.caution p.admonition-title,
87 div.danger p.admonition-title, div.error p.admonition-title,
88 div.warning p.admonition-title, .code .error {
91 font-family: sans-serif }
93 /* Uncomment (and remove this text!) to get reduced vertical space in
95 div.compound .compound-first, div.compound .compound-middle {
96 margin-bottom: 0.5em }
98 div.compound .compound-last, div.compound .compound-middle {
107 div.dedication p.topic-title {
115 div.footer, div.header {
124 div.line-block div.line-block {
130 margin: 0 0 0.5em 1em ;
131 border: medium outset ;
133 background-color: #ffffee ;
138 div.sidebar p.rubric {
139 font-family: sans-serif ;
142 div.system-messages {
145 div.system-messages h1 {
149 border: medium outset ;
152 div.system-message p.system-message-title {
159 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
160 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
172 img.align-left, .figure.align-left, object.align-left, table.align-left {
177 img.align-right, .figure.align-right, object.align-right, table.align-right {
182 img.align-center, .figure.align-center, object.align-center {
203 /* reset inner alignment in figures */
205 text-align: inherit }
207 /* div.align-center * { */
208 /* text-align: left } */
211 vertical-align: top }
214 vertical-align: middle }
217 vertical-align: bottom }
219 ol.simple, ul.simple {
223 list-style: decimal }
226 list-style: lower-alpha }
229 list-style: upper-alpha }
232 list-style: lower-roman }
235 list-style: upper-roman }
249 white-space: nowrap }
258 font-family: sans-serif ;
263 font-family: sans-serif ;
274 pre.literal-block, pre.doctest-block, pre.math, pre.code {
278 pre.code .ln { color: grey; } /* line numbers */
279 pre.code, code { background-color: #eeeeee }
280 pre.code .comment, code .comment { color: #5C6576 }
281 pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
282 pre.code .literal.string, code .literal.string { color: #0C5404 }
283 pre.code .name.builtin, code .name.builtin { color: #352B84 }
284 pre.code .deleted, code .deleted { background-color: #DEB0A1}
285 pre.code .inserted, code .inserted { background-color: #A3D289}
288 font-family: sans-serif ;
289 font-style: oblique }
291 span.classifier-delimiter {
292 font-family: sans-serif ;
296 font-family: sans-serif }
299 white-space: nowrap }
307 span.section-subtitle {
308 /* font-size relative to parent (h1..h6 element) */
312 border-left: solid 1px gray;
320 margin-bottom: 0.5em }
323 border-left: solid 1px black;
326 table.docutils td, table.docutils th,
327 table.docinfo td, table.docinfo th {
328 padding-left: 0.5em ;
329 padding-right: 0.5em ;
330 vertical-align: top }
332 table.docutils th.field-name, table.docinfo th.docinfo-name {
335 white-space: nowrap ;
338 /* "booktabs" style (no vertical lines) */
339 table.docutils.booktabs {
341 border-top: 2px solid;
342 border-bottom: 2px solid;
343 border-collapse: collapse;
345 table.docutils.booktabs * {
348 table.docutils.booktabs th {
349 border-bottom: thin solid;
353 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
354 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
358 list-style-type: none }
363 <div class="document" id="boost-pointer-container-library">
364 <h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
366 <div class="section" id="class-reversible-ptr-container">
367 <h1>Class <tt class="docutils literal">reversible_ptr_container</tt></h1>
368 <p>This class is not a real class that can be found in the library.
369 Its purpose is to present the general interface of all the pointer containers.</p>
370 <p><strong>Hierarchy:</strong></p>
372 <li><tt class="docutils literal">reversible_ptr_container</tt><ul>
373 <li><a class="reference external" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
374 <li><a class="reference external" href="ptr_vector.html">ptr_vector</a></li>
375 <li><a class="reference external" href="ptr_list.html">ptr_list</a></li>
376 <li><a class="reference external" href="ptr_deque.html">ptr_deque</a></li>
377 <li><a class="reference external" href="ptr_array.html">ptr_array</a></li>
380 <li><a class="reference external" href="associative_ptr_container.html">associative_ptr_container</a><ul>
381 <li><a class="reference external" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
382 <li><a class="reference external" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
383 <li><a class="reference external" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
384 <li><a class="reference external" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
385 <li><a class="reference external" href="ptr_set.html">ptr_set</a></li>
386 <li><a class="reference external" href="ptr_multiset.html">ptr_multi_set</a></li>
387 <li><a class="reference external" href="ptr_map.html">ptr_map</a></li>
388 <li><a class="reference external" href="ptr_multimap.html">ptr_multimap</a></li>
396 <p><strong>Navigate:</strong></p>
398 <li><a class="reference external" href="ptr_container.html">home</a></li>
399 <li><a class="reference external" href="reference.html">reference</a></li>
401 <p><strong>synopsis:</strong></p>
402 <pre class="literal-block">
408 class CloneAllocator,
409 class VoidPtrContainer
411 class reversible_ptr_container
413 public: // <a class="reference internal" href="#typedefs">typedefs</a>
414 typedef T* value_type;
415 typedef T& reference;
416 typedef const T& const_reference;
417 typedef <em>implementation defined</em> iterator;
418 typedef <em>implementation defined</em> const_iterator;
419 typedef typename VoidPtrContainer::differnce_type difference_type;
420 typedef typename VoidPtrContainer::size_type size_type;
421 typedef typename VoidPtrContainer::allocator_type allocator_type;
422 typedef <em>implementation defined</em> reverse_iterator;
423 typedef <em>implementation defined</em> const_reverse_iterator;
424 typedef <em>implementation defined</em> auto_type;
426 public: // <a class="reference internal" href="#construct-copy-destroy">construct/copy/destroy</a>
427 reversible_ptr_container();
428 explicit reversible_ptr_container( const reversible_ptr_container& r );
429 template< class Derived >
430 explicit reversible_ptr_container( const reversible_ptr_container<Derived>& r );
431 explicit reversible_ptr_container( <a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><reversible_ptr_container> r );
432 template< class InputIterator >
433 reversible_ptr_container( InputIterator first, InputIterator last );
435 ~reversible_ptr_container();
437 reversible_ptr_container& operator=( const reversible_ptr_container& r );
438 template<class Derived>
439 reversible_ptr_container& operator=( const reversible_ptr_container<Derived>& r );
440 reversible_ptr_container& operator=( <a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><reversible_ptr_container> r );
441 allocator_type get_allocator() const;
443 public: // <a class="reference internal" href="#iterators">iterators</a>
445 const_iterator begin() const;
447 const_iterator end() const;
448 reverse_iterator rbegin();
449 const_reverse_iterator rbegin() const;
450 reverse_iterator rend();
451 const_reverse_iterator rend() const;
453 public: // <a class="reference internal" href="#capacity">capacity</a>
454 size_type size() const;
455 size_type max_size() const;
458 public: // <a class="reference internal" href="#modifiers">modifiers</a>
459 void swap( reversible_ptr_container& r );
461 VoidPtrContainer& base();
462 const VoidPtrContainer& base() const;
464 public: // <a class="reference internal" href="#pointer-container-requirements">pointer container requirements</a>
465 auto_type replace( iterator position, T* x );
466 template< class U >
467 auto_type replace( iterator position, <a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><U> x );
468 <a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><reversible_ptr_container> clone() const;
469 <a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><reversible_ptr_container> release();
470 auto_type release( iterator position );
472 }; // class 'reversible_ptr_container'
474 // <a class="reference internal" href="#comparison">comparison</a>
475 template < class T, class CA, class VPC >
476 bool operator==( const reversible_ptr_container<T,CA,VPC>& x,
477 const reversible_ptr_container<T,CA,VPC>& y);
479 template < class T, class CA, class VPC >
480 bool operator<( const reversible_ptr_container<T,CA,VPC>& x,
481 const reversible_ptr_container<T,CA,VPC>& y);
483 template < class T, class CA, class VPC >
484 bool operator!=( const reversible_ptr_container<T,CA,VPC>& x,
485 const reversible_ptr_container<T,CA,VPC>& y);
487 template < class T, class CA, class VPC >
488 bool operator>( const reversible_ptr_container<T,CA,VPC>& x,
489 const reversible_ptr_container<T,CA,VPC>& y);
491 template < class T, class CA, class VPC >
492 bool operator>=( const reversible_ptr_container<T,CA,VPC>& x,
493 const reversible_ptr_container<T,CA,VPC>& y);
495 template < class T, class CA, class VPC >
496 bool operator<=( const reversible_ptr_container<T,CA,VPC>& x,
497 const reversible_ptr_container<T,CA,VPC>& y);
499 template< class T, class CA, class VPC >
500 void swap( reversible_ptr_container<T,CA,VPC>& x,
501 reversible_ptr_container<T,CA,VPC>& y );
503 // <a class="reference internal" href="#cloneability">cloneability</a>
504 template< class T, class CA, class VPC >
505 reversible_ptr_container<T,CA,VPC>*
506 new_clone( const reversible_ptr_container<T,CA,VPC>& r );
508 // <a class="reference internal" href="#null-predicate">null predicate</a>
509 template< class Iterator >
510 bool is_null( Iterator i );
512 // <a class="reference internal" href="#serialization">serialization</a>
513 template<class Archive, class T, class CA, class VPC>
514 void serialize( Archive& ar, reversible_ptr_container<T,CÁ,VPC>& c, const unsigned int version );
517 } // namespace 'boost'
520 <div class="section" id="semantics">
522 <div class="section" id="semantics-typedefs">
523 <span id="typedefs"></span><h2>Semantics: typedefs</h2>
524 <p>Notice how these two types differ:</p>
526 <li><p class="first"><tt class="docutils literal">typedef T* value_type;</tt></p>
529 <li>notice this has pointer type</li>
533 <li><p class="first"><tt class="docutils literal">typedef T& reference;</tt></p>
536 <li>notice this is not a pointer type</li>
541 <p>This is done to be able to add pointers directly
542 to the container, but to hide the pointers externally.</p>
543 <!-- - ``typedef *implementation defined* object_type;``
544 - this is ``T`` for sequences and sets
545 - this is ``std::pair<const Key, void*>`` for maps -->
546 <p>Also notice that</p>
548 <li><tt class="docutils literal">typedef ... iterator</tt></li>
550 <p>allows one to iterate over <tt class="docutils literal">T&</tt> objects, not <tt class="docutils literal">T*</tt>.
552 <pre class="literal-block">
556 <p>returns an iterator that allows one to iterate over <tt class="docutils literal">void*</tt>
557 elements (<em>this is very rarely needed and you should not use the
558 functionality unless you know what you are doing</em>).</p>
560 <li><tt class="docutils literal">typedef ... auto_type</tt></li>
562 <p>This declaration hides a pointer pointer type. You can rely on the following
564 <pre class="literal-block">
565 T* operator->() const;
566 T& operator*() const;
569 operator <em>implementation-defined bool</em>();
571 <p>The destructor will delete the stored object <em>using the clone allocator of the container</em>
572 (this explains why we cannot use <tt class="docutils literal"><span class="pre">std::auto_ptr<T></span></tt> nor <tt class="docutils literal"><span class="pre">std::unique_ptr<T></span></tt>). It might help to
573 think it is just a <tt class="docutils literal"><span class="pre"><a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><T></span></tt>. You can also return
574 the pointer from a function or assign it to another pointer via the <tt class="docutils literal">move()</tt>
576 <pre class="literal-block">
578 auto_type other = boost::ptr_container::move( ptr );
579 return boost::ptr_container::move( other );
582 <div class="section" id="semantics-construct-copy-destroy">
583 <span id="construct-copy-destroy"></span><h2>Semantics: construct/copy/destroy</h2>
585 <li><p class="first"><tt class="docutils literal"><span class="pre">reversible_ptr_container();</span></tt></p>
588 <li>Effects: Constructs an empty container</li>
589 <li>Postconditions: <tt class="docutils literal">size() == 0</tt></li>
594 <!-- - ``reversible_ptr_container( size_type n, const T& x );``
596 - Effects: Constructs a container with ``n`` clones of ``x``
598 - Postconditions: ``size() == n`` -->
600 <li><p class="first"><tt class="docutils literal">explicit reversible_ptr_container( const reversible_ptr_container& r );</tt></p>
603 <li>Effects: Constructs a container by cloning all elements of <tt class="docutils literal">r</tt></li>
607 <li><p class="first"><tt class="docutils literal">template< class Derived > explicit reversible_ptr_container( const reversible_ptr_container<Derived>& r );</tt></p>
610 <li>Effects: Constructs a container by cloning all elements of <tt class="docutils literal">r</tt></li>
611 <li>Requirements: <tt class="docutils literal">Derived</tt> is derived from <tt class="docutils literal">T</tt></li>
615 <li><p class="first"><tt class="docutils literal">explicit reversible_ptr_container( <span class="pre"><a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><</span> reversible_ptr_container > r );</tt></p>
618 <li>Effects: Constructs a container by taking ownership of the supplied pointers</li>
622 <li><p class="first"><tt class="docutils literal">template< class InputIterator ></tt>
623 <tt class="docutils literal">reversible_ptr_container( InputIterator first, InputIterator last );</tt></p>
626 <li>Requirements: <tt class="docutils literal">(first,last]</tt> is a valid range</li>
627 <li>Effects: Constructs a container with a cloned range of <tt class="docutils literal">(first,last]</tt></li>
628 <li>Postconditions: <tt class="docutils literal">size() == <span class="pre">std::distance(</span> first, last )</tt></li>
632 <li><p class="first"><tt class="docutils literal"><span class="pre">~reversible_ptr_container();</span></tt></p>
635 <li>Effects: Deletes the stored objects via the clone allocator</li>
636 <li>Throws: Nothing</li>
640 <li><p class="first"><tt class="docutils literal">reversible_ptr_container& operator=( const reversible_ptr_container& r );</tt></p>
643 <li>Effects: Assigns a clone of <tt class="docutils literal">r</tt></li>
644 <li>Exception safety: strong guarantee</li>
648 <li><p class="first"><tt class="docutils literal">template<class Derived> reversible_ptr_container& operator=( const reversible_ptr_container<Derived>& r );</tt></p>
651 <li>Effects: Assigns a clone of <tt class="docutils literal">r</tt></li>
652 <li>Requirements: <tt class="docutils literal">Derived</tt> is derived from <tt class="docutils literal">T</tt></li>
653 <li>Exception safety: Strong guarantee</li>
657 <li><p class="first"><tt class="docutils literal">reversible_ptr_container& operator=( <span class="pre"><a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><reversible_ptr_container></span> r );</tt></p>
660 <li>Effects: Deletes the stored objects and then takes ownership of the supplied pointers</li>
661 <li>Throws: Nothing</li>
665 <li><p class="first"><tt class="docutils literal">allocator_type get_allocator() const;</tt></p>
668 <li>Effects: Returns a copy of the allocator of the container object</li>
674 <div class="section" id="semantics-iterators">
675 <span id="iterators"></span><h2>Semantics: iterators</h2>
676 <p><strong>See also:</strong> <a class="reference external" href="conventions.html#iterators-are-invalidated-as-in-the-corresponding-standard-container">iterator invalidation</a></p>
678 <li><p class="first"><tt class="docutils literal">iterator <span class="pre">begin();</span></tt></p>
680 <li><p class="first"><tt class="docutils literal">const_iterator begin() const;</tt></p>
683 <li>Effects: Returns a mutable/non-mutable iterator with <tt class="docutils literal">value_type T</tt></li>
684 <li>Throws: Nothing</li>
688 <li><p class="first"><tt class="docutils literal">iterator <span class="pre">end();</span></tt></p>
690 <li><p class="first"><tt class="docutils literal">const_iterator end() const;</tt></p>
693 <li>Effects: Returns a mutable/non-mutable iterator with <tt class="docutils literal">value_type T</tt></li>
694 <li>Throws: Nothing</li>
698 <li><p class="first"><tt class="docutils literal">reverse_iterator <span class="pre">rbegin();</span></tt></p>
700 <li><p class="first"><tt class="docutils literal">const_reverse_iterator rbegin() const;</tt></p>
703 <li>Effects: Returns a mutable/non-mutable reverse iterator with <tt class="docutils literal">value_type T</tt></li>
704 <li>Throws: Nothing</li>
708 <li><p class="first"><tt class="docutils literal">reverse_iterator <span class="pre">rend();</span></tt></p>
710 <li><p class="first"><tt class="docutils literal">const_reverse_iterator rend() const;</tt></p>
713 <li>Effects: Returns a mutable/non-mutable reverse iterator with <tt class="docutils literal">value_type T</tt></li>
714 <li>Throws: Nothing</li>
720 <div class="section" id="semantics-capacity">
721 <span id="capacity"></span><h2>Semantics: capacity</h2>
723 <li><p class="first"><tt class="docutils literal">size_type size() const;</tt></p>
726 <li>Effects: Returns the number of stored elements</li>
727 <li>Throws: Nothing</li>
731 <li><p class="first"><tt class="docutils literal">size_type max_size() const;</tt></p>
734 <li>Effects: Returns the maximum number of stored elements</li>
735 <li>Throws: Nothing</li>
739 <li><p class="first"><tt class="docutils literal">bool empty() const;</tt></p>
742 <li>Effects: Returns whether the container is empty or not</li>
743 <li>Throws: Nothing</li>
749 <div class="section" id="semantics-modifiers">
750 <span id="modifiers"></span><h2>Semantics: modifiers</h2>
752 <li><p class="first"><tt class="docutils literal">void swap( reversible_ptr_container& r );</tt></p>
755 <li>Effects: Swaps the content of the two containers</li>
756 <li>Throws: Nothing</li>
760 <li><p class="first"><tt class="docutils literal">void <span class="pre">clear();</span></tt></p>
763 <li>Effects: Destroys all object of the container</li>
764 <li>Postconditions: <tt class="docutils literal">empty() == true</tt></li>
765 <li>Throws: Nothing</li>
769 <li><p class="first"><tt class="docutils literal">VoidPtrContainer& <span class="pre">base();</span></tt></p>
771 <li><p class="first"><tt class="docutils literal">const VoidPtrContainer& base() const;</tt></p>
774 <li>Returns: a reference to the wrapped container</li>
780 <div class="section" id="semantics-pointer-container-requirements">
781 <span id="pointer-container-requirements"></span><h2>Semantics: pointer container requirements</h2>
783 <li><p class="first"><tt class="docutils literal">auto_type replace( iterator position, T* x );</tt></p>
786 <li>Requirements: <tt class="docutils literal">not empty() and x != 0</tt></li>
787 <li>Effects: returns the object pointed to by <tt class="docutils literal">position</tt> and replaces it with <tt class="docutils literal">x</tt>.</li>
788 <li>Throws: <tt class="docutils literal">bad_ptr_container_operation</tt> if the container is empty and <tt class="docutils literal">bad_pointer</tt> if <tt class="docutils literal">x == 0</tt>.</li>
789 <li>Exception safety: Strong guarantee</li>
793 <li><p class="first"><tt class="docutils literal">template< class U > auto_type replace( iterator position, <span class="pre"><a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><U></span> x );</tt></p>
796 <li>Effects: <tt class="docutils literal">return replace( position, x.release() );</tt></li>
800 <li><p class="first"><tt class="docutils literal"><span class="pre"><a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><</span> reversible_ptr_container > clone() const;</tt></p>
803 <li>Effects: Returns a deep copy of the container</li>
804 <li>Throws: <tt class="docutils literal"><span class="pre">std::bad_alloc</span></tt> if there is not enough memory to make a clone of the container</li>
805 <li>Complexity: Linear</li>
809 <li><p class="first"><tt class="docutils literal"><span class="pre"><a class="reference external" href="compatible_smart_ptr.html"><em>compatible-smart-ptr</em></a><</span> reversible_ptr_container > <span class="pre">release();</span></tt></p>
812 <li>Effects: Releases ownership of the container. This is a useful way of returning a container from a function.</li>
813 <li>Postconditions: <tt class="docutils literal">empty() == true</tt></li>
814 <li>Throws: <tt class="docutils literal"><span class="pre">std::bad_alloc</span></tt> if the return value cannot be allocated</li>
815 <li>Exception safety: Strong guarantee</li>
819 <li><p class="first"><tt class="docutils literal">auto_type release( iterator position );</tt></p>
822 <li>Requirements: <tt class="docutils literal">not <span class="pre">empty();</span></tt></li>
823 <li>Effects: Releases ownership of the pointer referred to by position</li>
824 <li>Postconditions: <tt class="docutils literal">size()</tt> is one less</li>
825 <li>Throws: <tt class="docutils literal">bad_ptr_container_operation</tt> if the container is empty</li>
826 <li>Exception safety: Strong guarantee</li>
832 <div class="section" id="semantics-comparison">
833 <span id="comparison"></span><h2>Semantics: comparison</h2>
834 <p>These functions compare the underlying range of objects.
836 <pre class="literal-block">
837 operation( const ptr_container& l, const ptr_container& r );
839 <p>has the effect one would expect of normal standard containers. Hence
840 objects are compared and not the pointers to objects.</p>
842 <div class="section" id="semantics-cloneability">
843 <span id="cloneability"></span><h2>Semantics: cloneability</h2>
845 <li><p class="first"><tt class="docutils literal">template< class T, class CloneAllocator >
846 reversible_ptr_container<T,CA,VPC>*
847 new_clone( const reversible_ptr_container<T,CA,VPC>& r );</tt></p>
850 <li>Effects: <tt class="docutils literal">return <span class="pre">r.clone().release();</span></tt></li>
851 <li>Remarks: This function is only defined for concrete <a class="reference external" href="ptr_container.html#smart-containers">pointer containers</a>, but not for
852 <a class="reference external" href="ptr_container.html#smart-container-adapters">pointer container adapters</a>.</li>
858 <div class="section" id="semantics-null-predicate">
859 <span id="null-predicate"></span><h2>Semantics: null predicate</h2>
861 <li><p class="first"><tt class="docutils literal">template< class Iterator > bool is_null( Iterator i );</tt></p>
864 <li>Requirements: <tt class="docutils literal">i</tt> is a valid dereferencable iterator</li>
865 <li>Returns: <tt class="docutils literal">*i.base() == 0;</tt></li>
871 <div class="section" id="semantics-serialization">
872 <span id="serialization"></span><h2>Semantics: serialization</h2>
873 <p>All containers can be serialized by means of
874 <a class="reference external" href="../../serialization/index.html">Boost.Serialization</a>. For an overview, see
875 <a class="reference external" href="reference.html#serialization">Serialization of Pointer Containers</a>.</p>
877 <pre class="literal-block">
878 template<class Archive, class T, class CA, class VPC>
879 void serialize( Archive& ar, reversible_ptr_container<T,CA,VPC>& c, const unsigned int version );
883 <li>Effects: Saves or loads the container to/from the archive.</li>
884 <li>Remarks: This function is called automatically be stream operators in
885 Boost.Serialization</li>
886 <li>Exception safety: Loading gives the basic guarantee</li>
888 <hr><table class="docutils field-list" frame="void" rules="none">
889 <col class="field-name" />
890 <col class="field-body" />
892 <tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2007. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>