Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-08 19:34:50


I'm trying to work around a very specific problem in the Dinkumware
libraries that ship with MSVC6 and 7: iterators do not define fully
symmetric const/non-const interoperability. So for example, the
following won't compile:

  deque<int> d;
  bool x = d.begin() == ((deque<int> const&)d).begin();

To detect this case, I'm using something like:

  #if !defined(BOOST_MSVC_STD_ITERATOR) && (!defined(_CPPLIB_VER) || _CPPLIB_VER > 310)

But it really seems as though there should be a better way.

  #if !defined(_YVALS) || _CPPLIB_VER > 310

is simpler, but somehow unsatisfying. It seems as though _YVALS could
go away at any moment. Can/should we add something to the config, like

                       David Abrahams
   dave_at_[hidden] *
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at, gregod at, cpdaniel at, john at