Ticket #1897: make_shared_doc.patch

File make_shared_doc.patch, 4.3 KB (added by Frank Mori Hess, 14 years ago)

Patch to add links to make_shared.html and a few other small fixes/update

  • libs/smart_ptr/shared_ptr.htm

     
    9090                                shared_ptr </STRONG>constructor if <STRONG>g</STRONG> throws an exception.
    9191                        See <A href="http://www.gotw.ca/gotw/056.htm">Herb Sutter's treatment</A> (also <A href="http://www.cuj.com/reference/articles/2002/0212/0212_sutter.htm">
    9292                                here</A>) of the issue for more information.</P>
     93                <P>The exception safety problem described above may also be eliminated by using
     94                        the <a href="make_shared.html"><code>make_shared</code></a>
     95                        or <a href="make_shared.html"><code>allocate_shared</code></a>
     96                        factory functions defined in boost/make_shared.hpp.  These factory functions also provide
     97                        an efficiency benefit by consolidating allocations.<P>
    9398                <h2><a name="Synopsis">Synopsis</a></h2>
    9499                <pre>namespace boost {
    95100
  • libs/smart_ptr/smart_ptr.htm

     
    2222                        keep track of dynamically allocated objects shared by multiple owners.</p>
    2323                <p>Conceptually, smart pointers are seen as owning the object pointed to, and thus
    2424                        responsible for deletion of the object when it is no longer needed.</p>
    25                 <p>The smart pointer library provides five smart pointer class templates:</p>
     25                <p>The smart pointer library provides six smart pointer class templates, plus
     26                        efficient factory functions for <code>shared_ptr</code>:</p>
    2627                <div align="left">
    2728                        <table border="1" cellpadding="4" cellspacing="0">
    2829                                <tr>
     
    3839                                <tr>
    3940                                        <td><a href="shared_ptr.htm"><b>shared_ptr</b></a></td>
    4041                                        <td><a href="../../boost/shared_ptr.hpp">&lt;boost/shared_ptr.hpp&gt;</a></td>
    41                                         <td>Object ownership shared among multiple pointers</td>
     42                                        <td>Object ownership shared among multiple pointers.</td>
    4243                                </tr>
    4344                                <tr>
    4445                                        <td><a href="shared_array.htm"><b>shared_array</b></a></td>
     
    6162                <p>They are examples of the "resource acquisition is initialization" idiom
    6263                        described in Bjarne Stroustrup's "The C++ Programming Language", 3rd edition,
    6364                        Section 14.4, Resource Management.</p>
     65                <p>Additionally, the smart pointer library provides efficient factory functions
     66                        for creating <code>shared_ptr</code> objects:</p>
     67                <div align="left">
     68                        <table border="1" cellpadding="4" cellspacing="0">
     69                                <tr>
     70                                        <td><a href="make_shared.html"><b>make_shared and allocate_shared</b></a></td>
     71                                        <td><a href="../../boost/make_shared.hpp">&lt;boost/make_shared.hpp&gt;</a></td>
     72                                        <td>Efficient creation of <code>shared_ptr</code> objects.</td>
     73                                </tr>
     74                        </table>
     75                </div>
    6476                <p>A test program, <a href="test/smart_ptr_test.cpp">smart_ptr_test.cpp</a>, is
    6577                        provided to verify correct operation.</p>
    6678                <p>A page on <a href="compatibility.htm">compatibility</a> with older versions of
     
    130142                        number of suggestions resulting in numerous improvements.</p>
    131143                <p>October 1998. Beman Dawes proposed reviving the original semantics under the
    132144                        names <b>safe_ptr</b> and <b>counted_ptr</b>, meeting of Per Andersson, Matt
    133                         Austern, Greg Colvin, Sean Corfield, Pete Becker, Nico Josuttis, Dietmar Kühl,
     145                        Austern, Greg Colvin, Sean Corfield, Pete Becker, Nico Josuttis, Dietmar K&uuml;hl,
    134146                        Nathan Myers, Chichiang Wan and Judy Ward. During the discussion, the four new
    135147                        class names were finalized, it was decided that there was no need to exactly
    136148                        follow the <b>std::auto_ptr</b> interface, and various function signatures and
     
    156168                        as to run various timings of the direct and indirect approaches, and found that
    157169                        at least on Intel Pentium chips there was very little measurable difference.
    158170                        Kevlin Henney provided a paper he wrote on "Counted Body Techniques." Dietmar
    159                         Kühl suggested an elegant partial template specialization technique to allow
     171                        K&uumlhl suggested an elegant partial template specialization technique to allow
    160172                        users to choose which implementation they preferred, and that was also
    161173                        experimented with.</p>
    162174                <p>But Greg Colvin and Jerry Schwarz argued that "parameterization will discourage