[re.alg.replace] says: template <class traits, class charT, class ST, class SA> basic_string<charT, ST, SA> regex_replace(const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, const charT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); This doesn't compile, though: #include <string> #include <regex> int main() { std::regex_replace<std::regex_traits<char>, char>(std::string("x"), std::regex("x"), "y"); // works std::regex_replace(std::string("x"), std::regex("x"), "y"); // fails return 0; } The string,regex,string,flags overload doesn't work because the arguments aren't an exact match.
Never mind. I just saw that the implementation isn't supposed to be done.
(In reply to comment #1) > Never mind. I just saw that the implementation isn't supposed to be done. The documentation still mentions that regex_replace is not yet implemented: /** @todo Implement this function. */ Any ideas when we can start using it? Matthias
When someone contributes an implementation of it.
. *** This bug has been marked as a duplicate of bug 53631 ***