Boost logo

Boost Users :

From: MB (mb2act_at_[hidden])
Date: 2005-12-09 18:11:34


Thorsten Ottosen wrote:
>>>I think this might be a bug in the compiler.
>>
>>
>>I thought it was intentional.
>>See:
>>
>>void test()
>>{
>> std::string str;
>>
>> // hey, const sub_range.
>> const boost::sub_range<std::string> rng1(str);
>>
>> // whether or not to allow...?
>> boost::sub_range<std::string> rng2 = rng1;
>>}
>>
>>I don't know the answer for sure.
>
>
> Can you assing a const vector<T> to a mutable vector<T>?

Hmm, yes. (though I think it is not the property of range.)
I believed it was your intention, because a trivial assignment fails
like Victor's example under VC++7.1.
I must change the recognition of sub_range.

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