This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] No allocation for empty unordered containers
- From: François Dumont <frs dot dumont at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sat, 25 Oct 2014 22:21:27 +0200
- Subject: Re: [patch] No allocation for empty unordered containers
- Authentication-results: sourceware.org; auth=none
- References: <53E13D4B dot 5080909 at oracle dot com> <53EA697F dot 4030407 at gmail dot com> <alpine dot DEB dot 2 dot 11 dot 1408122137280 dot 1593 at laptop-mg dot saclay dot inria dot fr> <53EA70B6 dot 20503 at gmail dot com> <20140813095026 dot GU6927 at redhat dot com> <53ED0C8D dot 5020809 at gmail dot com> <540211EF dot 2020206 at gmail dot com> <20140902100523 dot GT22778 at redhat dot com> <540DF3FF dot 40501 at gmail dot com> <20140909092324 dot GA22778 at redhat dot com> <20140909092521 dot GB22778 at redhat dot com>
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.
.
Index: doc/xml/manual/status_cxx2011.xml
===================================================================
--- doc/xml/manual/status_cxx2011.xml (revision 216691)
+++ doc/xml/manual/status_cxx2011.xml (working copy)
@@ -2612,8 +2612,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 0 for the default constructors, range
+ constructors and initializer-list constructors.
</para>
<para>