Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86433 - in trunk: boost/unordered libs/unordered/test/unordered
From: dnljms_at_[hidden]
Date: 2013-10-25 18:21:52


Author: danieljames
Date: 2013-10-25 18:21:51 EDT (Fri, 25 Oct 2013)
New Revision: 86433
URL: http://svn.boost.org/trac/boost/changeset/86433

Log:
Fix potential msvc 12 workaround.

Text files modified:
   trunk/boost/unordered/unordered_map.hpp | 8 ++++----
   trunk/boost/unordered/unordered_set.hpp | 8 ++++----
   trunk/libs/unordered/test/unordered/insert_tests.cpp | 10 +++++-----
   3 files changed, 13 insertions(+), 13 deletions(-)

Modified: trunk/boost/unordered/unordered_map.hpp
==============================================================================
--- trunk/boost/unordered/unordered_map.hpp Fri Oct 25 17:57:04 2013 (r86432)
+++ trunk/boost/unordered/unordered_map.hpp 2013-10-25 18:21:51 EDT (Fri, 25 Oct 2013) (r86433)
@@ -409,9 +409,9 @@
         void insert(std::initializer_list<value_type>);
 
 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800))
- template <typename T>
+ template <typename T1>
         typename boost::enable_if_c<
- boost::is_convertible<T, value_type>::value,
+ boost::is_convertible<T1, value_type>::value,
             void>::type insert(std::initializer_list<T> list)
         {
             table_.insert_range(list.begin(), list.end());
@@ -903,9 +903,9 @@
         void insert(std::initializer_list<value_type>);
 
 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800))
- template <typename T>
+ template <typename T1>
         typename boost::enable_if_c<
- boost::is_convertible<T, value_type>::value,
+ boost::is_convertible<T1, value_type>::value,
             void>::type insert(std::initializer_list<T> list)
         {
             table_.insert_range(list.begin(), list.end());

Modified: trunk/boost/unordered/unordered_set.hpp
==============================================================================
--- trunk/boost/unordered/unordered_set.hpp Fri Oct 25 17:57:04 2013 (r86432)
+++ trunk/boost/unordered/unordered_set.hpp 2013-10-25 18:21:51 EDT (Fri, 25 Oct 2013) (r86433)
@@ -408,9 +408,9 @@
         void insert(std::initializer_list<value_type>);
 
 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800))
- template <typename T>
+ template <typename T1>
         typename boost::enable_if_c<
- boost::is_convertible<T, value_type>::value,
+ boost::is_convertible<T1, value_type>::value,
             void>::type insert(std::initializer_list<T> list)
         {
             table_.insert_range(list.begin(), list.end());
@@ -888,9 +888,9 @@
         void insert(std::initializer_list<value_type>);
 
 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800))
- template <typename T>
+ template <typename T1>
         typename boost::enable_if_c<
- boost::is_convertible<T, value_type>::value,
+ boost::is_convertible<T1, value_type>::value,
             void>::type insert(std::initializer_list<T> list)
         {
             table_.insert_range(list.begin(), list.end());

Modified: trunk/libs/unordered/test/unordered/insert_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/insert_tests.cpp Fri Oct 25 17:57:04 2013 (r86432)
+++ trunk/libs/unordered/test/unordered/insert_tests.cpp 2013-10-25 18:21:51 EDT (Fri, 25 Oct 2013) (r86433)
@@ -582,10 +582,10 @@
 
     friend std::size_t hash_value(initialize_from_two_ints const& x)
     {
- return a + b;
+ return x.a + x.b;
     }
 
- bool operator==(initialize_from_two_ints const& x)
+ bool operator==(initialize_from_two_ints const& x) const
     {
         return a == x.a && b == x.b;
     }
@@ -604,7 +604,7 @@
     set2.insert({1, 2});
     BOOST_TEST(set2.size() == 1);
     BOOST_TEST(set2.find({1,2}) != set2.end());
- BOOST_TEST(set2.find({2,1}) != set2.end());
+ BOOST_TEST(set2.find({2,1}) == set2.end());
 
     set2.insert({{3,4},{5,6},{7,8}});
     BOOST_TEST(set2.size() == 4);
@@ -612,7 +612,7 @@
     BOOST_TEST(set2.find({3,4}) != set2.end());
     BOOST_TEST(set2.find({5,6}) != set2.end());
     BOOST_TEST(set2.find({7,8}) != set2.end());
- BOOST_TEST(set2.find({8,7}) != set2.end());
+ BOOST_TEST(set2.find({8,7}) == set2.end());
 
     set2.insert({{2, 1}, {3,4}});
     BOOST_TEST(set2.size() == 5);
@@ -621,7 +621,7 @@
     BOOST_TEST(set2.find({3,4}) != set2.end());
     BOOST_TEST(set2.find({5,6}) != set2.end());
     BOOST_TEST(set2.find({7,8}) != set2.end());
- BOOST_TEST(set2.find({8,7}) != set2.end());
+ BOOST_TEST(set2.find({8,7}) == set2.end());
 }
 
 UNORDERED_AUTO_TEST(insert_initializer_list_multiset)


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