[Bug libstdc++/92546] [10/11 Regression] Large increase in preprocessed file sizes in C++2a mode
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 20 13:49:17 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92546
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:cbbc28706164873d0323d1a6c7988be3f4d971c9
commit r10-9057-gcbbc28706164873d0323d1a6c7988be3f4d971c9
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Nov 20 11:30:33 2020 +0000
libstdc++: Remove <memory_resource> dependency from <regex> [PR 92546]
Unlike the other headers that declare alias templates in namespace pmr,
<regex> includes <memory_resource>. That was done because the
pmr::string::const_iterator typedef requires pmr::string to be complete,
which requires pmr::polymorphic_allocator<char> to be complete.
By using __normal_iterator<const char*, pmr::string> instead of the
const_iterator typedef we can avoid the completeness requirement.
This makes <regex> smaller, by not requiring <memory_resource> and its
<shared_mutex> dependency, which depends on <chrono>. Backporting this
will also help with PR 97876, where <stop_token> ends up being needed by
<regex> via <memory_resource>.
libstdc++-v3/ChangeLog:
PR libstdc++/92546
* include/std/regex (pmr::smatch, pmr::wsmatch): Declare using
underlying __normal_iterator type, not nested typedef
basic_string::const_iterator.
(cherry picked from commit 640ebeb336050887cb57417b7568279c588088f0)
More information about the Gcc-bugs
mailing list