
31 Aug
2006
31 Aug
'06
2:34 p.m.
Hello, When we look at the following declaration : template<typename SequenceSequenceT, typename RangeT, typename PredicateT> SequenceSequenceT& split(SequenceSequenceT & Result, RangeT & Input, PredicateT Pred, token_compress_mode_type eCompress = token_compress_off); Anyone knows why split() takes the input type by reference and not by const reference ? The current design prevents, say, passing a temporary string to split which is imho something not convenient. I'd want to be able to do code like : string input = "/foo/bar"; vector<string> tokens; split(tokens, input.substr(1), token_compress_off); Thank you for your answers. Philippe