
On Thu, Jun 23, 2011 at 9:47 PM, Sebastian Karlsson <sairony@gmail.com> wrote:
Seems to be easier than I anticipated, just add output type as a param and slap it in as the return type for transform_range_copy, like so:
template<typename SequenceT, typename OutputT > inline SequenceT to_lower_copy(
Shouldn't the return type be OutputT?
const SequenceT& Input, const std::locale& Loc=std::locale()) { return ::boost::algorithm::detail::transform_range_copy< OutputT >( Input, ::boost::algorithm::detail::to_lowerF< typename range_value<SequenceT>::type >(Loc)); }
Seems to work with the little testing I've been able to do so far.
I'm not sure if C++ allows this, but SequenceT can be deduced while OutputT can not. Shouldn't OutputT therefore come first in the template list so that SequenceT can be deduced? Olaf