|
Boost : |
Subject: Re: [boost] for_each abstraction
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-11-17 16:05:17
----- Original Message -----
From: "Jeffrey Lee Hellrung, Jr." <jhellrung_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, November 17, 2010 9:58 PM
Subject: Re: [boost] for_each abstraction
> I was imagining something slightly different, where the for_each
> functions are more tightly coupled to the sequence types. In other
> words, std::vector and thrust::device_vector both have a for_each member
> function (or maybe a less intrusive for_each free function found, for
> example, via ADL):
>
> std::vector< double > vec1;
> vec1.for_each(op());
> thrust::device_vector< double > vec2;
> vec2.for_each(op());
Please, don't add algorithms in the containers.
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk