This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] No allocation for empty unordered containers


On 05/08/14 22:01 +0200, François Dumont wrote:
On 04/08/2014 13:55, Jonathan Wakely wrote:

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.



Hi

I know why move constructor must be noexcept but why default must be too ?

It doesn't have to be noexcept, but IMHO there is no point changing
the containers to avoid allocation unless that allows us to mark it
noexcept.  If it can throw anyway, we might as well allocate the
initial buckets.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]