* [v3] Document implementation-defined bucket counts
@ 2013-01-06 21:58 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2013-01-06 21:58 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 468 bytes --]
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.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2315 bytes --]
commit 823cb734cf2f37650fe12634eb2d58f0ff4645a2
Author: Jonathan Wakely <jwakely.gcc@gmail.com>
Date: Sun Jan 6 20:48:53 2013 +0000
* include/bits/unordered_map.h: Fix typo in comments.
* doc/xml/manual/status_cxx2011.xml: Add implementation-defined bucket
counts for unordered associative containers.
diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml
index 0164b0b..c0780de 100644
--- a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml
+++ b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml
@@ -2635,6 +2635,15 @@ particular release.
</para>
<para>
+ <emphasis>23.5.4.2 [unord.map.cnstr]</emphasis>,
+ <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.
+ </para>
+
+ <para>
<emphasis>30.2.3 [thread.req.native]/1</emphasis>
<classname>native_handle_type</classname> and
<methodname>native_handle</methodname> are provided. The handle types
diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h
index e2b83db..9fa0553 100644
--- a/libstdc++-v3/include/bits/unordered_map.h
+++ b/libstdc++-v3/include/bits/unordered_map.h
@@ -1,6 +1,6 @@
// unordered_map implementation -*- C++ -*-
-// Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2010-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -167,7 +167,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Copy constructor.
unordered_map(const unordered_map&) = default;
- /// Move constrcutor.
+ /// Move constructor.
unordered_map(unordered_map&&) = default;
/**
@@ -848,7 +848,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Copy constructor.
unordered_multimap(const unordered_multimap&) = default;
- /// Move constrcutor.
+ /// Move constructor.
unordered_multimap(unordered_multimap&&) = default;
/**
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-06 21:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-06 21:58 [v3] Document implementation-defined bucket counts Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).