Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54125 - sandbox/monotonic/libs/monotonic/doc
From: christian.schladetsch_at_[hidden]
Date: 2009-06-20 06:06:36

Author: cschladetsch
Date: 2009-06-20 06:06:35 EDT (Sat, 20 Jun 2009)
New Revision: 54125

slight reformatting

Text files modified:
   sandbox/monotonic/libs/monotonic/doc/index.html | 30 +++++++++++++++---------------
   1 files changed, 15 insertions(+), 15 deletions(-)

Modified: sandbox/monotonic/libs/monotonic/doc/index.html
--- sandbox/monotonic/libs/monotonic/doc/index.html (original)
+++ sandbox/monotonic/libs/monotonic/doc/index.html 2009-06-20 06:06:35 EDT (Sat, 20 Jun 2009)
@@ -60,33 +60,36 @@
                 explicitly declaring the allocator type. An optional and debatable extension to
                 the library includes some basic wrapper types around the std::containers that
                 simplifies the syntax somewhat.</p>
- <pre>void shared()<br />{
+ <pre>void shared()
         // declare the storage that will be shared by the various containers.
         // storage will use the stack at first, then transparently expand to the heap as needed
- boost::monotonic::storage&lt;&gt; storage;<br /> {
- std::map&lt;int, int, std::less&lt;int&gt;, boost::monotonic::allocator&lt;int&gt; &gt; map(storage);
+ boost::monotonic::storage&lt;&gt; storage;
+ {
+ std::map&lt;int, int, std::less&lt;int&gt;, boost::monotonic::allocator&lt;int&gt; &gt; map;
                 map[1] = 2;
                 map[2] = 4;
- std::vector&lt;char, boost::monotonic::allocator&lt;char&gt; &gt; vec(storage);
+ std::vector&lt;char, boost::monotonic::allocator&lt;char&gt; &gt; vec;
                 vec.assign(&#39;x&#39;, 4);
- std::list&lt;char, boost::monotonic::allocator&lt;char&gt; &gt; list(storage);
+ std::list&lt;char, boost::monotonic::allocator&lt;char&gt; &gt; list;
                 std::copy(vec.begin(), vec.end(), std::back_inserter(list));
                 typedef std::pair&lt;int, int&gt; pair;
- std::set&lt;pair, std::less&lt;pair&gt;, boost::monotonic::allocator&lt;pair&gt; &gt; set(storage);
+ std::set&lt;pair, std::less&lt;pair&gt;, boost::monotonic::allocator&lt;pair&gt; &gt; set;
                 std::copy(map.begin(), map.end(), std::inserter(set));
+ // all allocations are freed when storage leaves scope
                                 The source code resides in the boost sandbox.</p>
- This is a constant-time, STL-compliant[1] allocator and storage
- system with the following
+ This is a constant-time, STL-compliant allocator and storage system with the following
                 properties: </p>
                 <li>Space for objects is pre-allocated. This can be on the stack, on the heap, or
@@ -334,15 +337,12 @@
- [1] It can be argued that the proposed allocator is not in fact &quot;STL-compliant&quot;,
+ [1] It has been argued that the proposed allocator is not in fact &quot;STL-compliant&quot;,
                     as it includes a pointer to storage used by the allocator. In truth, the
                     Standard doesn&#39;t state that allocators may not have any local data, only that
                     STL implementations are free to treat allocators of the same type as having the
- same behavior. In practise, the distinction is largely academic and has had no
- seen impact on this library. All modern STL implementation check for allocators
- to do things like speed up swap methods etc. These all work with monotonic
- allocator as well.</p>
- <h2>
+ same behavior. This proposal conforms to the standard.
+ </p> <h2>
                     <li>Boost.AutoBuffer. A related service. Attempts to integrate this with STL has so

Boost-Commit list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at