On Tue, Jun 05, 2007 at 04:35:16PM +0200, Ion GaztaƱaga wrote:
I just realized about this just after sending my previous mail. SunCC seems to use the classical cfront approach encoding a pointer to member as offset + 1. So it seems that parent_from_member detection is correct for SunCC.
Slightly off-topic, but: do you know the background WHY did they decide to implement ptr-to-member as offset +1?
boost/intrusive/detail/utilities.hpp in the member_value_traits class:
static node_ptr to_node_ptr(reference value) { MemberHookType* result = &(value.*P); return result->to_node_ptr(); }
I have tracked the conversion to here myself. I wondered whether this was
a compiler bug, but the following simple program works, ie. it does NOT
raise an assertion failure. I hope I managed to reproduce correctly the
usage pattern of ptr-to-member..
==
#include