Re: [patch] No allocation for empty unordered containers

2014-09-09 Thread Jonathan Wakely
On 14/08/14 21:22 +0200, François Dumont wrote: I am preparing a patch for profile mode so I will submit modification for this mode with this big patch. btw, François, for profile mode I think we should just do something like this patch. I feel quite strongly that if using Debug Mode or

Re: [patch] No allocation for empty unordered containers

2014-09-09 Thread François Dumont
On 09/09/2014 19:29, Jonathan Wakely wrote: On 14/08/14 21:22 +0200, François Dumont wrote: I am preparing a patch for profile mode so I will submit modification for this mode with this big patch. btw, François, for profile mode I think we should just do something like this patch. I feel

Re: [patch] No allocation for empty unordered containers

2014-09-09 Thread Jonathan Wakely
On 09/09/14 23:03 +0200, François Dumont wrote: On 09/09/2014 19:29, Jonathan Wakely wrote: On 14/08/14 21:22 +0200, François Dumont wrote: I am preparing a patch for profile mode so I will submit modification for this mode with this big patch. btw, François, for profile mode I think we

Re: [patch] No allocation for empty unordered containers

2014-09-05 Thread Jonathan Wakely
On 14/08/14 21:22 +0200, François Dumont wrote: Then here is the patch to introduce default constructor with compiler computed noexcept qualification. Note that I also made allocator aware default constructor allocation free however noexcept qualification has to be manually written which I

Re: [patch] No allocation for empty unordered containers

2014-09-02 Thread Jonathan Wakely
On 30/08/14 20:03 +0200, François Dumont wrote: Any news for my patch proposals ? Regarding documentation of default minimum number of buckets, I don't know where it has been documented but why do we need to document it separately ? Could it be taken care by Doxygen ? Can't it get the

Re: [patch] No allocation for empty unordered containers

2014-08-30 Thread François Dumont
Any news for my patch proposals ? Regarding documentation of default minimum number of buckets, I don't know where it has been documented but why do we need to document it separately ? Could it be taken care by Doxygen ? Can't it get the default value from the code itself ? If not we could

Re: [patch] No allocation for empty unordered containers

2014-08-14 Thread François Dumont
On 13/08/2014 11:50, Jonathan Wakely wrote: Yes you can, it's conforming to replace a (non-virtual) member function with default arguments by two or more member functions. We do it all the time. See 17.6.5.5 [member.functions] p2. You should have told it sooner ! But of course no-one is

Re: [patch] No allocation for empty unordered containers

2014-08-13 Thread Jonathan Wakely
On 12/08/14 21:53 +0200, François Dumont wrote: 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

Re: [patch] No allocation for empty unordered containers

2014-08-12 Thread François Dumont
On 05/08/2014 22:23, Paolo Carlini wrote: Hi, On 08/05/2014 10:10 PM, Jonathan Wakely wrote: 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

Re: [patch] No allocation for empty unordered containers

2014-08-12 Thread Marc Glisse
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

Re: [patch] No allocation for empty unordered containers

2014-08-12 Thread François Dumont
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

Re: [patch] No allocation for empty unordered containers

2014-08-04 Thread Jonathan Wakely
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

Re: [patch] No allocation for empty unordered containers

2014-08-04 Thread Jonathan Wakely
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

Re: [patch] No allocation for empty unordered containers

2014-07-25 Thread François Dumont
Hi I think I never get feedback regarding this patch proposal. Note that if accepted the doc will have to be updated regarding the default hint value. Thanks On 03/06/2014 22:44, François Dumont wrote: Hi Thanks to the single bucket introduced to make move semantic noexcept we

[patch] No allocation for empty unordered containers

2014-06-03 Thread François Dumont
Hi Thanks to the single bucket introduced to make move semantic noexcept we can also avoid some over allocations. Here is a patch to avoid any allocation on default instantiation, on range constructor when range is empty and on construction from an initialization list when this list is