|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49024 - in sandbox/SOC/2006/tree/trunk: boost/tree libs/tree/test
From: ockham_at_[hidden]
Date: 2008-09-29 14:39:12
Author: bernhard.reiter
Date: 2008-09-29 14:39:12 EDT (Mon, 29 Sep 2008)
New Revision: 49024
URL: http://svn.boost.org/trac/boost/changeset/49024
Log:
Re-arrange *order algorithms from namespaces to a policy(=template)-based mechanism, part 7.
Text files modified:
sandbox/SOC/2006/tree/trunk/boost/tree/balanced_tree.hpp | 8 ++++----
sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_search_test.cpp | 14 +++++++-------
sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/balanced_tree.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/balanced_tree.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/balanced_tree.hpp 2008-09-29 14:39:12 EDT (Mon, 29 Sep 2008)
@@ -277,7 +277,7 @@
template <class Cmp>
iterator lower_bound(value_type const& k, Cmp cmp)
{
- return iterator(boost::tree::inorder::lower_bound(h.root(), k,
+ return iterator(boost::tree::lower_bound(h.root(), k,
bind<bool>(cmp, bind(typename data_type::extract_data(), _1), _2)));
}
@@ -294,7 +294,7 @@
template <class Cmp>
const_iterator lower_bound(value_type const& k, Cmp cmp) const
{
- return const_iterator(boost::tree::inorder::lower_bound(h.croot(), k,
+ return const_iterator(boost::tree::lower_bound(h.croot(), k,
bind<bool>(cmp, bind(typename data_type::extract_data(), _1), _2)));
}
@@ -339,7 +339,7 @@
template <class Cmp>
iterator upper_bound(value_type const& k, Cmp cmp)
{
- return iterator(boost::tree::inorder::upper_bound(h.root(), k,
+ return iterator(boost::tree::upper_bound(h.root(), k,
bind<bool>(cmp, bind(typename data_type::extract_data(), _1), _2)));
}
@@ -356,7 +356,7 @@
template <class Cmp>
const_iterator upper_bound(value_type const& k, Cmp cmp) const
{
- return const_iterator(boost::tree::inorder::upper_bound(h.croot(), k,
+ return const_iterator(boost::tree::upper_bound(h.croot(), k,
bind<bool>(cmp, bind(typename data_type::extract_data(), _1), _2)));
}
Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_search_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_search_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_search_test.cpp 2008-09-29 14:39:12 EDT (Mon, 29 Sep 2008)
@@ -24,8 +24,8 @@
void search_single_element(binary_tree<int>::const_cursor r, int v)
{
binary_tree<int>::const_cursor c, d;
- c = inorder::lower_bound(r, v);
- d = inorder::upper_bound(r, v);
+ c = lower_bound(r, v);
+ d = upper_bound(r, v);
BOOST_CHECK(*c == v);
//BOOST_CHECK(inorder::next(c) == d);
@@ -43,18 +43,18 @@
search_single_element(test_tree.root(), 6); // Non-Leaf
search_single_element(test_tree.root(), 8); // root().begin()
- c = inorder::lower_bound(test_tree.root(), 5); // Not in tree
- d = inorder::lower_bound(test_tree.root(), 5);
+ c = lower_bound(test_tree.root(), 5); // Not in tree
+ d = lower_bound(test_tree.root(), 5);
BOOST_CHECK(*c == 6);
BOOST_CHECK(*d == 6);
*c = 4;
- c = inorder::lower_bound(test_tree.root(), 5); // Not in tree
+ c = lower_bound(test_tree.root(), 5); // Not in tree
BOOST_CHECK(*c == 7);
- c = inorder::lower_bound(test_tree.root(), 4); // Twice in tree
- d = inorder::upper_bound(test_tree.root(), 4);
+ c = lower_bound(test_tree.root(), 4); // Twice in tree
+ d = upper_bound(test_tree.root(), 4);
BOOST_CHECK(*c == 4);
BOOST_CHECK(*d == 7);
BOOST_CHECK(*c.parent() == 4);
Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp 2008-09-29 14:39:12 EDT (Mon, 29 Sep 2008)
@@ -66,7 +66,7 @@
--c4;
BOOST_CHECK(*c4 == 2);
BOOST_CHECK(c4.parent() == c1);
- c = boost::tree::inorder::lower_bound(mytree.root(), 2, std::less<int>());
+ c = boost::tree::lower_bound(mytree.root(), 2, std::less<int>());
BOOST_CHECK(*c == 2);
BOOST_CHECK(c4.empty());
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