
John Torjo <john.lists@torjo.com> 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