|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49678 - in sandbox/SOC/2006/tree/trunk/boost/tree: . detail/algorithm
From: ockham_at_[hidden]
Date: 2008-11-10 14:40:20
Author: bernhard.reiter
Date: 2008-11-10 14:40:20 EST (Mon, 10 Nov 2008)
New Revision: 49678
URL: http://svn.boost.org/trac/boost/changeset/49678
Log:
More iterative algorithm fixes.
Text files modified:
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterative.hpp | 24 +++++-------------------
sandbox/SOC/2006/tree/trunk/boost/tree/root_tracking_cursor.hpp | 5 +++++
2 files changed, 10 insertions(+), 19 deletions(-)
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterative.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterative.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterative.hpp 2008-11-10 14:40:20 EST (Mon, 10 Nov 2008)
@@ -24,8 +24,9 @@
namespace tree {
template <class Order, class Cursor, class Op>
-Op for_each(Order, root_tracking_cursor<Cursor> s, Op f)
+Op for_each(Order, Cursor is, Op f, bidirectional_traversal_tag)
{
+ root_tracking_cursor<Cursor> s(is);
root_tracking_cursor<Cursor> s2(s);
to_first(Order(), s);
to_last(Order(), s2);
@@ -36,17 +37,11 @@
return f;
}
-template <class Order, class Cursor, class Op>
-Op for_each(Order, Cursor s, Op f, bidirectional_traversal_tag)
-{
- return for_each(Order(), root_tracking_cursor<Cursor>(s), f);
-}
-
template <class Order, class InCursor, class OutCursor, class Op>
-OutCursor transform (Order, root_tracking_cursor<InCursor> s
- , OutCursor t
- , Op op)
+OutCursor transform (Order, InCursor is, OutCursor t, Op op
+ , bidirectional_traversal_tag)
{
+ root_tracking_cursor<InCursor> s(is);
root_tracking_cursor<InCursor> s2(s);
boost::tree::coupling_cursor< root_tracking_cursor<InCursor>, OutCursor > cc(s, t);
@@ -61,15 +56,6 @@
return cc.out();
}
-template <class Order, class InCursor, class OutCursor, class Op>
-OutCursor transform (Order, InCursor s, OutCursor t, Op op
- , bidirectional_traversal_tag)
-{
- return transform(Order(), root_tracking_cursor<InCursor>(s), t, op);
-}
-
-
-
} // namespace tree
} // namespace boost
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/root_tracking_cursor.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/root_tracking_cursor.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/root_tracking_cursor.hpp 2008-11-10 14:40:20 EST (Mon, 10 Nov 2008)
@@ -71,6 +71,11 @@
// : root_tracking_cursor::cursor_adaptor_(other.base())
// , m_depth(other.m_depth) {}
+ Cursor const& base() const
+ {
+ return this->base();
+ }
+
private:
friend class boost::iterator_core_access;
friend class boost::tree::cursor_core_access;
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