Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-05-20 11:38:57


Author: danieljames
Date: 2008-05-20 11:38:57 EDT (Tue, 20 May 2008)
New Revision: 45575
URL: http://svn.boost.org/trac/boost/changeset/45575

Log:
Merge some Borland workarounds from trunk.

Merged revisions 45283,45292-45296,45298,45303-45307,45339,45346-45347,45353-45355,45359,45378,45393,45395,45409,45421-45423,45445-45447,45449,45456,45479,45481-45483,45545,45550,45565,45570,45573 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r45409 | danieljames | 2008-05-15 22:10:51 +0100 (Thu, 15 May 2008) | 1 line
  
  Borland doesn't seem to be able to cope with 'has_move_assign'.
........
  r45573 | danieljames | 2008-05-20 16:13:57 +0100 (Tue, 20 May 2008) | 12 lines
  
  Fix for older versions of the Borland C++ compiler which create the default
  'operator=' even when an 'operator=' which takes its argument by value has been
  defined. This causes assignments to be ambiguous. To work around this, I'm
  removing the definitions on those compilers - breaking move assignment, but
  allowing other assignments to work.
  
  I'm using 0x0593 because that's the earliest compiler that I've seen do the
  right thing, but it might also work on earlier 5.9.x versions.
........

Properties modified:
   branches/unordered/trunk/ (props changed)
Text files modified:
   branches/unordered/trunk/boost/unordered/detail/config.hpp | 3 ++-
   branches/unordered/trunk/boost/unordered_map.hpp | 4 ++++
   branches/unordered/trunk/boost/unordered_set.hpp | 4 ++++
   3 files changed, 10 insertions(+), 1 deletions(-)

Modified: branches/unordered/trunk/boost/unordered/detail/config.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered/detail/config.hpp (original)
+++ branches/unordered/trunk/boost/unordered/detail/config.hpp 2008-05-20 11:38:57 EDT (Tue, 20 May 2008)
@@ -14,7 +14,8 @@
     (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
 # define BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN
 #elif BOOST_WORKAROUND(BOOST_INTEL, < 900) || \
- BOOST_WORKAROUND(__EDG_VERSION__, < 304)
+ BOOST_WORKAROUND(__EDG_VERSION__, < 304) || \
+ BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0593))
 # define BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN
 #endif
 

Modified: branches/unordered/trunk/boost/unordered_map.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered_map.hpp (original)
+++ branches/unordered/trunk/boost/unordered_map.hpp 2008-05-20 11:38:57 EDT (Tue, 20 May 2008)
@@ -126,12 +126,14 @@
         {
         }
 
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
         unordered_map& operator=(unordered_map x)
         {
             base.move(x.base);
             return *this;
         }
 #endif
+#endif
 
     private:
 
@@ -509,12 +511,14 @@
         {
         }
 
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
         unordered_multimap& operator=(unordered_multimap x)
         {
             base.move(x.base);
             return *this;
         }
 #endif
+#endif
 
 
     private:

Modified: branches/unordered/trunk/boost/unordered_set.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered_set.hpp (original)
+++ branches/unordered/trunk/boost/unordered_set.hpp 2008-05-20 11:38:57 EDT (Tue, 20 May 2008)
@@ -123,12 +123,14 @@
         {
         }
 
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
         unordered_set& operator=(unordered_set x)
         {
             base.move(x.base);
             return *this;
         }
 #endif
+#endif
 
     private:
 
@@ -478,12 +480,14 @@
         {
         }
 
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
         unordered_multiset& operator=(unordered_multiset x)
         {
             base.move(x.base);
             return *this;
         }
 #endif
+#endif
 
     private:
 


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