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: [v3] Document implementation-defined bucket counts


I hadn't notice that default bucket count for range constructors was 0. That's surprising as the equivalent on internal _Hashtable type is 10 like for the other constructors. Why not generalizing to 10 ? The advantages would be:
- doc simplification
- constructors consistency


0 is also surprising for a container that has such an important memory overhead that creating it to store 1 or 2 elements looks like using a tank to kill a fly.

François


On 01/06/2013 10:58 PM, Jonathan Wakely wrote:
The standard says that the initial number of buckets in an unordered
associative container is implementation-defined when not set by the
user (I would have made it unspecified but noone asked me ;-) so this
patch documents our implementation's choice.

         * include/bits/unordered_map.h: Fix typo in comments.
         * doc/xml/manual/status_cxx2011.xml: Add implementation-defined bucket
         counts for unordered associative containers.

Committed to trunk.



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