Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2008-01-09 07:18:45


David Rodríguez Ibeas wrote:
> On Sep 27, 2007 5:31 PM, Joseph Gauterin <joseph.gauterin_at_[hidden]>
> wrote:
>
> While this is a problem that I don't know if has a solution, an alternative
> replace can be implemented in the library that performs in linear time by
> constructing a new string copying values an replacing on the same iteration.
> Could std::replace() be disabled somehow?? (SFINAE??)
>
It ought to be possible to overload it and, if the string is not part of
std, have the overloaded version be picked up with ADL. Only if
replace() isn't explicitly qualified, of course, which is a problem.
But I think immutable strings are the way forward anyway.

Sebastian Redl


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