fixed bug in assignment operator under VC++, which was the cause of

the access violation error in graph/test/graph.cpp. The root
  of this bug is in compressed pair, which VC++ has a hard time
  generating a correct operator= for.


[SVN r8767]
This commit is contained in:
Jeremy Siek
2001-01-25 04:57:16 +00:00
parent 58b56fbabb
commit 8f41e88f85

View File

@ -333,6 +333,14 @@ public:
policies().initialize(iter()); policies().initialize(iter());
} }
#ifdef BOOST_MSVC
// This is required to prevent a bug in how VC++ generates
// the assignment operator for compressed_pair.
iterator_adaptor& operator= (const iterator_adaptor& x) {
m_iter_p = x.m_iter_p;
return *this;
}
#endif
reference operator*() const { reference operator*() const {
return policies().dereference(type<reference>(), iter()); return policies().dereference(type<reference>(), iter());
} }