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.

Refs #1923.



[SVN r45573]
This commit is contained in:
Daniel James
2008-05-20 15:13:57 +00:00
parent 00737cbc26
commit 18e46ae624
2 changed files with 8 additions and 0 deletions

View File

@ -126,11 +126,13 @@ namespace boost
{
}
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
unordered_map& operator=(unordered_map x)
{
base.move(x.base);
return *this;
}
#endif
#endif
private:
@ -509,12 +511,14 @@ namespace boost
{
}
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
unordered_multimap& operator=(unordered_multimap x)
{
base.move(x.base);
return *this;
}
#endif
#endif
private:

View File

@ -123,11 +123,13 @@ namespace boost
{
}
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
unordered_set& operator=(unordered_set x)
{
base.move(x.base);
return *this;
}
#endif
#endif
private:
@ -478,11 +480,13 @@ namespace boost
{
}
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
unordered_multiset& operator=(unordered_multiset x)
{
base.move(x.base);
return *this;
}
#endif
#endif
private: