Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8512: set member_hook access violation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-08 08:31:17
#8512: set member_hook access violation
-------------------------------+-------------------------
Reporter: toby_toby_toby@⦠| Owner: igaztanaga
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: intrusive
Version: Boost 1.53.0 | Severity: Showstopper
Resolution: wontfix | Keywords:
-------------------------------+-------------------------
Comment (by toby_toby_toby@â¦):
Just an idea, add new option to hook:
{{{
typedef boost::intrusive::list_member_hook<
boost::intrusive::store_pointer_to_parent_inside<true>
>
}}}
So we will have
{{{
parent* _parent;
}}}
inside hook (null in constructor) for platforms that require it, if GCC
does not need - then just do nothing with this option.
Then, when we call container.insert( item ), we actually have reference to
item so we can assign it:
{{{
(item.*hook_member_ptr)._parent = &item;
}}}
And clear on erase. Now we don't need offsetoff or etc.
Static assertion will only be rised when compiler requires this (for
people like me who actually expirienced problems). For other users it will
be backward compatible: no need to specify option, sizeof same. Option
only required for msvc+virtual inheritance.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8512#comment:11> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC