Boost logo

Boost Users :

Subject: Re: [Boost-users] Assign V2 - first impression
From: er (er.ci.2020_at_[hidden])
Date: 2011-06-24 13:34:23


Copied from devel:

On 6/24/11 1:30 PM, er wrote:
> On 6/24/11 9:08 AM, Stewart, Robert wrote:
>> er wrote:
>>>
>>>> I am sure that it is a powerful library, but I really have no
>>>> idea at all what is going on. I can't even parse the first
>>>> line as valid C++ in any way. You need better examples, and
>>>> also is that really the best way you could find to express
>>>> repeating?
>>>
>>> If I try to imagine what the interface would look like after
>>> taking into account some of the suggestions that were made, this
>>> sentence:
>>>
>>> "Create data elements by mapping 1, 10, 100, 1000 by function
>>> f, and insert each result in cont by invoking modifier
>>> push_front."
>>
>> If I interpret that correctly, it would be clearer as:
>>
>> "Create elements in cont, using push_front(), by calling f() 1, 10,
>> 100, and 1000 times."
>>
>
> Apologies, I misread this. It should be :
>
> Map 1, 10, 100, and 1000 by function f,
> which yields f( 1 ), f( 10 ), f( 100 ), f( 1000 )
> and insert each, n times, using push_front, in cont.
>
> T x;
>
> x = f( 1 );
> for(int i = 0; i < n; i++){
> cont.push_front( x );
> }
>
> x = f( 10 );
> for(int i = 0; i < n; i++){
> cont.push_front( x );
> }
>
> etc.
>
> The meaning of what is said next, I think, is not altered.
>


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