|
Boost Users : |
Subject: Re: [Boost-users] [Range] invalid initialization of non-const type with adaptors
From: Denis Taniguchi (taniguchi_at_[hidden])
Date: 2010-05-10 10:45:41
On Mon, 2010-05-10 at 15:35 +0100, Neil Groves wrote:
> On Mon, May 10, 2010 at 2:24 PM, Mathias Gaunard
> <mathias.gaunard_at_[hidden]> wrote:
> Neil Groves wrote:
>
> This can't easily be remedied since the Range Concept
> is non-copyable, and we obviously can't pass a const
> reference as the target to the fill algorithm. Making
> the Range Concept cheaply copyable would mean that the
> standard containers were no longer a model of the
> Range Concepts. I am currently investigating extending
> the sub_range
>
>
> It should be perfectly ok to make iterator_range and sub_range
> cheaply copyable, since they just wrap iterators.
> No need to extend the range concepts for that; iterator_range
> would simply provide more than those concepts.
>
>
>
>
>
> The rationale for providing new concepts that extend the sub_range is
> that we can then implement new containers and new algorithms in terms
> of concepts similar to those that Alexandrescu describes.
>
>
> As you have suggested this is actually a very simple extension to
> sub-range and allows efficient interoperability between iterator
> ranges and Alexandrescu style ranges. I'm finding this to be very nice
> when implementing ranges that do not map well to iterators, such as an
> unbounded integer range.
>
>
> I'm in the very early stages of exploring these ideas.
>
Looking forward to see it in next revisions of boost.
Thank you all for the replies, and I'll try to post more meaningful
examples next time.
Regards
>
> Regards,
> Neil Groves
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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