Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range] invalid initialization of non-const type with adaptors
From: Neil Groves (neil_at_[hidden])
Date: 2010-05-10 10:41:56


On Mon, May 10, 2010 at 2:51 PM, Thorsten Ottosen <nesotto_at_[hidden]> wrote:

> Thorsten Ottosen skrev:
>
>
> Also, I don't see any reason why a const T& overload of boost::fill cannot
>> exists as long as the const-iterator is actually a mutable iterator (like
>> with iterator_range<MutableRange>).
>>
>
> Also note that in a world with perfect forwarding, we shuold probably
> specify fill() like
>
> template< class Rng >
> void fill( Rng&& rng, range_value<Rng>::type x );
>
>
Wouldn't this stop fill from working on ranges of abstract types?

I like the idea of taking advantage of perfect forwarding where available.

>
> -Thorsten
>

Regards,
Neil Groves



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