Boost logo

Boost Users :

Subject: Re: [Boost-users] [mini-review] Update of Boost.Assign (13th-19th of June)
From: Diederick C. Niehorster (dcnieho_at_[hidden])
Date: 2010-06-16 22:36:46


Hi er,

On Thu, Jun 17, 2010 at 1:54 AM, er <erwann.rogard_at_[hidden]> wrote:
> Christopher Jefferson wrote:
>>
>> While independant of this change, I believe Boost.Assign may be ideally
>> suited to use variadic templates. I am already making use of a variadic
>> push_back and container construction, like:
>>
>> push_back(v,1,2,3,4);
>>
>
> As of now, the closest match, as you probably know, is:
>
>    #include <boost/assign/list_inserter.hpp>
>    push_back(v)(1)(2)(3)(4);
>
>
> With a view to promote separation of responsibility between different
> functions, perhaps we may (also) consider a new function :
>
>   push_back_range(const V&,const R&);
>
> This would tie in with the proposed extension like this:
>
>   push_back_range(v,cref_csv(1,2,3,4));

I'd personally be very happy with that functionality and syntax. I
assume performance-wise this is not much different from a standard
.push_back of each entry seperately?

Best,
Dee


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