[patch] No allocation for empty unordered containers
François Dumont
frs.dumont@gmail.com
Tue Aug 12 19:53:00 GMT 2014
On 12/08/2014 21:39, Marc Glisse wrote:
> On Tue, 12 Aug 2014, François Dumont wrote:
>
>> Based on your feedbacks I think we should stay with just targeting
>> good QoI by not allocating on default construction. As I said the
>> noexcept qualification would need to not conform strictly to the
>> Standard.
>
> The standard explicitly says that you may add noexcept wherever you
> like. It is constexpr that we can only add in GNU mode.
>
That's not what I meant. For unordered containers there is no real
default constructor. it is in fact a constructor with parameters which
have all default values. This is why you can only say that it won't
throw at runtime and so you can't qualify it noexcept.
François
More information about the Libstdc++
mailing list