Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54239 - sandbox/monotonic/boost/monotonic
From: christian.schladetsch_at_[hidden]
Date: 2009-06-22 19:04:18


Author: cschladetsch
Date: 2009-06-22 19:04:17 EDT (Mon, 22 Jun 2009)
New Revision: 54239
URL: http://svn.boost.org/trac/boost/changeset/54239

Log:
updated results

Text files modified:
   sandbox/monotonic/boost/monotonic/forward_declarations.hpp | 3 ++-
   sandbox/monotonic/boost/monotonic/static_storage.hpp | 12 ++++++++++++
   2 files changed, 14 insertions(+), 1 deletions(-)

Modified: sandbox/monotonic/boost/monotonic/forward_declarations.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/forward_declarations.hpp (original)
+++ sandbox/monotonic/boost/monotonic/forward_declarations.hpp 2009-06-22 19:04:17 EDT (Mon, 22 Jun 2009)
@@ -66,7 +66,8 @@
                 template <class>
                 struct allocator;
 
- /// a monotonic region allocator uses a specified storage
+ /// a monotonic region allocator uses a specified storage. Each region uses independent
+ /// storage that may be used and reset.
                 template <class T, size_t Region = 0>
                 struct region_allocator;
 

Modified: sandbox/monotonic/boost/monotonic/static_storage.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/static_storage.hpp (original)
+++ sandbox/monotonic/boost/monotonic/static_storage.hpp 2009-06-22 19:04:17 EDT (Mon, 22 Jun 2009)
@@ -69,6 +69,18 @@
                         return static_region_storage[Region];
                 }
 
+ template <size_t Region>
+ inline storage_base &reset_region()
+ {
+ return get_region_storage<Region>().reset();
+ }
+
+ template <size_t Region>
+ inline storage_base &release_region()
+ {
+ return get_region_storage<Region>().release();
+ }
+
                 inline storage_base &get_storage()
                 {
                         return static_storage ? *static_storage : default_static_storage;


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