|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71647 - sandbox/block_ptr/libs/smart_ptr/doc
From: phil_at_[hidden]
Date: 2011-05-01 13:08:07
Author: pbouchard
Date: 2011-05-01 13:08:05 EDT (Sun, 01 May 2011)
New Revision: 71647
URL: http://svn.boost.org/trac/boost/changeset/71647
Log:
* Corrected docs according to new syntax
Text files modified:
sandbox/block_ptr/libs/smart_ptr/doc/overview.html | 2 +-
sandbox/block_ptr/libs/smart_ptr/doc/tutorial.html | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
Modified: sandbox/block_ptr/libs/smart_ptr/doc/overview.html
==============================================================================
--- sandbox/block_ptr/libs/smart_ptr/doc/overview.html (original)
+++ sandbox/block_ptr/libs/smart_ptr/doc/overview.html 2011-05-01 13:08:05 EDT (Sun, 01 May 2011)
@@ -92,7 +92,7 @@
ability to detect cyclic blocks of memory with no coding overhead. In terms of programing requirements, <i>block_ptr<T></i> simply requires to point
to instantiations of the <i>block<T></i> type. For example:</p>
<pre>
- block_ptr<int> v = new block<int>(11);
+ block_ptr<int> v = make_block<int>(11);
</pre>
<hr>
Modified: sandbox/block_ptr/libs/smart_ptr/doc/tutorial.html
==============================================================================
--- sandbox/block_ptr/libs/smart_ptr/doc/tutorial.html (original)
+++ sandbox/block_ptr/libs/smart_ptr/doc/tutorial.html 2011-05-01 13:08:05 EDT (Sun, 01 May 2011)
@@ -71,7 +71,7 @@
of a special type needed to instantiate objects referred to. For example:</p>
<pre>
- block_ptr<int> p = new block<int>(11);
+ block_ptr<int> p = make_block<int>(11);
</pre>
<p>Will instantiate a special object <i>block<int></i> having an integer as one of its member. The pointer to the object is then passed to the
@@ -81,7 +81,7 @@
type to the following:<p>
<pre>
- block_ptr<int[10]> p = new block<int[10]>();
+ block_ptr<int[10]> p = make_block<int[10]>();
</pre>
See the following example for different cases of its usage.
@@ -95,7 +95,7 @@
<pre>
list< block_ptr<int>, block_allocator< block_ptr<int> > > c;
- c.push_back(new block<int>(11));
+ c.push_back(make_block<int>(11));
</pre>
<h2><a name="caveat" id="caveat"></a>Caveat</h2>
@@ -108,7 +108,7 @@
struct N { int i; };
struct O : N, M { int i; };
- block_ptr<O> po = new block<O>;
+ block_ptr<O> po = make_block<O>;
block_ptr<N> pn = po; // incorrect
block_ptr<M> pm = po; // incorrect
</pre>
@@ -120,7 +120,7 @@
struct N { int i; virtual ~N() {} };
struct O : N, M { int i; };
- block_ptr<O> po = new block<O>;
+ block_ptr<O> po = make_block<O>;
block_ptr<N> pn = po; // correct
block_ptr<M> pm = po; // correct
</pre>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk