
27 Mar
2006
27 Mar
'06
12:53 p.m.
On 3/15/06, Olaf van der Spek <olafvdspek@gmail.com> wrote:
This is because f() is returning a std::string and this is being passed to the RangeT & argument in the split function. Due to C++ rules, performing the T -> T & conversion is invalid. Try defining f() as:
const std::string f() { return ""; }
Thanks, that did the trick. I understand T -> T& isn't valid (although I don't like that), but why doesn't it automatically do T -> const T&?
Pavol?