On Fri, 3 Oct 2014, Jonathan Wakely wrote:
This is the patch I intend to commit to make std::list::size() O(1) as
required by C++11.
This is an ABI change, so std::list will get tagged with
abi_tag("cxx11") so that it mangles differently.
Assuming a future where we have both _GLIBCXX_ABI_TAG_CXX11 and
_GLIBCXX_ABI_TAG_CXX17, I don't really see how _GLIBCXX_DEFAULT_ABI_TAG
is supposed to work. We don't want to define _GLIBCXX_DEFAULT_ABI_TAG to
_GLIBCXX_ABI_TAG_CXX17 and suddenly have std::list change mangling. Should
it be called _GLIBCXX_DEFAULT_ABI_TAG_CXX11, meaning
_GLIBCXX_ABI_TAG_CXX11_IF_ENABLED_AND_NOTHING_OTHERWISE?
Defining a dummy _M_distance in the old abi case is a bit strange (we
could protect the single use with #if _GLIBCXX_USE_CXX11_ABI), but why
not...
Do you mind if I move (in a future patch once yours is committed) _M_size
into _M_impl::_M_node as suggested in PR 61347?
--
Marc Glisse