Boost logo

Boost Users :

From: Kobi Cohen-Arazi (kobi.cohenarazi_at_[hidden])
Date: 2006-04-27 13:19:40


Just to make sure I wrote it right. My Foo::get is

const std::string& Foo::get () cosnt {...}

So it is a const func and it returns const &, so I can't see a way that
string::replace may alter that string without having any kind of trick
(wrapper func etc ...) but tell me what you think about that.

Kobi.

On 4/27/06, Sebastian Redl <sebastian.redl_at_[hidden]> wrote:
>
> Kobi Cohen-Arazi wrote:
>
> > There is no way to use directly the std::string::replace since get()
> > is const member function.
>
> Um, no, I don't think get's const-ness has anything to do with it. I
> still think it's an ambiguity problem.
>
> > We do need a replace wrapper, which unfortunately creating std::string
> > instances.
>
> Have you tried the member function pointer approach I showed?
>
> Sebastian
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net