mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-20 16:12:10 +02:00
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:
@ -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());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user