|
Boost-Commit : |
From: igaztanaga_at_[hidden]
Date: 2007-09-22 02:15:23
Author: igaztanaga
Date: 2007-09-22 02:15:21 EDT (Sat, 22 Sep 2007)
New Revision: 39470
URL: http://svn.boost.org/trac/boost/changeset/39470
Log:
Sign extension bug. Not should be applied after the constant has been expanded to size_t. Thanks to Glenn Schrader.
Text files modified:
trunk/boost/intrusive/pointer_plus_bit.hpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Modified: trunk/boost/intrusive/pointer_plus_bit.hpp
==============================================================================
--- trunk/boost/intrusive/pointer_plus_bit.hpp (original)
+++ trunk/boost/intrusive/pointer_plus_bit.hpp 2007-09-22 02:15:21 EDT (Sat, 22 Sep 2007)
@@ -54,7 +54,7 @@
typedef T* pointer;
static pointer get_pointer(pointer n)
- { return pointer(std::size_t(n) & std::size_t(~1u)); }
+ { return pointer(std::size_t(n) & ~std::size_t(1u)); }
static void set_pointer(pointer &n, pointer p)
{
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