#include <bits/regex_executor.h>
#if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI
-#include <memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
- namespace pmr {
+ namespace pmr
+ {
template<typename _Tp> class polymorphic_allocator;
template<typename _BidirectionalIterator>
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*>;
+ // Use __normal_iterator directly, because pmr::string::const_iterator
+ // would require pmr::polymorphic_allocator to be complete.
+ 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