|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-11-08 07:01:23
John Torjo <john.lists_at_[hidden]> writes:
> And it provides for range adaptors, allowing for composition.
>
> bool from_ro(const employee & e) { return e.country == "Romania"; }
> std::string get_empl_name(const employee &e) { return e.name; }
>
> typedef std::vector<employee> array;
> array empls;
>
> // take all employees from Romania, and print their names
> rng::copy( transformed( filtered(empls,from_ro), get_empl_name),
> std::ostream_iterator<std::string>(std::cout," "));
>
>
> Changes in this version:
> - improved algorithms.hpp (no more use of macros)
> - solved small bugs
> - added documentation
>
> Download it from here:
> http://www.torjo.com/rangelib/
Have you thought about compatibility and integration with fusion?
http://www.boost-consulting.com/boost/libs/spirit/fusion/readme.txt
or
libs/spirit/fusion/readme.txt
in your Boost tree.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk