[C++-sig] Patch: Two more addressof() substitutions in value_holder.hpp
Matthias Baas
baas at ira.uka.de
Tue Jan 24 10:22:09 CET 2006
Hi,
I've just updated to Boost 1.33.1 and also extended a wrapper of mine
and stumbled over two more occurrences of the address operator in
value_holder.hpp that I had to substitute by the addressof() function
(because in the SDK I'm wrapping there are private address operators,
see the original thread over here:
http://thread.gmane.org/gmane.comp.python.c++/8661 "Wrapping a class
with private operator&()").
The two substitutions were in line 104 and 109 in value_holder.hpp
(there's a patch below).
Sorry that I missed that one last time...
- Matthias -
--- value_holder.hpp.orig 2005-10-14 17:05:40.000000000 +0200
+++ value_holder.hpp 2006-01-18 12:27:38.000000000 +0100
@@ -101,12 +101,12 @@
type_info dst_t, bool null_ptr_only)
{
type_info src_t = python::type_id<Value>();
- Value* x = &m_held;
+ Value* x = boost::addressof(m_held);
if (dst_t == src_t)
return x;
else if (dst_t == python::type_id<Held>())
- return &m_held;
+ return boost::addressof(m_held);
else
return find_static_type(x, src_t, dst_t);
}
More information about the Cplusplus-sig
mailing list