Boost logo

Boost :

From: MB (mb2act_at_[hidden])
Date: 2005-11-29 14:28:02

Hi, gurus,

If boost iterators are passed to 'std::equal' of VC++7.1,
the 'std::equal' calls 'non-qualified' 'mismatch' and
the unintentional ADLookup to 'namespace boost'
finds incorrectly 'boost::mismatch' of range_ex.

error C2039:
  'const_iterator' : is not a member of 'boost::counting_iterator<Incrementable>'
  // He views iterator as range.

  #include <algorithm>
  #include <vector>
  #include <boost/iterator/counting_iterator.hpp>
  #include <boost/range_ex/algorithm.hpp> // greetings.

  int main()
    std::vector<int> vec;

      boost::counting_iterator<int>(10), vec.begin());
    return 0;

The workaround is something like:

  namespace boost_range_ex_unspecified {
    // many range algorithms here
    // ...

  namespace boost {
    using namespace boost_range_ex_unspecified;


Yahoo! JAPAN Redribbon Campaign 2005

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