Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-01-10 07:51:53


Author: danieljames
Date: 2008-01-10 07:51:52 EST (Thu, 10 Jan 2008)
New Revision: 42654
URL: http://svn.boost.org/trac/boost/changeset/42654

Log:
Don't store a reference to a value before constructing the eleement.
Text files modified:
   branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp | 3 +--
   1 files changed, 1 insertions(+), 2 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-10 07:51:52 EST (Thu, 10 Jan 2008)
@@ -1723,8 +1723,7 @@
 
                         // Create the node before rehashing in case it throws an
                         // exception (need strong safety in such a case).
- value_type const& v = *i;
- a.construct(v);
+ a.construct(*i);
 
                         // reserve has basic exception safety if the hash function
                         // throws, strong otherwise.


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