Boost logo

Boost :

Subject: Re: [boost] [range] Should ranges really propagate constess to the data ?
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-07-23 11:13:05

on Fri Jul 22 2011, Samuel Debionne <> wrote:

> Hello everyone,
> Here is an example code that motivates my question :


Well, if we want something like std::vector to be a Range, then we have
to accept that at least *some* Ranges do propagate constness. And I'm
pretty sure that we don't want other Ranges (std::pair<char*,char*>) to
propagate constness. So unless the documentation says otherwise, I
would assume that the concept doesn't say anything about whether
constness is propagated. If you want to write generic Range code you
have to account for both cases.

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at