Boost logo

Boost :

Subject: Re: [boost] Is there any interest in Boost.Conversion?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-05-29 07:53:27


----- Original Message -----
From: "Emil Dotchevski" <emil_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, May 29, 2010 6:16 AM
Subject: Re: [boost] Is there any interest in Boost.Conversion?

On Fri, May 28, 2010 at 2:55 PM, vicente.botet <vicente.botet_at_[hidden]> wrote:
> ----- Original Message -----
> From: "Emil Dotchevski" <emil_at_[hidden]>
> What's wrong with
>
> std::vector<A1> va2;
> std::transform(vb2.begin(),vb2.end(),std::inserter(va2,va2.end()),bind(convert_to<A1>,_1));
>
> _______________________________________________
>
> Nothing. I find the expression longer, useing of iterators, inserters, binds, a place holder .... While the other uses just a function :)

The user can wrap the iterators and inserters in a function, and then
it'd be just a function too. That is, if they care; personally I
wouldn't bother.

_______________________________________________

The idea is to name the function in a uniform way so generic algorithms can use it.

Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk