|
Boost Users : |
From: MB (mb2act_at_[hidden])
Date: 2005-12-10 19:07:39
Victor A. Wagner Jr. wrote:
> At 16:18 2005-12-08, you wrote:
>
>>Victor A. Wagner Jr. wrote:
>>
>>
>>>>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)
>>
>>was there any difference in the compiler there? Is it still operator= in
>>iterator_range that gets called?
>
>
> yes, vs2005 has the vc8.0 compiler... I'll repost the program AND the errors...
> http://www.noidea128.org/sourcefiles/15688~
> that souce is already trying to call SNway_merge and shows 2 errors.
>
>
>
>>-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"
Add:
sub_range(const sub_range& r) :
base(static_cast<const base&>(r))
{ }
sub_range& operator=(const sub_range& r)
{
base::operator=(static_cast<const base&>(r));
return *this;
}
If 'static_cast's are missing, VC8 calls "constructor template" of 'iterator_range'.
Though I don't know the reason, this codes are safe.
Regards,
MB
http://p-stade.sourceforge.net/
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