Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53687 - in branches/release: . boost/functional/hash/detail boost/unordered/detail libs/unordered/doc libs/unordered/test/unordered status
From: daniel_james_at_[hidden]
Date: 2009-06-06 10:05:55


Author: danieljames
Date: 2009-06-06 10:05:54 EDT (Sat, 06 Jun 2009)
New Revision: 53687
URL: http://svn.boost.org/trac/boost/changeset/53687

Log:
Misc. unordered changes. Fixes #3082, #3119.

Merged revisions 53505-53506,53525,53550,53552,53614 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r53505 | danieljames | 2009-05-31 16:50:56 +0100 (Sun, 31 May 2009) | 1 line
  
  Disable incorrect Visual C++ 64-bit warnings. Ref #3082.
........
  r53506 | danieljames | 2009-05-31 16:53:09 +0100 (Sun, 31 May 2009) | 1 line
  
  Remove misplaced visual C++ warning pragma.
........
  r53525 | danieljames | 2009-06-01 07:50:37 +0100 (Mon, 01 Jun 2009) | 1 line
  
  Fix tests for when the library has support for initializer lists but the compiler doesn't.
........
  r53550 | danieljames | 2009-06-01 20:17:49 +0100 (Mon, 01 Jun 2009) | 1 line
  
  Get the type of the initializer_list right.
........
  r53552 | danieljames | 2009-06-01 20:22:27 +0100 (Mon, 01 Jun 2009) | 1 line
  
  Fix the unordered_map declaration in the tutorial. Fixes #3119.
........
  r53614 | danieljames | 2009-06-03 23:48:49 +0100 (Wed, 03 Jun 2009) | 1 line
  
  The move tests pass on 64 bit visual c++.
........

Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/boost/functional/hash/detail/hash_float.hpp | 8 --------
   branches/release/boost/unordered/detail/hash_table.hpp | 12 ++++++++++++
   branches/release/libs/unordered/doc/hash_equality.qbk | 2 +-
   branches/release/libs/unordered/test/unordered/assign_tests.cpp | 15 +++++++++++++++
   branches/release/libs/unordered/test/unordered/constructor_tests.cpp | 11 +++++++++++
   branches/release/status/explicit-failures-markup.xml | 7 ++++++-
   6 files changed, 45 insertions(+), 10 deletions(-)

Modified: branches/release/boost/functional/hash/detail/hash_float.hpp
==============================================================================
--- branches/release/boost/functional/hash/detail/hash_float.hpp (original)
+++ branches/release/boost/functional/hash/detail/hash_float.hpp 2009-06-06 10:05:54 EDT (Sat, 06 Jun 2009)
@@ -10,14 +10,6 @@
 # pragma once
 #endif
 
-#if defined(BOOST_MSVC)
-#pragma warning(push)
-#if BOOST_MSVC >= 1400
-#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does
- // not satisfy test. Loop body not executed
-#endif
-#endif
-
 #include <boost/config.hpp>
 #include <boost/functional/hash/detail/float_functions.hpp>
 #include <boost/functional/hash/detail/limits.hpp>

Modified: branches/release/boost/unordered/detail/hash_table.hpp
==============================================================================
--- branches/release/boost/unordered/detail/hash_table.hpp (original)
+++ branches/release/boost/unordered/detail/hash_table.hpp 2009-06-06 10:05:54 EDT (Sat, 06 Jun 2009)
@@ -61,6 +61,14 @@
 
 #endif
 
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:4267) // conversion from 'size_t' to 'unsigned int',
+ // possible loss of data.
+#endif
+#endif
+
 #if BOOST_WORKAROUND(__BORLANDC__, <= 0x0582)
 #define BOOST_UNORDERED_BORLAND_BOOL(x) (bool)(x)
 #else
@@ -332,4 +340,8 @@
 #undef BOOST_UNORDERED_BORLAND_BOOL
 #undef BOOST_UNORDERED_MSVC_RESET_PTR
 
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_UNORDERED_DETAIL_HASH_TABLE_HPP_INCLUDED

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 2009-06-06 10:05:54 EDT (Sat, 06 Jun 2009)
@@ -13,7 +13,7 @@
             class Key, class Mapped,
             class Hash = ``[classref boost::hash]``<Key>,
             class Pred = std::equal_to<Key>,
- class Alloc = std::allocator<Key> >
+ class Alloc = std::allocator<std::pair<Key const, Mapped> > >
         class ``[classref boost::unordered_map unordered_map]``;
 
 The hash function comes first as you might want to change the hash function

Modified: branches/release/libs/unordered/test/unordered/assign_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/assign_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/assign_tests.cpp 2009-06-06 10:05:54 EDT (Sat, 06 Jun 2009)
@@ -105,6 +105,21 @@
 
 #if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
 
+UNORDERED_AUTO_TEST(assign_default_initializer_list) {
+ std::cerr<<"Initializer List Tests\n";
+ std::initializer_list<std::pair<int const, int> > init;
+ boost::unordered_map<int, int> x1;
+ x1[25] = 3;
+ x1[16] = 10;
+ BOOST_TEST(!x1.empty());
+ x1 = init;
+ BOOST_TEST(x1.empty());
+}
+
+#endif
+
+#if !defined(BOOST_NO_INITIALIZER_LISTS)
+
 UNORDERED_AUTO_TEST(assign_initializer_list)
 {
     std::cerr<<"Initializer List Tests\n";

Modified: branches/release/libs/unordered/test/unordered/constructor_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/constructor_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/constructor_tests.cpp 2009-06-06 10:05:54 EDT (Sat, 06 Jun 2009)
@@ -290,6 +290,17 @@
 
 #if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
 
+UNORDERED_AUTO_TEST(test_default_initializer_list) {
+ std::cerr<<"Initializer List Tests\n";
+ std::initializer_list<int> init;
+ boost::unordered_set<int> x1 = init;
+ BOOST_TEST(x1.empty());
+}
+
+#endif
+
+#if !defined(BOOST_NO_INITIALIZER_LISTS)
+
 UNORDERED_AUTO_TEST(test_initializer_list) {
     std::cerr<<"Initializer List Tests\n";
     boost::unordered_set<int> x1 = { 2, 10, 45, -5 };

Modified: branches/release/status/explicit-failures-markup.xml
==============================================================================
--- branches/release/status/explicit-failures-markup.xml (original)
+++ branches/release/status/explicit-failures-markup.xml 2009-06-06 10:05:54 EDT (Sat, 06 Jun 2009)
@@ -5750,7 +5750,12 @@
     <library name="unordered">
       <mark-expected-failures>
         <test name="move_tests"/>
- <toolset name="msvc-*"/>
+ <toolset name="msvc-6*"/>
+ <toolset name="msvc-7*"/>
+ <toolset name="msvc-8*"/>
+ <toolset name="msvc-9.0"/>
+ <toolset name="msvc-9.0express"/>
+ <toolset name="msvc-10.0"/>
         <toolset name="intel-win-10.1"/>
         <toolset name="borland-*"/>
         <toolset name="sun-*"/>


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