mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-31 13:17:23 +02:00
Fixed broken links.
[SVN r17044]
This commit is contained in:
88
index.htm
88
index.htm
@ -1,47 +1,47 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
<title>Boost Smart Pointer Library</title>
|
||||||
<title>Boost Smart Pointer Library</title>
|
</head>
|
||||||
</head>
|
<body bgcolor="#FFFFFF" text="#000000">
|
||||||
|
<table border="1" bgcolor="#007F7F" cellpadding="2">
|
||||||
<body bgcolor="#FFFFFF" text="#000000">
|
<tr>
|
||||||
|
<td bgcolor="#FFFFFF"><img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)" width="277" height="86"></td>
|
||||||
<table border="1" bgcolor="#007F7F" cellpadding="2">
|
<td><a href="../../index.htm"><font face="Arial" color="#FFFFFF"><big>Home</big></font></a></td>
|
||||||
<tr>
|
<td><a href="../libraries.htm"><font face="Arial" color="#FFFFFF"><big>Libraries</big></font></a></td>
|
||||||
<td bgcolor="#FFFFFF"><img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)" width="277" height="86"></td>
|
<td><a href="../../people/people.htm"><font face="Arial" color="#FFFFFF"><big>People</big></font></a></td>
|
||||||
<td><a href="../../index.htm"><font face="Arial" color="#FFFFFF"><big>Home</big></font></a></td>
|
<td><a href="../../more/faq.htm"><font face="Arial" color="#FFFFFF"><big>FAQ</big></font></a></td>
|
||||||
<td><a href="../libraries.htm"><font face="Arial" color="#FFFFFF"><big>Libraries</big></font></a></td>
|
<td><a href="../../more/index.htm"><font face="Arial" color="#FFFFFF"><big>More</big></font></a></td>
|
||||||
<td><a href="../../people/people.htm"><font face="Arial" color="#FFFFFF"><big>People</big></font></a></td>
|
</tr>
|
||||||
<td><a href="../../more/faq.htm"><font face="Arial" color="#FFFFFF"><big>FAQ</big></font></a></td>
|
</table>
|
||||||
<td><a href="../../more/index.htm"><font face="Arial" color="#FFFFFF"><big>More</big></font></a></td>
|
<h1>Smart Pointer Library</h1>
|
||||||
</tr>
|
<p>The smart pointer library includes five smart pointer class templates. Smart
|
||||||
</table>
|
pointers ease the management of memory dynamically allocated with C++ <b>new</b>
|
||||||
<h1>Smart Pointer Library</h1>
|
expressions. In addition, <b>scoped_ptr</b> can ease the management of memory
|
||||||
<p>The smart pointer library includes five smart pointer class templates. Smart
|
dynamically allocated in other ways.</p>
|
||||||
pointers ease the management of memory dynamically allocated with C++ <b>new</b>
|
<ul>
|
||||||
expressions. In addition, <b>scoped_ptr</b> can ease the management of memory
|
<li>
|
||||||
dynamically allocated in other ways.</p>
|
<a href="smart_ptr.htm">Documentation</a> (HTML).</li>
|
||||||
<ul>
|
<li>
|
||||||
<li><a href="smart_ptr.htm">Documentation</a> (HTML).</li>
|
Header <a href="../../boost/scoped_ptr.hpp">scoped_ptr.hpp</a>.</li>
|
||||||
<li>Header <a href="../../boost/scoped_ptr.hpp">scoped_ptr.hpp</a>.</li>
|
<li>
|
||||||
<li>Header <a href="../../boost/scoped_array.hpp">scoped_array.hpp</a>.</li>
|
Header <a href="../../boost/scoped_array.hpp">scoped_array.hpp</a>.</li>
|
||||||
<li>Header <a href="../../boost/shared_ptr.hpp">shared_ptr.hpp</a>.</li>
|
<li>
|
||||||
<li>Header <a href="../../boost/shared_array.hpp">shared_array.hpp</a>.</li>
|
Header <a href="../../boost/shared_ptr.hpp">shared_ptr.hpp</a>.</li>
|
||||||
<li>Header <a href="../../boost/weak_ptr.hpp">weak_ptr.hpp</a>.</li>
|
<li>
|
||||||
<li>Test program <a href="smart_ptr_test.cpp">smart_ptr_test.cpp</a>.</li>
|
Header <a href="../../boost/shared_array.hpp">shared_array.hpp</a>.</li>
|
||||||
<li>Originally submitted by
|
<li>
|
||||||
<a href="../../people/greg_colvin.htm">Greg Colvin</a> and
|
Header <a href="../../boost/weak_ptr.hpp">weak_ptr.hpp</a>.</li>
|
||||||
<a href="../../people/beman_dawes.html">Beman Dawes</a>,
|
<li>
|
||||||
currently maintained by
|
Test program <a href="test/smart_ptr_test.cpp">smart_ptr_test.cpp</a>.</li>
|
||||||
<a href="../../people/peter_dimov.htm">Peter Dimov</a> and
|
<li>
|
||||||
<a href="../../people/darin_adler.htm">Darin Adler</a>.</li>
|
Originally submitted by <a href="../../people/greg_colvin.htm">Greg Colvin</a> and
|
||||||
</ul>
|
<a href="../../people/beman_dawes.html">Beman Dawes</a>, currently maintained
|
||||||
|
by <a href="../../people/peter_dimov.htm">Peter Dimov</a> and <a href="../../people/darin_adler.htm">
|
||||||
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B %Y" startspan -->1 February 2002<!--webbot bot="Timestamp" endspan i-checksum="14885" -->.</p>
|
Darin Adler</a>.</li>
|
||||||
|
</ul>
|
||||||
</body>
|
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B %Y" startspan -->
|
||||||
|
1 February 2002<!--webbot bot="Timestamp" endspan i-checksum="14885" --> .</p>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -14,10 +14,9 @@
|
|||||||
<p>The <b>scoped_ptr</b> template is a simple solution for simple needs. It
|
<p>The <b>scoped_ptr</b> template is a simple solution for simple needs. It
|
||||||
supplies a basic "resource acquisition is initialization" facility, without
|
supplies a basic "resource acquisition is initialization" facility, without
|
||||||
shared-ownership or transfer-of-ownership semantics. Both its name and
|
shared-ownership or transfer-of-ownership semantics. Both its name and
|
||||||
enforcement of semantics (by being
|
enforcement of semantics (by being <a href="../utility/utility.htm#Class_noncopyable">
|
||||||
<a href="../utility/utility.htm#Class_noncopyable">noncopyable</a>) signal its intent to retain ownership solely within the
|
noncopyable</a>) signal its intent to retain ownership solely within the
|
||||||
current scope. Because it is
|
current scope. Because it is <a href="../utility/utility.htm#Class_noncopyable">noncopyable</a>,
|
||||||
<a href="../utility/utility.htm#Class_noncopyable">noncopyable</a>,
|
|
||||||
it is safer than <b>shared_ptr</b> or <b>std::auto_ptr</b> for pointers which
|
it is safer than <b>shared_ptr</b> or <b>std::auto_ptr</b> for pointers which
|
||||||
should not be copied.</p>
|
should not be copied.</p>
|
||||||
<p>Because <b>scoped_ptr</b> is simple, in its usual implementation every operation
|
<p>Because <b>scoped_ptr</b> is simple, in its usual implementation every operation
|
||||||
@ -151,12 +150,12 @@ Buckle my shoe</pre>
|
|||||||
<p>One common usage of <b>scoped_ptr</b> is to implement a handle/body (also called
|
<p>One common usage of <b>scoped_ptr</b> is to implement a handle/body (also called
|
||||||
pimpl) idiom which avoids exposing the body (implementation) in the header
|
pimpl) idiom which avoids exposing the body (implementation) in the header
|
||||||
file.</p>
|
file.</p>
|
||||||
<p>The <a href="scoped_ptr_example_test.cpp">scoped_ptr_example_test.cpp</a> sample
|
<p>The <a href="example/scoped_ptr_example_test.cpp">scoped_ptr_example_test.cpp</a> sample
|
||||||
program includes a header file, <a href="scoped_ptr_example.hpp">scoped_ptr_example.hpp</a>,
|
program includes a header file, <a href="example/scoped_ptr_example.hpp">scoped_ptr_example.hpp</a>,
|
||||||
which uses a <b>scoped_ptr<></b> to an incomplete type to hide the
|
which uses a <b>scoped_ptr<></b> to an incomplete type to hide the
|
||||||
implementation. The instantiation of member functions which require a complete
|
implementation. The instantiation of member functions which require a complete
|
||||||
type occurs in the <a href="scoped_ptr_example.cpp">scoped_ptr_example.cpp</a> implementation
|
type occurs in the <a href="example/scoped_ptr_example.cpp">scoped_ptr_example.cpp</a>
|
||||||
file.</p>
|
implementation file.</p>
|
||||||
<h2>Frequently Asked Questions</h2>
|
<h2>Frequently Asked Questions</h2>
|
||||||
<p><b>Q</b>. Why doesn't <b>scoped_ptr</b> have a release() member?<br>
|
<p><b>Q</b>. Why doesn't <b>scoped_ptr</b> have a release() member?<br>
|
||||||
<b>A</b>. When reading source code, it is valuable to be able to draw
|
<b>A</b>. When reading source code, it is valuable to be able to draw
|
||||||
@ -166,11 +165,12 @@ Buckle my shoe</pre>
|
|||||||
given context. Use <STRONG>std::auto_ptr</STRONG> where transfer of ownership
|
given context. Use <STRONG>std::auto_ptr</STRONG> where transfer of ownership
|
||||||
is required. (supplied by Dave Abrahams)</p>
|
is required. (supplied by Dave Abrahams)</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B %Y" startspan -->09 January 2003<!--webbot bot="Timestamp" endspan i-checksum="32310" --></p>
|
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B %Y" startspan -->
|
||||||
|
09 January 2003<!--webbot bot="Timestamp" endspan i-checksum="32310" --></p>
|
||||||
<p>Copyright 1999 Greg Colvin and Beman Dawes. Copyright 2002 Darin Adler.
|
<p>Copyright 1999 Greg Colvin and Beman Dawes. Copyright 2002 Darin Adler.
|
||||||
Copyright 2002 Peter Dimov. Permission to copy, use, modify, sell and
|
Copyright 2002 Peter Dimov. Permission to copy, use, modify, sell and
|
||||||
distribute this document is granted provided this copyright notice appears in
|
distribute this document is granted provided this copyright notice appears in
|
||||||
all copies. This document is provided "as is" without express or implied
|
all copies. This document is provided "as is" without express or implied
|
||||||
warranty, and with no claim as to its suitability for any purpose.</p>
|
warranty, and with no claim as to its suitability for any purpose.</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
<p>A <b>shared_ptr</b> to a <b>std::vector</b> is an alternative to a <b>shared_array</b>
|
<p>A <b>shared_ptr</b> to a <b>std::vector</b> is an alternative to a <b>shared_array</b>
|
||||||
that is a bit heavier duty but far more flexible.</p>
|
that is a bit heavier duty but far more flexible.</p>
|
||||||
<p>The class template is parameterized on <b>T</b>, the type of the object pointed
|
<p>The class template is parameterized on <b>T</b>, the type of the object pointed
|
||||||
to. <b>T</b> must meet the smart pointer
|
to. <b>T</b> must meet the smart pointer <a href="smart_ptr.htm#common_requirements">
|
||||||
<a href="smart_ptr.htm#common_requirements">common requirements</a>.</p>
|
common requirements</a>.</p>
|
||||||
<h2>Synopsis</h2>
|
<h2>Synopsis</h2>
|
||||||
<pre>namespace boost {
|
<pre>namespace boost {
|
||||||
|
|
||||||
@ -98,8 +98,8 @@
|
|||||||
The guarantee that this does not throw exceptions depends on the requirement
|
The guarantee that this does not throw exceptions depends on the requirement
|
||||||
that the deleted object's destructor does not throw exceptions. See the smart
|
that the deleted object's destructor does not throw exceptions. See the smart
|
||||||
pointer <a href="smart_ptr.htm#common_requirements">common requirements</a>.</p>
|
pointer <a href="smart_ptr.htm#common_requirements">common requirements</a>.</p>
|
||||||
<h3><a name="operator=">assignment</a></h3>
|
<h3><a name="assignment">assignment</a></h3>
|
||||||
<pre>shared_array & <a href="#assignment">operator=</a>(shared_array const & r); // never throws</pre>
|
<pre>shared_array & operator=(shared_array const & r); // never throws</pre>
|
||||||
<p>Constructs a new <b>shared_array</b> as described <a href="#constructors">above</a>,
|
<p>Constructs a new <b>shared_array</b> as described <a href="#constructors">above</a>,
|
||||||
then replaces this <b>shared_array</b> with the new one, destroying the
|
then replaces this <b>shared_array</b> with the new one, destroying the
|
||||||
replaced object.</p>
|
replaced object.</p>
|
||||||
@ -115,7 +115,7 @@
|
|||||||
replaced object. <b>D</b>'s copy constructor must not throw. The only exception
|
replaced object. <b>D</b>'s copy constructor must not throw. The only exception
|
||||||
which may be thrown is <b>std::bad_alloc</b>. If an exception is thrown, <b>d(p)</b>
|
which may be thrown is <b>std::bad_alloc</b>. If an exception is thrown, <b>d(p)</b>
|
||||||
is called.</p>
|
is called.</p>
|
||||||
<h3><a name="indirection">indexing</a></h3>
|
<h3><a name="indexing">indexing</a></h3>
|
||||||
<pre>T & operator[](std::ptrdiff_t i) const; // never throws</pre>
|
<pre>T & operator[](std::ptrdiff_t i) const; // never throws</pre>
|
||||||
<p>Returns a reference to element <b>i</b> of the array pointed to by the stored
|
<p>Returns a reference to element <b>i</b> of the array pointed to by the stored
|
||||||
pointer. Behavior is undefined and almost certainly undesirable if the stored
|
pointer. Behavior is undefined and almost certainly undesirable if the stored
|
||||||
@ -169,11 +169,12 @@ template<class T>
|
|||||||
Provided as an aid to generic programming.</p>
|
Provided as an aid to generic programming.</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p>Revised
|
<p>Revised
|
||||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->09 January 2003<!--webbot bot="Timestamp" endspan i-checksum="32310" --></p>
|
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->
|
||||||
|
09 January 2003<!--webbot bot="Timestamp" endspan i-checksum="32310" --></p>
|
||||||
<p>Copyright 1999 Greg Colvin and Beman Dawes. Copyright 2002 Darin Adler.
|
<p>Copyright 1999 Greg Colvin and Beman Dawes. Copyright 2002 Darin Adler.
|
||||||
Permission to copy, use, modify, sell and distribute this document is granted
|
Permission to copy, use, modify, sell and distribute this document is granted
|
||||||
provided this copyright notice appears in all copies. This document is provided
|
provided this copyright notice appears in all copies. This document is provided
|
||||||
"as is" without express or implied warranty, and with no claim as to its
|
"as is" without express or implied warranty, and with no claim as to its
|
||||||
suitability for any purpose.</p>
|
suitability for any purpose.</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -361,9 +361,9 @@ q = p;
|
|||||||
<h3><a name="use_count">use_count</a></h3>
|
<h3><a name="use_count">use_count</a></h3>
|
||||||
<pre>long use_count() const; // never throws</pre>
|
<pre>long use_count() const; // never throws</pre>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p><b>Returns:</b> the number of <b>shared_ptr</b> objects, <STRONG>*this</STRONG> included, that
|
<p><b>Returns:</b> the number of <b>shared_ptr</b> objects, <STRONG>*this</STRONG> included,
|
||||||
<i>share ownership</i> with <b>*this</b>, or an unspecified nonnegative value
|
that <i>share ownership</i> with <b>*this</b>, or an unspecified nonnegative
|
||||||
when <STRONG>*this</STRONG> is <EM>empty</EM>.</p>
|
value when <STRONG>*this</STRONG> is <EM>empty</EM>.</p>
|
||||||
<p><b>Throws:</b> nothing.</p>
|
<p><b>Throws:</b> nothing.</p>
|
||||||
<P><B>Notes:</B> <code>use_count()</code> is not necessarily efficient. Use only
|
<P><B>Notes:</B> <code>use_count()</code> is not necessarily efficient. Use only
|
||||||
for debugging and testing purposes, not for production code.</P>
|
for debugging and testing purposes, not for production code.</P>
|
||||||
@ -490,9 +490,9 @@ q = p;
|
|||||||
<P><B>Returns:</B> <b>os</b>.</P>
|
<P><B>Returns:</B> <b>os</b>.</P>
|
||||||
</BLOCKQUOTE>
|
</BLOCKQUOTE>
|
||||||
<h2><a name="example">Example</a></h2>
|
<h2><a name="example">Example</a></h2>
|
||||||
<p>See <A href="shared_ptr_example.cpp">shared_ptr_example.cpp</A> for a complete
|
<p>See <A href="example/shared_ptr_example.cpp">shared_ptr_example.cpp</A> for a
|
||||||
example program. The program builds a <b>std::vector</b> and <b>std::set</b> of <b>shared_ptr</b>
|
complete example program. The program builds a <b>std::vector</b> and <b>std::set</b>
|
||||||
objects.</p>
|
of <b>shared_ptr</b> objects.</p>
|
||||||
<p>Note that after the containers have been populated, some of the <b>shared_ptr</b>
|
<p>Note that after the containers have been populated, some of the <b>shared_ptr</b>
|
||||||
objects will have a use count of 1 rather than a use count of 2, since the set
|
objects will have a use count of 1 rather than a use count of 2, since the set
|
||||||
is a <b>std::set</b> rather than a <b>std::multiset</b>, and thus does not
|
is a <b>std::set</b> rather than a <b>std::multiset</b>, and thus does not
|
||||||
@ -505,11 +505,11 @@ q = p;
|
|||||||
<p>One common usage of <b>shared_ptr</b> is to implement a handle/body (also called
|
<p>One common usage of <b>shared_ptr</b> is to implement a handle/body (also called
|
||||||
pimpl) idiom which avoids exposing the body (implementation) in the header
|
pimpl) idiom which avoids exposing the body (implementation) in the header
|
||||||
file.</p>
|
file.</p>
|
||||||
<p>The <A href="shared_ptr_example2_test.cpp">shared_ptr_example2_test.cpp</A> sample
|
<p>The <A href="example/shared_ptr_example2_test.cpp">shared_ptr_example2_test.cpp</A>
|
||||||
program includes a header file, <A href="shared_ptr_example2.hpp">shared_ptr_example2.hpp</A>,
|
sample program includes a header file, <A href="example/shared_ptr_example2.hpp">shared_ptr_example2.hpp</A>,
|
||||||
which uses a <b>shared_ptr<></b> to an incomplete type to hide the
|
which uses a <b>shared_ptr<></b> to an incomplete type to hide the
|
||||||
implementation. The instantiation of member functions which require a complete
|
implementation. The instantiation of member functions which require a complete
|
||||||
type occurs in the <A href="shared_ptr_example2.cpp">shared_ptr_example2.cpp</A>
|
type occurs in the <A href="example/shared_ptr_example2.cpp">shared_ptr_example2.cpp</A>
|
||||||
implementation file. Note that there is no need for an explicit destructor.
|
implementation file. Note that there is no need for an explicit destructor.
|
||||||
Unlike ~scoped_ptr, ~shared_ptr does not require that <b>T</b> be a complete
|
Unlike ~scoped_ptr, ~shared_ptr does not require that <b>T</b> be a complete
|
||||||
type.</p>
|
type.</p>
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
<h1><img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)" align="middle" width="277" height="86">Smart
|
<h1><img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)" align="middle" width="277" height="86">Smart
|
||||||
Pointers</h1>
|
Pointers</h1>
|
||||||
<p><a href="#Introduction">Introduction</a><br>
|
<p><a href="#Introduction">Introduction</a><br>
|
||||||
<a href="#common_requirements">Common Requirements</a><br>
|
<a href="#common_requirements">Common Requirements</a><br>
|
||||||
<a href="#Exception_Safety">Exception Safety</a><br>
|
<a href="#Exception_Safety">Exception Safety</a><br>
|
||||||
<a href="#Exception-specifications">Exception-specifications</a><br>
|
<a href="#Exception-specifications">Exception-specifications</a><br>
|
||||||
<a href="#History">History and Acknowledgements</a><br>
|
<a href="#History">History and Acknowledgements</a><br>
|
||||||
<a href="#References">References</a></p>
|
<a href="#References">References</a></p>
|
||||||
<h2><a name="Introduction">Introduction</a></h2>
|
<h2><a name="Introduction">Introduction</a></h2>
|
||||||
<p>Smart pointers are objects which store pointers to dynamically allocated (heap)
|
<p>Smart pointers are objects which store pointers to dynamically allocated (heap)
|
||||||
objects. They behave much like built-in C++ pointers except that they
|
objects. They behave much like built-in C++ pointers except that they
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<p>They are examples of the "resource acquisition is initialization" idiom
|
<p>They are examples of the "resource acquisition is initialization" idiom
|
||||||
described in Bjarne Stroustrup's "The C++ Programming Language", 3rd edition,
|
described in Bjarne Stroustrup's "The C++ Programming Language", 3rd edition,
|
||||||
Section 14.4, Resource Management.</p>
|
Section 14.4, Resource Management.</p>
|
||||||
<p>A test program, <a href="smart_ptr_test.cpp">smart_ptr_test.cpp</a>, is provided
|
<p>A test program, <a href="test/smart_ptr_test.cpp">smart_ptr_test.cpp</a>, is provided
|
||||||
to verify correct operation.</p>
|
to verify correct operation.</p>
|
||||||
<p>A page on <a href="compatibility.htm">compatibility</a> with older versions of
|
<p>A page on <a href="compatibility.htm">compatibility</a> with older versions of
|
||||||
the Boost smart pointer library describes some of the changes since earlier
|
the Boost smart pointer library describes some of the changes since earlier
|
||||||
@ -121,11 +121,11 @@
|
|||||||
<p>September 1999. Luis Coelho provided <b>shared_ptr::swap</b> and <b>shared_array::swap</b></p>
|
<p>September 1999. Luis Coelho provided <b>shared_ptr::swap</b> and <b>shared_array::swap</b></p>
|
||||||
<p>May 1999. In April and May, 1999, Valentin Bonnard and David Abrahams made a
|
<p>May 1999. In April and May, 1999, Valentin Bonnard and David Abrahams made a
|
||||||
number of suggestions resulting in numerous improvements.</p>
|
number of suggestions resulting in numerous improvements.</p>
|
||||||
<p>October 1998. Beman Dawes proposed reviving the original semantics under the names <b>safe_ptr</b>
|
<p>October 1998. Beman Dawes proposed reviving the original semantics under the
|
||||||
and <b>counted_ptr</b>, meeting of Per Andersson, Matt
|
names <b>safe_ptr</b> and <b>counted_ptr</b>, meeting of Per Andersson, Matt
|
||||||
Austern, Greg Colvin, Sean Corfield, Pete Becker, Nico Josuttis, Dietmar K<>hl,
|
Austern, Greg Colvin, Sean Corfield, Pete Becker, Nico Josuttis, Dietmar K<>hl,
|
||||||
Nathan Myers, Chichiang Wan and Judy Ward. During the discussion, the four
|
Nathan Myers, Chichiang Wan and Judy Ward. During the discussion, the four new
|
||||||
new class names were finalized, it was decided that there was no need to exactly
|
class names were finalized, it was decided that there was no need to exactly
|
||||||
follow the <b>std::auto_ptr</b> interface, and various function signatures and
|
follow the <b>std::auto_ptr</b> interface, and various function signatures and
|
||||||
semantics were finalized.</p>
|
semantics were finalized.</p>
|
||||||
<p>Over the next three months, several implementations were considered for <b>shared_ptr</b>,
|
<p>Over the next three months, several implementations were considered for <b>shared_ptr</b>,
|
||||||
@ -154,26 +154,24 @@
|
|||||||
experimented with.</p>
|
experimented with.</p>
|
||||||
<p>But Greg Colvin and Jerry Schwarz argued that "parameterization will discourage
|
<p>But Greg Colvin and Jerry Schwarz argued that "parameterization will discourage
|
||||||
users", and in the end we choose to supply only the direct implementation.</p>
|
users", and in the end we choose to supply only the direct implementation.</p>
|
||||||
<p>Summer, 1994. Greg Colvin proposed to the C++ Standards Committee
|
<p>Summer, 1994. Greg Colvin proposed to the C++ Standards Committee classes named <b>auto_ptr</b>
|
||||||
classes named <b>auto_ptr</b> and <b>counted_ptr</b> which were very similar to
|
and <b>counted_ptr</b> which were very similar to what we now call <b>scoped_ptr</b>
|
||||||
what we now call <b>scoped_ptr</b> and <b>shared_ptr</b>.
|
and <b>shared_ptr</b>. <a href="#Col-94">[Col-94]</a> In one of the very few
|
||||||
<a href="#Col-94">[Col-94]</a> In one of the very
|
cases where the Library Working Group's recommendations were not followed by
|
||||||
few cases where the Library Working Group's recommendations were not followed
|
the full committee, <b>counted_ptr</b> was rejected and surprising
|
||||||
by the full committee, <b>counted_ptr</b> was rejected and surprising
|
|
||||||
transfer-of-ownership semantics were added to <b>auto_ptr</b>.</p>
|
transfer-of-ownership semantics were added to <b>auto_ptr</b>.</p>
|
||||||
<h2><a name="References">References</a></h2>
|
<h2><a name="References">References</a></h2>
|
||||||
<p>[<a name="Col-94">Col-94</a>] Gregory Colvin,
|
<p>[<a name="Col-94">Col-94</a>] Gregory Colvin, <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/1994/N0555.pdf">
|
||||||
<a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/1994/N0555.pdf">
|
Exception Safe Smart Pointers</a>, C++ committee document 94-168/N0555,
|
||||||
Exception Safe Smart Pointers</a>, C++ committee document 94-168/N0555,
|
July, 1994.</p>
|
||||||
July, 1994.</p>
|
<p>[<a name="E&D-94">E&D-94</a>] John R. Ellis & David L. Detlefs, <a href="http://www.usenix.org/publications/library/proceedings/c++94/full_papers/ellis.a">
|
||||||
<p>[<a name="E&D-94">E&D-94</a>] John R. Ellis & David L. Detlefs,
|
Safe, Efficient Garbage Collection for C++</a>, Usenix Proceedings,
|
||||||
<a href="http://www.usenix.org/publications/library/proceedings/c++94/full_papers/ellis.a">
|
February, 1994. This paper includes an extensive discussion of weak pointers
|
||||||
Safe, Efficient Garbage Collection for C++</a>, Usenix Proceedings,
|
and an extensive bibliography.</p>
|
||||||
February, 1994. This paper includes an extensive discussion of weak
|
|
||||||
pointers and an extensive bibliography.</p>
|
|
||||||
<hr>
|
<hr>
|
||||||
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B %Y" startspan
|
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B %Y" startspan
|
||||||
-->15 January 2003<!--webbot bot="Timestamp" endspan i-checksum="32303"
|
-->
|
||||||
|
15 January 2003<!--webbot bot="Timestamp" endspan i-checksum="32303"
|
||||||
--></p>
|
--></p>
|
||||||
<p>Copyright 1999 Greg Colvin and Beman Dawes. Copyright 2002 Darin Adler.
|
<p>Copyright 1999 Greg Colvin and Beman Dawes. Copyright 2002 Darin Adler.
|
||||||
Permission to copy, use, modify, sell and distribute this document is granted
|
Permission to copy, use, modify, sell and distribute this document is granted
|
||||||
@ -181,4 +179,4 @@
|
|||||||
"as is" without express or implied warranty, and with no claim as to its
|
"as is" without express or implied warranty, and with no claim as to its
|
||||||
suitability for any purpose.</p>
|
suitability for any purpose.</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user