|
Boost : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-10-19 15:00:43
> I looked at the library and I think it should be accepted. I have one
> big concern, though, which IMHO must be addressed:
> * The default should be copying algorithms, not modifying algorithms!
> When I write to_upper( str ), a copy of str should be returned. This is
> important as most users IMHO expect this. Maybe some other syntax for
> the modifying version can be found. Some ideas:
>
> to_upper_inplace( str ); // easy
>
> or
>
> apply( to_upper, str );
May we define trim so that:
std::string res = trim( orig );
generate copying algorithm, while
trim( orig ) generate in place modifying one?
Gennadiy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk