Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5027: Extension of Boost.Range algorithms
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-01-03 18:56:19
#5027: Extension of Boost.Range algorithms
--------------------------------------------+-------------------------------
Reporter: gast128 <gast128@â¦> | Owner: marshall
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: range
Version: Boost 1.45.0 | Severity: Not Applicable
Resolution: | Keywords:
--------------------------------------------+-------------------------------
Comment (by gast128 <gast128@â¦>):
Ah yes I read about it but didn't think of it. It could be then:
std::vector<Base> vec;
std::vector<Base> vec2;
boost::copy(vec | boost::adaptors::filtered(boost::bind(&Base::Get, _1) ==
2), std::back_inserter(vec2));
Traditionally it would be then:
std::copy_if(vec, std::back_inserter(vec2), boost::bind(&Base::Get, _1) ==
2));
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5027#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC