Boost logo

Boost :

Subject: Re: [boost] [range] iterator_range::operator[] broken
From: Eric Niebler (eric_at_[hidden])
Date: 2010-04-13 22:08:12


On 4/13/2010 6:53 PM, Eric Niebler wrote:
> Neil, I know you patched this a mere 5 hours ago, but it's still broken.
> The attached patch *really* fixes the problem, I think.

Hrm, that patch helped, but it doesn't fix everything. For instance, I
can't do this anymore:

  #include <utility>
  #include <vector>
  #include <boost/range/iterator_range.hpp>

  int main()
  {
    std::pair<int,int> p(1,1);
    std::vector<std::pair<int,int> > v(2,p);
    boost::iterator_range<std::vector<int>::iterator> r(v.begin(), v.end());
    r[0].first; // ERROR
  }

I get the following error:

  1>c:\boost\org\trunk\libs\proto\scratch\main.cpp(10) : error C2039:
'first' : is not a member of
'boost::detail::operator_brackets_proxy<Iterator>'

This is breaking Boost.Accumulators. Can you look into it?

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk