http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53561
Bug #: 53561 Summary: [c++0x] regex_replace is missing overloads Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: l...@mit.edu [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.