Opened 11 years ago
Last modified 11 years ago
#5651 new Patches
Improvements to to_[lower/upper]_copy
| Reported by: | Owned by: | Marshall Clow | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | algorithm |
| Version: | Boost 1.46.1 | Severity: | Optimization |
| Keywords: | Cc: |
Description
to_[lower/upper]_copy implicitly deduces the return type from the input type unless you supply the output as a second parameter. This is not always possible, consider for example: const std::string example = to_lower_copy< std::string >("foo") + to_upper_copy< std::string >("bar"); . To achieve the same we currently need to construct an additional unnecessary temporary which only purpose is to inform the algorithm of the return type. The attached case_conv.hpp introduces 1 new overload for each variant which shouldn't break any existing code. Discussion can be found at: http://lists.boost.org/Archives/boost/2011/06/183031.php .
Attachments (1)
Change History (2)
by , 11 years ago
| Attachment: | case_conv.hpp added |
|---|
comment:1 by , 11 years ago
| Component: | string_algo → algorithm |
|---|---|
| Owner: | changed from to |

Modified for 2 new overloads