This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Default std::vector<bool> default and move constructor
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 25 May 2017 17:28:16 +0100
- Subject: Re: Default std::vector<bool> default and move constructor
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 890394E35B
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 890394E35B
- References: <cda87f91-d9fd-692b-f60e-dcc92728f02e@gmail.com>
On 15/05/17 19:57 +0200, François Dumont wrote:
Hi
Following what I have started on RbTree here is a patch to default
implementation of default and move constructors on std::vector<bool>.
As in _Rb_tree_impl the default allocator is not value initialized
anymore. We could add a small helper type arround the allocator to do
this value initialization per default. Should I do so ?
It's required to be value-initialized, so if your patch changes that
then it's a problem.
Did we decide it's OK to do that for RB-trees? Did we actually discuss
that part of the r243379 changes?
N.B. defining these members as defaulted makes diagnostics worse, see
PR 80858, but I think we need to fix that in the compiler anyway.