Starting from C++11 the <regex> headers defines the functions std::regex_match, std::regex_search and std::regex_replace in §28.11. I guess there is a valid reason for these functions not to be noexcept, but I couldn't find any reference about what these might throw or why.
- What types of exceptions may these functions throw?
- What runtime conditions cause these exceptions to be thrown?
- Does the standard ensure that for some sets of arguments these functions never throw, e.g. does it ensure that
regex_match(anyString, regex("."))never throws?
- Does the standard ensure that for some sets of arguments these functions never throw, e.g. does it ensure that
PS: Since some of these exceptions probably inherit from std::runtime_error, they might throw std::bad_alloc during their construction.