Boost logo

Boost-Commit :

From: phil_at_[hidden]
Date: 2008-07-03 02:26:04


Author: pbouchard
Date: 2008-07-03 02:26:04 EDT (Thu, 03 Jul 2008)
New Revision: 47030
URL: http://svn.boost.org/trac/boost/changeset/47030

Log:
Changed vector for list to get simpler error messages.
Text files modified:
   sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test2.cpp | 12 +++---------
   1 files changed, 3 insertions(+), 9 deletions(-)

Modified: sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test2.cpp
==============================================================================
--- sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test2.cpp (original)
+++ sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test2.cpp 2008-07-03 02:26:04 EDT (Thu, 03 Jul 2008)
@@ -9,6 +9,7 @@
 #include <boost/shifted_ptr.hpp>
 #include <boost/shifted_allocator.hpp>
 
+#include <list>
 #include <vector>
 #include <iostream>
 
@@ -64,8 +65,8 @@
     vector() { ++count; }
     ~vector() { --count; }
     vector(const vector& other) : elements(other.elements) { ++count; }
- //std::vector<shifted_ptr<vector> > elements;
- std::vector<shifted_ptr<vector>, shifted_allocator< shifted_ptr<vector> > > elements; //! FIXME
+ std::vector<shifted_ptr<vector> > elements;
+ //std::list<shifted_ptr<vector>, shifted_allocator< shifted_ptr<vector> > > elements; //! FIXME
 };
 
 struct create_type {
@@ -95,13 +96,6 @@
     }
     std::cout << count << std::endl;
 
- count = 0;
- {
- shifted_ptr<vector> v = new shifted<vector>();
- v->elements.push_back(v);
- }
- std::cout << count << std::endl;
-
     {
         vector v;
         v.elements.push_back(new shifted<vector>());


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