$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: John Torjo (john.lists_at_[hidden])
Date: 2004-11-01 14:35:59
Neal D. Becker wrote:
> I'm always writing (e.g.)
> 
> std::vector<double> out (size);
> std::transform (in.begin(), in.end(), out.begin(), func);
> 
> Wouldn't it be nice to have versions of the std algorithms that worked like:
> 
> template<typename out_cont_t, typename in_cont_t, typename UnaryOperation>
> inline out_cont_t transform_r (const in_cont_t& in, UnaryOperation u) {
>   out_cont_t out (boost::size (in));
>   std::transform (boost::begin (in), boost::end (in), boost::begin (out),
> u);
>   return out;
> }
> 
The RangeLib does just that. An article will appear on CUJ Dec' 04.
http://www.torjo.com/rangelib/
I should be able to generate some documentation by early next week. 
Until then, you can contact me privately - if you have questions.
Best,
John
-- 
John Torjo,    Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
-- http://www.torjo.com/win32gui/
-- v1.5 - tooltips at your fingertips (work for menus too!)
    + bitmap buttons (work for MessageBox too!)
    + tab dialogs, hyper links, lite html