mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
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:
@ -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:
|
||||
|
Reference in New Issue
Block a user