Boost logo

Boost Users :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2005-12-08 14:22:04


At 14:15 2005-12-07, Thorsten Ottosen wrote:
>Victor A. Wagner Jr. wrote:
>
> >> Seems to me that sub_range is a convenience class to describe
>iterator ranges from ranges or containers that model ForwardRange, from
>which you can propagate constness.
> >
> >
> >
> > yup, that's what I thought also
>
>
>It seems that the problem was caused by the fact that the vc71
>generates default operators a bit wierd.
> The copy-constructor is default generated and so does simply copy the
>iterators. It seems that the default generated constructor/ assignment
>for sub_range calls a templated version of iterator_range's
>construcgtor/ assignment operator
>
>I think this might be a bug in the compiler.
>
>I've added the following overload
>
>
> sub_range& operator=( sub_range r )
> {
> //
> // argument passed by value to avoid
> // const_iterator to iterator conversion
> //
> base::operator=( r );
> return *this;
> }
>
>and can now compile your program.
>
>I've also committed this to the main cvs.

yes, it compiles, and runs on vc7.1
it does NOT compile on vs8.0 (which is currently my default compiler)

>-Thorsten
>
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users

Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law"


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net