|
Boost-Commit : |
From: ockham_at_[hidden]
Date: 2008-03-25 11:57:39
Author: bernhard.reiter
Date: 2008-03-25 11:57:38 EDT (Tue, 25 Mar 2008)
New Revision: 43857
URL: http://svn.boost.org/trac/boost/changeset/43857
Log:
Some constness fixes.
Text files modified:
sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/nary.hpp | 9 +++------
sandbox/SOC/2006/tree/trunk/boost/tree/detail/node/nary.hpp | 3 +++
sandbox/SOC/2006/tree/trunk/libs/tree/test/Jamfile.v2 | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/nary.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/nary.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/nary.hpp 2008-03-25 11:57:38 EDT (Tue, 25 Mar 2008)
@@ -40,7 +40,7 @@
class helper<node<Value, detail::binary_array> const, BasePtr, SizeType > {
typedef node<Value, detail::binary_array> const node_type;
public:
- static typename node_type::reference deref(BasePtr par, SizeType pos)
+ static typename node_type::const_reference deref(BasePtr par, SizeType pos)
{
return **static_cast<node_type*>(par);
}
@@ -106,17 +106,14 @@
)
: m_node(other.m_node), m_pos(other.m_pos) {}
-
-
const_base_pointer m_node;
size_type m_pos;
private:
friend class iterator_core_access;
friend class cursor_core_access;
-
- //const
- typename node_type::reference dereference() const
+
+ typename node_type::const_reference dereference() const
{
return helper<node_type, const_base_pointer, size_type>::deref(m_node, m_pos);
}
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/node/nary.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/node/nary.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/node/nary.hpp 2008-03-25 11:57:38 EDT (Tue, 25 Mar 2008)
@@ -219,6 +219,7 @@
typedef base_type const* const_base_pointer;
typedef value_type& reference;
+ typedef value_type const& const_reference;
typedef value_type* pointer;
//enum size_t { first = 0, second = 1 };
@@ -227,6 +228,8 @@
// TODO: add observers.
reference operator*() { return *m_data; }
+
+ const_reference operator*() const { return *m_data; }
node(pointer data) : base_type(), m_data(data) {}
Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/Jamfile.v2
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/Jamfile.v2 (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/Jamfile.v2 2008-03-25 11:57:38 EDT (Tue, 25 Mar 2008)
@@ -23,7 +23,7 @@
[ run key_search_binary_tree_test.cpp ]
[ run rank_search_binary_tree_test.cpp ]
[ run traverse_binary_tree_test.cpp ]
- [ run subtree_algorithms_test.cpp ]
+# [ run subtree_algorithms_test.cpp ]
[ run rotate_binary_tree_test.cpp ]
[ run string_search_binary_tree_test.cpp ]
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