Boost logo

Boost :

From: Olaf van der Spek (olafvdspek_at_[hidden])
Date: 2006-03-27 07:53:41


On 3/15/06, Olaf van der Spek <olafvdspek_at_[hidden]> 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?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk