[range] iterator_range::operator[] broken

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. -- Eric Niebler BoostPro Computing http://www.boostpro.com

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

AMDG Eric Niebler wrote:
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?
Why are you using std::vector<int>::iterator, instead of std::vector<std::pair<int, int> >::iterator? Regardless, it probably shouldn't be using operator_brackets_proxy when dealing with a real reference. In Christ, Steven Watanabe

On 4/13/2010 8:03 PM, Steven Watanabe wrote:
AMDG
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.
Whoa. Why is this only returning a real reference for pointers?
Yeah, I dunno. It's this way on the release branch, too. It's very, very seriously broken. I think we need to revert range on the release branch to the 1.42 version, and fast. Neil? -- Eric Niebler BoostPro Computing http://www.boostpro.com
participants (2)
-
Eric Niebler
-
Steven Watanabe