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.3.10: http://docutils.sourceforge.net/" />
7 <title>Boost Pointer Container Library</title>
8 <style type="text/css">
11 :Author: David Goodger
12 :Contact: goodger@users.sourceforge.net
15 :Copyright: This stylesheet has been placed in the public domain.
17 Default cascading style sheet for the HTML output of Docutils.
19 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
20 customize this style sheet.
23 /* "! important" is used here to override other ``margin-top`` and
24 ``margin-bottom`` styles that are later in the stylesheet or
25 more specific. See http://www.w3.org/TR/CSS1#the-cascade */
27 margin-top: 0 ! important }
29 .last, .with-subtitle {
30 margin-bottom: 0 ! important }
36 text-decoration: none ;
43 margin-bottom: 0.5em }
45 /* Uncomment (and remove this text!) to get bold-faced definition list terms
53 div.abstract p.topic-title {
57 div.admonition, div.attention, div.caution, div.danger, div.error,
58 div.hint, div.important, div.note, div.tip, div.warning {
60 border: medium outset ;
63 div.admonition p.admonition-title, div.hint p.admonition-title,
64 div.important p.admonition-title, div.note p.admonition-title,
65 div.tip p.admonition-title {
67 font-family: sans-serif }
69 div.attention p.admonition-title, div.caution p.admonition-title,
70 div.danger p.admonition-title, div.error p.admonition-title,
71 div.warning p.admonition-title {
74 font-family: sans-serif }
76 /* Uncomment (and remove this text!) to get reduced vertical space in
78 div.compound .compound-first, div.compound .compound-middle {
79 margin-bottom: 0.5em }
81 div.compound .compound-last, div.compound .compound-middle {
90 div.dedication p.topic-title {
97 div.footer, div.header {
106 div.line-block div.line-block {
113 border: medium outset ;
115 background-color: #ffffee ;
120 div.sidebar p.rubric {
121 font-family: sans-serif ;
124 div.system-messages {
127 div.system-messages h1 {
131 border: medium outset ;
134 div.system-message p.system-message-title {
141 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
142 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
163 ol.simple, ul.simple {
167 list-style: decimal }
170 list-style: lower-alpha }
173 list-style: upper-alpha }
176 list-style: lower-roman }
179 list-style: upper-roman }
193 white-space: nowrap }
202 font-family: sans-serif ;
207 font-family: sans-serif ;
223 pre.literal-block, pre.doctest-block {
226 background-color: #eeeeee }
229 font-family: sans-serif ;
230 font-style: oblique }
232 span.classifier-delimiter {
233 font-family: sans-serif ;
237 font-family: sans-serif }
240 white-space: nowrap }
248 span.section-subtitle {
249 /* font-size relative to parent (h1..h6 element) */
253 border-left: solid thin gray }
260 margin-bottom: 0.5em }
263 border-left: solid thin black }
265 table.docutils td, table.docutils th,
266 table.docinfo td, table.docinfo th {
267 padding-left: 0.5em ;
268 padding-right: 0.5em ;
269 vertical-align: top }
271 table.docutils th.field-name, table.docinfo th.docinfo-name {
274 white-space: nowrap ;
277 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
278 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
282 background-color: #eeeeee }
285 list-style-type: none }
290 <div class="document" id="boost-pointer-container-library">
291 <h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
292 <h2 class="subtitle" id="reference">Reference</h2>
293 <p>The documentation is divided into an explanation for
294 each container. When containers have the same interface, that common interface is explained only once,
295 but links are always provided to more relevant information.
296 Please make sure you understand
297 the <a class="reference" href="reference.html#the-Clonable-concept">Clonable</a> concept and
298 the <a class="reference" href="reference.html#the-clone-allocator-concept">Clone Allocator</a> concept.</p>
300 <li><a class="reference" href="conventions.html">Conventions</a></li>
301 <li><a class="reference" href="#the-clonable-concept">The Clonable concept</a></li>
302 <li><a class="reference" href="#the-clone-allocator-concept">The Clone Allocator concept</a></li>
303 <li><a class="reference" href="#class-hierarchy">Class hierarchy</a>:<ul>
304 <li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
305 <li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
306 <li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
307 <li><a class="reference" href="ptr_list.html">ptr_list</a></li>
308 <li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
309 <li><a class="reference" href="ptr_array.html">ptr_array</a></li>
312 <li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
313 <li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
314 <li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
315 <li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
316 <li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
317 <li><a class="reference" href="ptr_set.html">ptr_set</a></li>
318 <li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
319 <li><a class="reference" href="ptr_map.html">ptr_map</a></li>
320 <li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
329 <li><a class="reference" href="#serialization">Serialization</a></li>
330 <li><a class="reference" href="indirect_fun.html">Indirected functions</a></li>
331 <li><a class="reference" href="ptr_inserter.html">Insert iterators</a></li>
332 <li><a class="reference" href="#class-nullable">Class nullable</a></li>
333 <li><a class="reference" href="#exception-classes">Exception classes</a></li>
334 <li><a class="reference" href="#disabling-the-use-of-exceptions">Disabling the use of exceptions</a></li>
336 <!-- - Class `reversible_ptr_container <reversible_ptr_container.html>`_
337 - Class `associative_ptr_container <associative_ptr_container.html>`_
338 - `Pointer container adapters`_
340 - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
341 - `ptr_set_adapter <ptr_set_adapter.html>`_
342 - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
343 - `ptr_map_adapter <ptr_map_adapter.html>`_
344 - `ptr_multimap_adapter <ptr_multimap_adapter.html>`_
345 - `Sequence containers`_
347 - `ptr_vector <ptr_vector.html>`_
348 - `ptr_deque <ptr_deque.html>`_
349 - `ptr_list <ptr_list.html>`_
350 - `ptr_array <ptr_array.html>`_
351 - `Associative containers`_
353 - `ptr_set <ptr_set.html>`_
354 - `ptr_multiset <ptr_multiset.html>`_
355 - `ptr_map <ptr_map.html>`_
356 - `ptr_multimap <ptr_multimap.html>`_ -->
357 <div class="section">
358 <h1><a id="the-clonable-concept" name="the-clonable-concept">The Clonable concept</a></h1>
359 <p><strong>Refinement of</strong></p>
361 <li>Heap Allocable</li>
362 <li>Heap Deallocable</li>
364 <p>The Clonable concept is introduced to formalize the requirements for
365 copying heap-allocated objects. A type <tt class="docutils literal"><span class="pre">T</span></tt> might be Clonable even though it
366 is not Assignable or Copy Constructible. Notice that many operations on
367 the containers do not even require the stored type to be Clonable.</p>
368 <p><strong>Notation</strong></p>
369 <table border="1" class="docutils">
377 <tr><td><strong>Type</strong></td>
378 <td><strong>Object</strong> (<tt class="docutils literal"><span class="pre">const</span></tt> or non-<tt class="docutils literal"><span class="pre">const</span></tt>)</td>
379 <td><strong>Pointer</strong></td>
380 <td><strong>Describes</strong></td>
382 <tr><td><tt class="docutils literal"><span class="pre">T</span></tt></td>
383 <td><tt class="docutils literal"><span class="pre">a</span></tt></td>
384 <td><tt class="docutils literal"><span class="pre">ptr</span></tt></td>
385 <td>A Clonable type</td>
389 <p><strong>Valid expressions</strong></p>
390 <table border="1" class="docutils">
398 <tr><td><strong>Expression</strong></td>
399 <td><strong>Type</strong></td>
400 <td><strong>Semantics</strong></td>
401 <td><strong>Postcondition</strong></td>
403 <tr><td><tt class="docutils literal"><span class="pre">new_clone(a);</span></tt></td>
404 <td><tt class="docutils literal"><span class="pre">T*</span></tt></td>
405 <td>Allocate a new object that can be considered equivalent to the <tt class="docutils literal"><span class="pre">a</span></tt> object</td>
406 <td><tt class="docutils literal"><span class="pre">typeid(*new_clone(a))</span> <span class="pre">==</span> <span class="pre">typeid(a)</span></tt></td>
408 <tr><td><tt class="docutils literal"><span class="pre">delete_clone(ptr);</span></tt></td>
409 <td><tt class="docutils literal"><span class="pre">void</span></tt></td>
410 <td>Deallocate an object previously allocated with <tt class="docutils literal"><span class="pre">allocate_clone()</span></tt>. Must not throw</td>
415 <div class="section">
416 <h2><a id="default-implementation" name="default-implementation">Default implementation</a></h2>
417 <p>In the <tt class="docutils literal"><span class="pre"><boost/ptr_container/clone_allocator.hpp></span></tt> header a default implementation
418 of the two functions is given:</p>
419 <pre class="literal-block">
422 template< class T >
423 inline T* new_clone( const T& t )
428 template< class T >
429 void delete_clone( const T* t )
435 <p>Notice that this implementation makes normal Copy Constructible classes automatically
436 Clonable unless <tt class="docutils literal"><span class="pre">operator</span> <span class="pre">new()</span></tt> or <tt class="docutils literal"><span class="pre">operator</span> <span class="pre">delete()</span></tt> are hidden.</p>
437 <p>The two functions represent a layer of indirection which is necessary to support
438 classes that are not Copy Constructible by default. Notice that the implementation
439 relies on argument-dependent lookup (ADL) to find the right version of
440 <tt class="docutils literal"><span class="pre">new_clone()</span></tt> and <tt class="docutils literal"><span class="pre">delete_clone()</span></tt>. This means that one does not need to overload or specialize
441 the function in the boost namespace, but it can be placed together with
442 the rest of the interface of the class. If you are implementing a class
443 inline in headers, remember to forward declare the functions.</p>
444 <p><strong>Warning: We are considering the removal of default implementation above. Therefore always make sure that you overload the functions for your types and do not rely on the defaults in any way.</strong></p>
447 <div class="section">
448 <h1><a id="the-clone-allocator-concept" name="the-clone-allocator-concept">The Clone Allocator concept</a></h1>
449 <p>The Clone Allocator concept is introduced to formalize the way
450 pointer containers control memory of
451 the stored objects (and not the pointers to the stored objects).
452 The clone allocator allows
453 users to apply custom allocators/deallocators for the cloned objects.</p>
454 <p>More information can be found below:</p>
455 <div class="contents local topic">
457 <li><a class="reference" href="#clone-allocator-requirements" id="id19" name="id19">Clone Allocator requirements</a></li>
458 <li><a class="reference" href="#class-heap-clone-allocator" id="id20" name="id20">Class <tt class="docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></li>
459 <li><a class="reference" href="#class-view-clone-allocator" id="id21" name="id21">Class <tt class="docutils literal"><span class="pre">view_clone_allocator</span></tt></a></li>
462 <div class="section">
463 <h2><a class="toc-backref" href="#id19" id="clone-allocator-requirements" name="clone-allocator-requirements">Clone Allocator requirements</a></h2>
464 <p><strong>Notation</strong></p>
465 <table border="1" class="docutils">
472 <tr><td><strong>Type</strong></td>
473 <td><strong>Object</strong> (<tt class="docutils literal"><span class="pre">const</span></tt> or non-<tt class="docutils literal"><span class="pre">const</span></tt>)</td>
474 <td><strong>Describes</strong></td>
476 <tr><td><tt class="docutils literal"><span class="pre">T</span></tt></td>
477 <td><tt class="docutils literal"><span class="pre">a</span></tt></td>
480 <tr><td><tt class="docutils literal"><span class="pre">T*</span></tt></td>
481 <td><tt class="docutils literal"><span class="pre">ptr</span></tt></td>
482 <td>A pointer to <tt class="docutils literal"><span class="pre">T</span></tt></td>
486 <p><strong>Valid expressions</strong></p>
487 <table border="1" class="docutils">
495 <tr><td><strong>Expression</strong></td>
496 <td><strong>Type</strong></td>
497 <td><strong>Semantics</strong></td>
498 <td><strong>Postcondition</strong></td>
500 <tr><td><tt class="docutils literal"><span class="pre">CloneAllocator::allocate_clone(a);</span></tt></td>
501 <td><tt class="docutils literal"><span class="pre">T*</span></tt></td>
502 <td>Allocate a new object that can be considered equivalent to the
503 <tt class="docutils literal"><span class="pre">a</span></tt> object</td>
504 <td><tt class="docutils literal"><span class="pre">typeid(*CloneAllocator::allocate_clone(a))</span> <span class="pre">==</span> <span class="pre">typeid(a)</span></tt></td>
506 <tr><td><tt class="docutils literal"><span class="pre">CloneAllocator::deallocate_clone(ptr);</span></tt></td>
507 <td><tt class="docutils literal"><span class="pre">void</span></tt></td>
508 <td>Deallocate an object previously allocated with
509 <tt class="docutils literal"><span class="pre">CloneAllocator::allocate_clone()</span></tt> or a compatible allocator.
515 <p>The library comes with two predefined clone allocators.</p>
517 <div class="section">
518 <h2><a class="toc-backref" href="#id20" id="class-heap-clone-allocator" name="class-heap-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></h2>
519 <p>This is the default clone allocator used by all pointer containers. For most
520 purposes you will never have to change this default.</p>
521 <p><strong>Definition</strong></p>
522 <pre class="literal-block">
525 struct heap_clone_allocator
527 template< class U >
528 static U* allocate_clone( const U& r )
530 return new_clone( r );
533 template< class U >
534 static void deallocate_clone( const U* r )
541 <p>Notice that the above definition allows you to support custom allocation
542 schemes by relying on <tt class="docutils literal"><span class="pre">new_clone()</span></tt> and <tt class="docutils literal"><span class="pre">delete_clone()</span></tt>.</p>
544 <div class="section">
545 <h2><a class="toc-backref" href="#id21" id="class-view-clone-allocator" name="class-view-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">view_clone_allocator</span></tt></a></h2>
546 <p>This class provides a way to remove ownership properties of the
547 pointer containers. As its name implies, this means that you can
548 instead use the pointer containers as a view into an existing
550 <p><strong>Definition</strong></p>
551 <pre class="literal-block">
554 struct view_clone_allocator
556 template< class U >
557 static U* allocate_clone( const U& r )
559 return const_cast<U*>(&r);
562 template< class U >
563 static void deallocate_clone( const U* )
572 - `Changing the clone allocator <examples.html#changing-the-clone-allocator>`_ -->
575 <div class="section">
576 <h1><a id="class-hierarchy" name="class-hierarchy">Class hierarchy</a></h1>
577 <p>The library consists of the following types of classes:</p>
578 <ol class="arabic simple">
579 <li>Pointer container adapters</li>
582 <ol class="arabic simple" start="2">
583 <li>Pointer containers</li>
585 <p>The pointer container adapters are used when you
586 want to make a pointer container starting from
587 your own "normal" container. For example, you
588 might have a map class that extends <tt class="docutils literal"><span class="pre">std::map</span></tt>
589 in some way; the adapter class then allows you
590 to use your map class as a basis for a new
591 pointer container.</p>
592 <p>The library provides an adapter for each type
593 of standard container highlighted as links below:</p>
595 <li><tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt><ul>
596 <li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
597 <li><tt class="docutils literal"><span class="pre">ptr_vector</span></tt></li>
598 <li><tt class="docutils literal"><span class="pre">ptr_list</span></tt></li>
599 <li><tt class="docutils literal"><span class="pre">ptr_deque</span></tt></li>
600 <li><tt class="docutils literal"><span class="pre">ptr_array</span></tt></li>
603 <li><tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt><ul>
604 <li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
605 <li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
606 <li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
607 <li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
608 <li><tt class="docutils literal"><span class="pre">ptr_set</span></tt></li>
609 <li><tt class="docutils literal"><span class="pre">ptr_multi_set</span></tt></li>
610 <li><tt class="docutils literal"><span class="pre">ptr_map</span></tt></li>
611 <li><tt class="docutils literal"><span class="pre">ptr_multimap</span></tt></li>
619 <p>The pointer containers of this library are all built using
620 the adapters. There is a pointer container
621 for each type of "normal" standard container highlighted as links below.</p>
623 <li><tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt><ul>
624 <li><tt class="docutils literal"><span class="pre">ptr_sequence_adapter</span></tt><ul>
625 <li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
626 <li><a class="reference" href="ptr_list.html">ptr_list</a></li>
627 <li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
628 <li><a class="reference" href="ptr_array.html">ptr_array</a></li>
631 <li><tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt><ul>
632 <li><tt class="docutils literal"><span class="pre">ptr_set_adapter</span></tt></li>
633 <li><tt class="docutils literal"><span class="pre">ptr_multiset_adapter</span></tt></li>
634 <li><tt class="docutils literal"><span class="pre">ptr_map_adapter</span></tt></li>
635 <li><tt class="docutils literal"><span class="pre">ptr_multi_map_adapter</span></tt><ul>
636 <li><a class="reference" href="ptr_set.html">ptr_set</a></li>
637 <li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
638 <li><a class="reference" href="ptr_map.html">ptr_map</a></li>
639 <li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
648 <div class="section">
649 <h1><a id="serialization" name="serialization">Serialization</a></h1>
650 <p>As of version 1.34.0 of Boost, the library supports
651 serialization via <a class="reference" href="../../serialization/index.html">Boost.Serialization</a>.</p>
652 <p>Of course, for serialization to work it is required
653 that the stored type itself is serializable. For maps, both
654 the key type and the mapped type must be serializable.</p>
655 <p>When dealing with serialization (and serialization of polymophic objects in particular),
656 pay special attention to these parts of Boost.Serialization:</p>
658 <li><p class="first">Output/saving requires a const-reference:</p>
659 <pre class="literal-block">
661 // serialization helper: we can't save a non-const object
663 template< class T >
664 inline T const& as_const( T const& r )
671 std::ofstream ofs("filename");
672 boost::archive::text_oarchive oa(ofs);
673 oa << as_const(cont);
675 <p>See <a class="reference" href="../../serialization/doc/rationale.html#trap">Compile time trap when saving a non-const value</a> for
679 <ol class="arabic" start="2">
680 <li><p class="first">Derived classes need to call <tt class="docutils literal"><span class="pre">base_object()</span></tt> function:</p>
681 <pre class="literal-block">
682 struct Derived : Base
684 template< class Archive >
685 void serialize( Archive& ar, const unsigned int version )
687 ar & boost::serialization::base_object<Base>( *this );
692 <p>For details, see <a class="reference" href="../../serialization/doc/tutorial.html#derivedclasses">Derived Classes</a>.</p>
695 <ol class="arabic" start="3">
696 <li><p class="first">You need to use <tt class="docutils literal"><span class="pre">BOOST_CLASS_EXPORT</span></tt> to register the
697 derived classes in your class hierarchy:</p>
698 <pre class="literal-block">
699 BOOST_CLASS_EXPORT( Derived )
701 <p>See <a class="reference" href="../../serialization/doc/traits.html#export">Export Key</a> and <a class="reference" href="../../serialization/doc/special.html">Object Tracking</a>
705 <p>Remember these three issues and it might save you some trouble.</p>
706 <!-- Map iterator operations
707 +++++++++++++++++++++++
709 The map iterators are a bit different compared to the normal ones. The
710 reason is that it is a bit clumsy to access the key and the mapped object
711 through i->first and i->second, and one tends to forget what is what.
712 Moreover, and more importantly, we also want to hide the pointer as much as possibble.
713 The new style can be illustrated with a small example::
715 typedef ptr_map<string,int> map_t;
717 m[ "foo" ] = 4; // insert pair
718 m[ "bar" ] = 5; // ditto
720 for( map_t::iterator i = m.begin(); i != m.end(); ++i )
722 *i += 42; // add 42 to each value
723 cout << "value=" << *i << ", key=" << i.key() << "n";
726 So the difference from the normal map iterator is that
728 - ``operator*()`` returns a reference to the mapped object (normally it returns a reference to a ``std::pair``, and
729 - that the key can be accessed through the ``key()`` function. -->
731 <div class="section">
732 <h1><a id="class-nullable" name="class-nullable">Class <tt class="docutils literal"><span class="pre">nullable</span></tt></a></h1>
733 <p>The purpose of the class is simply to tell the containers
734 that null values should be allowed. Its definition is
736 <pre class="literal-block">
739 template< class T >
746 <p>Please notice that <tt class="docutils literal"><span class="pre">nullable</span></tt> has no effect on the containers
747 interface (except for <tt class="docutils literal"><span class="pre">is_null()</span></tt> functions). For example, it
748 does not make sense to do</p>
749 <pre class="literal-block">
750 boost::ptr_vector< boost::nullable<T> > vec;
751 vec.push_back( 0 ); // ok
752 vec.push_back( new boost::nullable<T> ); // no no!
753 boost::nullable<T>& ref = vec[0]; // also no no!
756 <div class="section">
757 <h1><a id="exception-classes" name="exception-classes">Exception classes</a></h1>
758 <p>There are three exceptions that are thrown by this library. The exception
759 hierarchy looks as follows:</p>
760 <pre class="literal-block">
763 class bad_ptr_container_operation : public std::exception
766 bad_ptr_container_operation( const char* what );
769 class bad_index : public bad_ptr_container_operation
772 bad_index( const char* what );
775 class bad_pointer : public bad_ptr_container_operation
779 bad_pointer( const char* what );
784 <div class="section">
785 <h1><a id="disabling-the-use-of-exceptions" name="disabling-the-use-of-exceptions">Disabling the use of exceptions</a></h1>
786 <p>As of version 1.34.0 of Boost, the library allows you to disable exceptions
787 completely. This means the library is more fit for domains where exceptions
788 are not used. Furthermore, it also speeds up a operations a little. Instead
789 of throwing an exception, the library simply calls <a class="reference" href="../../utility/assert.html">BOOST_ASSERT</a>.</p>
790 <p>To disable exceptions, simply define this macro before including any header:</p>
791 <pre class="literal-block">
792 #define BOOST_PTR_CONTAINER_NO_EXCEPTIONS 1
793 #include <boost/ptr_container/ptr_vector.hpp>
795 <p>It is, however, recommended that you define the macro on the command-line, so
796 you are absolutely certain that all headers are compiled the same way. Otherwise
797 you might end up breaking the One Definition Rule.</p>
798 <p>If <tt class="docutils literal"><span class="pre">BOOST_NO_EXCEPTIONS</span></tt> is defined, then <tt class="docutils literal"><span class="pre">BOOST_PTR_CONTAINER_NO_EXCEPTIONS</span></tt>
800 <hr><p><strong>Navigate:</strong></p>
802 <li><a class="reference" href="ptr_container.html">home</a></li>
804 <hr><table class="docutils field-list" frame="void" rules="none">
805 <col class="field-name" />
806 <col class="field-body" />
808 <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" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>