$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r54291 - in sandbox/monotonic: boost/monotonic boost/monotonic/detail libs/monotonic/test/Tests
From: christian.schladetsch_at_[hidden]
Date: 2009-06-23 18:35:21
Author: cschladetsch
Date: 2009-06-23 18:35:19 EDT (Tue, 23 Jun 2009)
New Revision: 54291
URL: http://svn.boost.org/trac/boost/changeset/54291
Log:
updated test_map
Text files modified: 
   sandbox/monotonic/boost/monotonic/allocator_base.hpp   |     6 ++++--                                  
   sandbox/monotonic/boost/monotonic/detail/construct.hpp |     2 +-                                      
   sandbox/monotonic/libs/monotonic/test/Tests/tests.cpp  |    36 ++++++++++++++++++++++--------------    
   3 files changed, 27 insertions(+), 17 deletions(-)
Modified: sandbox/monotonic/boost/monotonic/allocator_base.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/allocator_base.hpp	(original)
+++ sandbox/monotonic/boost/monotonic/allocator_base.hpp	2009-06-23 18:35:19 EDT (Tue, 23 Jun 2009)
@@ -81,12 +81,14 @@
 
                         void construct(pointer ptr)
                         {
-				new (ptr) T();//detail::Construct<detail::is_monotonic<T>::value>::Given(ptr, static_cast<Derived *>(this));
+				detail::Construct<detail::is_monotonic<T>::value>::Given(ptr, static_cast<Derived *>(this));
+				//new (ptr) T();
                         }
 
                         void construct(pointer ptr, const T& val)
                         {
-				new (ptr) T(val);//detail::Construct<detail::is_monotonic<T>::value>::Given(ptr, val, static_cast<Derived *>(this));
+				detail::Construct<detail::is_monotonic<T>::value>::Given(ptr, val, static_cast<Derived *>(this));
+				//new (ptr) T(val);
                         }
 
                         void destroy(pointer ptr)
Modified: sandbox/monotonic/boost/monotonic/detail/construct.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/detail/construct.hpp	(original)
+++ sandbox/monotonic/boost/monotonic/detail/construct.hpp	2009-06-23 18:35:19 EDT (Tue, 23 Jun 2009)
@@ -59,7 +59,7 @@
                                 template <class Storage>
                                 static T Given(Storage &storage)
                                 {
-					return T();//storage);
+					return T(storage);
                                 }
                         };
                 }
Modified: sandbox/monotonic/libs/monotonic/test/Tests/tests.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/Tests/tests.cpp	(original)
+++ sandbox/monotonic/libs/monotonic/test/Tests/tests.cpp	2009-06-23 18:35:19 EDT (Tue, 23 Jun 2009)
@@ -52,6 +52,14 @@
 
         monotonic::static_storage<region0>::release();
         monotonic::static_storage<region1>::release();
+
+
+	monotonic::storage<> storage;
+	{
+		monotonic::map<int, monotonic::list<int> > local_map(storage);
+		local_map[1].push_back(42);
+		BOOST_ASSERT(local_map.get_allocator().get_storage() == local_map[1].get_allocator().get_storage());
+	}
 }
 
 BOOST_AUTO_TEST_CASE(test_vector)
@@ -151,25 +159,25 @@
         }
 }
 
-struct region0 {};
-struct region1 {};
+//struct region0 {};
+//struct region1 {};
 
 BOOST_AUTO_TEST_CASE(test_shared_allocation)
 {
-	// use default region and access
-	std::list<int, monotonic::allocator<int> > list;
+	//// use default region and access
+	//std::list<int, monotonic::allocator<int> > list;
 
-	// use specific region and access
-	std::list<int, monotonic::allocator<int, region0, monotonic::shared_access_tag> > list;
-	std::list<int, monotonic::allocator<int, region0, monotonic::thread_local_access_tag> > list;
-
-	// using wrapped container
-	monotonic::list<int> list;
-	monotonic::list<int, region0, monotonic::shared_access_tag> list;
-	monotonic::list<int, region0, monotonic::thread_local_access_tag> list;
+	//// use specific region and access
+	//std::list<int, monotonic::allocator<int, region0, monotonic::shared_access_tag> > list;
+	//std::list<int, monotonic::allocator<int, region0, monotonic::thread_local_access_tag> > list;
+
+	//// using wrapped container
+	//monotonic::list<int> list;
+	//monotonic::list<int, region0, monotonic::shared_access_tag> list;
+	//monotonic::list<int, region0, monotonic::thread_local_access_tag> list;
 
-	// use different regions
-	monotonic::map<int, monotonic::list<monotonic::string, region1>, region0> map;
+	//// use different regions
+	//monotonic::map<int, monotonic::list<monotonic::string, region1>, region0> map;
 }
 
 BOOST_AUTO_TEST_CASE(test_regional_allocation)