Boost logo

Boost Users :

From: Pavol Droba (droba_at_[hidden])
Date: 2006-08-02 06:41:29


llwaeva_at_[hidden] wrote:
> Hi there,
> I am using in-place replacement with replace_all_regex
>
> replace_all_regex( source, boost::regex("(%f)"), "(?1 xxx)", format_all);
>
> where source is of type std::string. But for some reason, I need to perform replacement on a
> C-string (char *), is replace_all_regex safe to do so? Will replace_all_regex handle memory
> issue for us?

You cannot do this, since char* is not a sequence. In other words, it
cannot be safely constructed.

Regards,
Pavol


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