Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-07-06 18:00:19


Author: danieljames
Date: 2008-07-06 18:00:18 EDT (Sun, 06 Jul 2008)
New Revision: 47150
URL: http://svn.boost.org/trac/boost/changeset/47150

Log:
Make the unordered constructors from allocators explicit.
And clean of the FNV-1 example & documentation a little.

Merged revisions 47085,47132,47143-47146 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r47085 | danieljames | 2008-07-04 23:57:20 +0100 (Fri, 04 Jul 2008) | 4 lines
  
  Require explicit conversion from allocators.
  
  (Not what it says in the draft standard, but I think that might be a defect).
........
  r47132 | danieljames | 2008-07-06 13:41:09 +0100 (Sun, 06 Jul 2008) | 2 lines
  
  'Bias' should be 'basis'.
........
  r47143 | danieljames | 2008-07-06 22:06:52 +0100 (Sun, 06 Jul 2008) | 1 line
  
  Clean up the FNV-1 comments.
........
  r47144 | danieljames | 2008-07-06 22:07:31 +0100 (Sun, 06 Jul 2008) | 1 line
  
  I've only got one hash function for release, so no need for its own directory.
........
  r47145 | danieljames | 2008-07-06 22:08:11 +0100 (Sun, 06 Jul 2008) | 1 line
  
  Remove the hash_functions directory (for now).
........
  r47146 | danieljames | 2008-07-06 22:29:47 +0100 (Sun, 06 Jul 2008) | 1 line
  
  Update the docs for the new location of FNV-1.
........

Added:
   branches/release/libs/unordered/examples/fnv1.hpp
      - copied unchanged from r47146, /trunk/libs/unordered/examples/fnv1.hpp
Removed:
   branches/release/libs/unordered/examples/hash_functions/
Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/boost/unordered_map.hpp | 5 ++---
   branches/release/boost/unordered_set.hpp | 6 ++----
   branches/release/libs/unordered/doc/hash_equality.qbk | 4 ++--
   branches/release/libs/unordered/doc/ref.xml | 10 +++++-----
   branches/release/libs/unordered/doc/src_code/dictionary.cpp | 2 +-
   5 files changed, 12 insertions(+), 15 deletions(-)

Modified: branches/release/boost/unordered_map.hpp
==============================================================================
--- branches/release/boost/unordered_map.hpp (original)
+++ branches/release/boost/unordered_map.hpp 2008-07-06 18:00:18 EDT (Sun, 06 Jul 2008)
@@ -107,8 +107,7 @@
         {
         }
 
- // TODO: Should this be explicit?
- unordered_map(allocator_type const& a)
+ explicit unordered_map(allocator_type const& a)
             : base(boost::unordered_detail::default_initial_bucket_count,
                 hasher(), key_equal(), a)
         {
@@ -504,7 +503,7 @@
         {
         }
 
- unordered_multimap(allocator_type const& a)
+ explicit unordered_multimap(allocator_type const& a)
             : base(boost::unordered_detail::default_initial_bucket_count,
                 hasher(), key_equal(), a)
         {

Modified: branches/release/boost/unordered_set.hpp
==============================================================================
--- branches/release/boost/unordered_set.hpp (original)
+++ branches/release/boost/unordered_set.hpp 2008-07-06 18:00:18 EDT (Sun, 06 Jul 2008)
@@ -104,8 +104,7 @@
         {
         }
 
- // TODO: Should this be explicit?
- unordered_set(allocator_type const& a)
+ explicit unordered_set(allocator_type const& a)
             : base(boost::unordered_detail::default_initial_bucket_count,
                 hasher(), key_equal(), a)
         {
@@ -473,8 +472,7 @@
         {
         }
 
- // TODO: Should this be explicit?
- unordered_multiset(allocator_type const& a)
+ explicit unordered_multiset(allocator_type const& a)
             : base(boost::unordered_detail::default_initial_bucket_count,
                 hasher(), key_equal(), a)
         {

Modified: branches/release/libs/unordered/doc/hash_equality.qbk
==============================================================================
--- branches/release/libs/unordered/doc/hash_equality.qbk (original)
+++ branches/release/libs/unordered/doc/hash_equality.qbk 2008-07-06 18:00:18 EDT (Sun, 06 Jul 2008)
@@ -23,8 +23,8 @@
 [import src_code/dictionary.cpp]
 [case_sensitive_dictionary_fnv]
 
-An example implementation of FNV-1, and some other hash functions are supplied
-in the examples directory.
+There is an [@../../libs/unordered/examples/fnv1.hpp implementation
+of FNV-1] in the examples directory.
 
 If you wish to use a different equality function,
 you will also need to use a matching hash function. For

Modified: branches/release/libs/unordered/doc/ref.xml
==============================================================================
--- branches/release/libs/unordered/doc/ref.xml (original)
+++ branches/release/libs/unordered/doc/ref.xml 2008-07-06 18:00:18 EDT (Sun, 06 Jul 2008)
@@ -181,7 +181,7 @@
               <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
             </description>
           </constructor>
- <constructor>
+ <constructor specifiers="explicit">
             <parameter name="a">
               <paramtype>Allocator const&amp;</paramtype>
             </parameter>
@@ -928,7 +928,7 @@
               <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
             </description>
           </constructor>
- <constructor>
+ <constructor specifiers="explicit">
             <parameter name="a">
               <paramtype>Allocator const&amp;</paramtype>
             </parameter>
@@ -1685,7 +1685,7 @@
               <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
             </description>
           </constructor>
- <constructor>
+ <constructor specifiers="explicit">
             <parameter name="a">
               <paramtype>Allocator const&amp;</paramtype>
             </parameter>
@@ -2483,7 +2483,7 @@
               <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
             </description>
           </constructor>
- <constructor>
+ <constructor specifiers="explicit">
             <parameter name="a">
               <paramtype>Allocator const&amp;</paramtype>
             </parameter>
@@ -3062,4 +3062,4 @@
         </class>
       </namespace>
     </header>
- </library-reference>
\ No newline at end of file
+ </library-reference>

Modified: branches/release/libs/unordered/doc/src_code/dictionary.cpp
==============================================================================
--- branches/release/libs/unordered/doc/src_code/dictionary.cpp (original)
+++ branches/release/libs/unordered/doc/src_code/dictionary.cpp 2008-07-06 18:00:18 EDT (Sun, 06 Jul 2008)
@@ -6,7 +6,7 @@
 #include <boost/unordered_map.hpp>
 #include <boost/detail/lightweight_test.hpp>
 #include <boost/algorithm/string/predicate.hpp>
-#include "../../examples/hash_functions/fnv-1.hpp"
+#include "../../examples/fnv1.hpp"
 
 //[case_insensitive_functions
     struct iequal_to


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk