
Le 25/07/2011 21:38, Dave Abrahams a écrit :
If the Range concept said that views must not propagate constness, that would be one thing... but it doesn't, does it?
Thank you all for clarifying this. Like Mathias, I have the feeling that Views should not propagate constness, but as I understand it now, Views are only a special case (refinement ?) of Ranges. Maybe there is room for a View concept that will be more specific about constness propagatation ? I suggest two improvements in the documentation : 1. In the Range Concept Overview, add a note about constness propagation. Something along "the concept doesn't say anything about whether constness is propagated to the data. If you want to write generic Range code you have to account for both cases." 2. In the subrange, make the sentence "the sub_range class do propagate constness since it knows what a corresponding const_iterator is" bring out as an important admonition since it is an unexpected behaviour. Samuel