From: "Daniel Krügler" <daniel.kruegler@gmail.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: std::forward_list optim for always equal allocator
Date: Mon, 17 Jul 2017 20:14:00 -0000 [thread overview]
Message-ID: <CAGNvRgBN2PGBHUWzQYrvFQ7CXGNAno743rx_KV4wovZEhVEQBg@mail.gmail.com> (raw)
In-Reply-To: <c199ddfe-3292-f42e-a2ce-aa3ef92e5910@gmail.com>
2017-07-17 22:10 GMT+02:00 François Dumont <frs.dumont@gmail.com>:
> Hi
>
> Here is the patch to implement the always equal alloc optimization for
> forward_list. With this version there is no abi issue.
>
> I also prefer to implement the _Fwd_list_node_base move operator for
> consistency with the move constructor and used it where applicable.
>
>
> * include/bits/forward_list.h
> (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): Implement.
> (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
> (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, std::true_type)):
> New, use latter.
> (forward_list(forward_list&&, _Node_alloc_type&&, std::false_type)):
> New.
> (forward_list(forward_list&&, _Node_alloc_type&&, std::true_type)):
> New.
> (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
> * include/bits/forward_list.tcc
> (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
> _M_impl._M_head move assignment.
> (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
>
> Tested under Linux x86_64, ok to commit ?
Out of curiosity: Shouldn't
_Fwd_list_node_base&
operator=(_Fwd_list_node_base&& __x);
be declared noexcept?
Thanks,
- Daniel
next prev parent reply other threads:[~2017-07-17 20:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 20:10 François Dumont
2017-07-17 20:14 ` Daniel Krügler [this message]
2017-08-28 20:39 ` François Dumont
2017-09-08 16:19 ` Jonathan Wakely
2017-09-11 5:12 ` François Dumont
2017-09-11 5:44 ` Daniel Krügler
2017-09-11 12:11 ` Jonathan Wakely
2017-09-11 20:36 ` François Dumont
2017-09-11 20:39 ` Daniel Krügler
2017-09-11 22:10 ` Jonathan Wakely
2017-09-12 20:41 ` François Dumont
2017-11-23 21:49 ` François Dumont
2018-01-08 14:07 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGNvRgBN2PGBHUWzQYrvFQ7CXGNAno743rx_KV4wovZEhVEQBg@mail.gmail.com \
--to=daniel.kruegler@gmail.com \
--cc=frs.dumont@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).