This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] No allocation for empty unordered containers
- 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: Mon, 4 Aug 2014 12:55:39 +0100
- Subject: Re: [patch] No allocation for empty unordered containers
- Authentication-results: sourceware.org; auth=none
- References: <538E339A dot 3010709 at gmail dot com> <53D2C3D4 dot 8060601 at gmail dot com> <20140804114914 dot GO2361 at redhat dot com>
On 04/08/14 12:49 +0100, Jonathan Wakely wrote:
On 25/07/14 22:53 +0200, François Dumont wrote:
Hi
I think I never get feedback regarding this patch proposal. Note
I've been trying to weigh up the pros and cons and am unsure what's
best, but I think my preference is to have a noexcept default
constructor. Unless you hear any objections in the next 48 hours
please go ahead and commit this to trunk, thanks
I hit send too soon, I meant to say that I think this change is also
needed:
I don't know if you had in mind to noexcept qualify the default
constructor but it would mean to have a real default constructor
and another to deal with the hint which wouldn't match the
Standard so no noexcept qualification at the moment.
If we don't make it noexcept then I see no point in avoiding
allocation.
(And if the functors and allocator can throw then the noexcept might
have to be condition.)
So please make sure we get that change as well during stage 1.