This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3, patch] Move std::list::_M_size closer to iterators
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Oct 2014 10:03:17 +0100
- Subject: Re: [v3, patch] Move std::list::_M_size closer to iterators
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1410122117180 dot 7949 at stedding dot saclay dot inria dot fr>
On 12/10/14 21:41 +0200, Marc Glisse wrote:
Hello,
this patch moves _M_size in std::list to a place where it should be
easier (no offsetof) to access from an iterator (it doesn't matter
when you access it from the main std::list object). It does not take
advantage of it yet, that can be done at any time, whereas the layout
will soon be fixed. This triggered one of the issues listed in PR
63345 (casting to a node* even for the sentinel), which I am fixing
here.
Nice, OK for trunk, thanks.