https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97876
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Target Milestone|--- |10.3 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org --- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- Backporting that to gcc-10 would break any code implicitly relying on <condition_variable> being included by <regex>. I generally only do such header dependency changes for major releases. Maybe it's OK, as it's only included for C++17 mode, which isn't considered stable for gcc-10. Separately, <regex> shouldn't need <memory_resource> when it already declares polymorphic allocator (which is sufficient for <string> and <vector> and the other headers with alias templates in std::pmr). It needs it because pmr::string::const_iterator and pmr::wstring::const_iterator require string and wstring to be complete, which requires polymorphic_allocator to be complete. That's avoidable though: --- a/libstdc++-v3/include/std/regex +++ b/libstdc++-v3/include/std/regex @@ -64,7 +64,6 @@ #include <bits/regex_executor.h> #if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI -#include <memory_resource> namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -74,11 +73,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using match_results = std::match_results<_BidirectionalIterator, polymorphic_allocator< sub_match<_BidirectionalIterator>>>; - using cmatch = match_results<const char*>; - using smatch = match_results<string::const_iterator>; + using cmatch = match_results<const char*>; + using smatch + = match_results<__gnu_cxx::__normal_iterator<const char*, string>>; #ifdef _GLIBCXX_USE_WCHAR_T using wcmatch = match_results<const wchar_t*>; - using wsmatch = match_results<wstring::const_iterator>; + using wsmatch + = match_results<__gnu_cxx::__normal_iterator<const wchar_t*, wstring>>; #endif } // namespace pmr _GLIBCXX_END_NAMESPACE_VERSION I think removing that dependency in the gcc-10 branch should be OK too.