Opened 12 years ago
Closed 12 years ago
#4262 closed Patches (wontfix)
Inconsistency between boost::algorithm::trim_copy_if and trim_copy?
| Reported by: | mstefanro | Owned by: | Pavol Droba |
|---|---|---|---|
| Milestone: | Boost 1.43.0 | Component: | string_algo |
| Version: | Boost 1.44.0 | Severity: | Cosmetic |
| Keywords: | trim_copy_if trim_copy | Cc: |
Description
Is there any reason why boost::algorithm::trim_copy_if supports an overloaded version which takes an output iterator as the first parameter, whereas boost::algorithm::trim_copy does not? Note that this is also the case for trim_copy_left and trim_copy_right.
Attached is a quick patch for boost\algorithm\string\trim.hpp to fix this issue.
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Thanks for the quick reply, and sorry for the double post.
Yours,
Stefan
comment:3 by , 12 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Hi, The reason is purely cosmetic. The list of possible function combination is very large, so some common sense needs to be applied to filter out the really useful ones. The library is crowded already.
Therefore the variant that you mention was left out. It is so easy to achieve (just provide boost::is_space() as last argument) and I dare to say that it is not used that frequently to have this variant in the boost directly.
Regards, Pavol