Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-01-12 18:15:44


Author: danieljames
Date: 2008-01-12 18:15:44 EST (Sat, 12 Jan 2008)
New Revision: 42709
URL: http://svn.boost.org/trac/boost/changeset/42709

Log:
IBM's compiler doesn't like my downcast of a reference, try a pointer instead.

Text files modified:
   branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp (original)
+++ branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp 2008-01-12 18:15:44 EST (Sat, 12 Jan 2008)
@@ -131,7 +131,7 @@
 
                 void destroy(link_ptr ptr)
                 {
- node_ptr n(node_alloc_.address(static_cast<node&>(*ptr)));
+ node_ptr n(node_alloc_.address(*static_cast<node*>(&*ptr)));
                     value_alloc_.destroy(value_alloc_.address(n->value_));
                     node_base_alloc_.destroy(node_base_alloc_.address(*n));
                     node_alloc_.deallocate(n, 1);
@@ -224,7 +224,7 @@
 
 #if BOOST_UNORDERED_EQUIVALENT_KEYS
             static inline link_ptr& prev_in_group(link_ptr n) {
- return static_cast<node&>(*n).group_prev_;
+ return static_cast<node*>(&*n)->group_prev_;
             }
 
             // pre: Must be pointing to the first node in a group.
@@ -242,13 +242,13 @@
             // pre: Must be pointing to a node
             static inline node& get_node(link_ptr p) {
                 BOOST_ASSERT(p);
- return static_cast<node&>(*p);
+ return *static_cast<node*>(&*p);
             }
 
             // pre: Must be pointing to a node
             static inline reference get_value(link_ptr p) {
                 BOOST_ASSERT(p);
- return static_cast<node&>(*p).value_;
+ return static_cast<node*>(&*p)->value_;
             }
 
             class iterator_base


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