Christopher Smith on 14 Oct 2003 08:10:12 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [ALACPP] where the boost meets the stl


On Mon, 2003-10-13 at 23:27, Jon Stewart wrote:
> Namely, it fills the vector with the numbers 1..20.
> 
> My question is, how can you do the same thing with std::fill_n, given its 
> prototype:
> 
> 	template<class OutIt, class Size, class T>
> 	void fill_n(OutIt first, Size n, const T& x);

Umm... you don't. I think I don't understand the question. generate &
fill are meant to do different things. The way fill works,
operator()=(x) is going to be invoked from first to (first + n). Not
much wiggle room there for built in types.

I'm guessing I'm missing what you're trying to do here.

-- 
Christopher Smith <x@xxxxxxxx>
_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp