Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49553 - in sandbox/SOC/2006/tree/trunk: boost/tree/detail/algorithm libs/tree/test
From: ockham_at_[hidden]
Date: 2008-11-03 09:54:06


Author: bernhard.reiter
Date: 2008-11-03 09:54:06 EST (Mon, 03 Nov 2008)
New Revision: 49553
URL: http://svn.boost.org/trac/boost/changeset/49553

Log:
Fix postorder transform/copy for use with insert_cursor.
Text files modified:
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/postorder.hpp | 4 ++--
   sandbox/SOC/2006/tree/trunk/libs/tree/test/cursor_algorithm_test.cpp | 4 +---
   2 files changed, 3 insertions(+), 5 deletions(-)

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/postorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/postorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/postorder.hpp 2008-11-03 09:54:06 EST (Mon, 03 Nov 2008)
@@ -188,9 +188,9 @@
 OutCursor transform(postorder, InCursor s, OutCursor t, Op op, forward_traversal_tag)
 {
     InCursor r = s;
- //OutCursor t2 = t;
     s.to_begin();
     t.to_begin();
+ OutCursor t2 = t;
     
     for (; s != r.end(); ++s, ++t)
         if (!s.empty())
@@ -200,7 +200,7 @@
     if (!s.empty())
         transform(postorder(), s, t, op, forward_traversal_tag());
     
- *t/*2.to_begin()*/ = op(*r.to_begin());
+ *t2 = op(*r.to_begin());
     return t;
 }
 

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/cursor_algorithm_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/cursor_algorithm_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/cursor_algorithm_test.cpp 2008-11-03 09:54:06 EST (Mon, 03 Nov 2008)
@@ -43,9 +43,7 @@
     test_traversal(Order(), l.begin(), l.end());
 }
 
-typedef boost::mpl::list<preorder,inorder/*,postorder*/> preandinorders; //FIXME
-
-BOOST_AUTO_TEST_CASE_TEMPLATE ( test_inserter, Order, preandinorders )
+BOOST_AUTO_TEST_CASE_TEMPLATE ( test_inserter, Order, orders )
 {
     //boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages ) ;
     bt2.clear();


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