[patch] No allocation for empty unordered containers

François Dumont frs.dumont@gmail.com
Sat Oct 25 20:21:00 GMT 2014


I committed this then.

2014-10-25  François Dumont  <fdumont@gcc.gnu.org>

     * doc/xml/manual/status_cxx2011.xml: Update unordered container
     specific behavior.

François


On 09/09/2014 11:25, Jonathan Wakely wrote:
> On 09/09/14 10:23 +0100, Jonathan Wakely wrote:
>> On 08/09/14 20:22 +0200, François Dumont wrote:
>>> On 02/09/2014 12:05, Jonathan Wakely wrote:
>>>>
>>>> It's OK to document it with a Doxygen comment, although I think it
>>>> would be better in doc/xml/manual/containers.xml.
>>>>
>>>
>>> Hi
>>>
>>>   Here is the doc patch, I eventually found where you had documented 
>>> it.
>>
>> Ah yes, I forgot it's with the implementation defined properties.
>>
>>> Index: doc/xml/manual/status_cxx2011.xml
>>> ===================================================================
>>> --- doc/xml/manual/status_cxx2011.xml    (revision 215005)
>>> +++ doc/xml/manual/status_cxx2011.xml    (working copy)
>>> @@ -2625,8 +2625,8 @@
>>>      <emphasis>23.5.5.2 [unord.multimap.cnstr]</emphasis>,
>>>      <emphasis>23.5.6.2 [unord.set.cnstr]</emphasis>,
>>>      <emphasis>23.5.7.2 [unord.multiset.cnstr]</emphasis>
>>> -      The default bucket count is 10 for the default constructors
>>> -      and 0 for the range constructors and initializer-list 
>>> constructors.
>>> +      The default minimal bucket count is always 0 to avoid 
>>> allocation at
>>> +      instantiation as much as possible.
>>>   </para>
>>>
>>>   <para>
>>
>> I think it should talk about construction (or initialization) not
>> instantiation. Instantiation means something different for templates.
>
> And we don't need to give a rationale here, it just needs to define
> the value, so you could just change as little as possible:
>
>      The default bucket count is 0 for the default constructors,
>      range constructors and initializer-list constructors.
> .
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc.patch
Type: text/x-patch
Size: 720 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20141025/c2020f3d/attachment.bin>


More information about the Libstdc++ mailing list