
2011/6/24 Olaf van der Spek <ml@vdspek.org>:
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 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
You're correct on both accounts, I've fixed it and added a ticket to trac where hopefully one of the maintainers can take a closer look: https://svn.boost.org/trac/boost/ticket/5651 . Kind regards, Sebastian Karlsson