https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105915
Bug ID: 105915 Summary: commit 42eff613 should be backported to gcc-11 for bits/fs_path.h consistency Product: gcc Version: 11.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: heroxbd at sohu dot com Target Milestone: --- Hi, comments 42eff613d0 is followed by 944da70a5d to add 'noexcept' to path::iterator members. But in the gcc-11.3.0 release, only 944da70a5d was applied. With a MWE of ```c++ #include <experimental/filesystem> int main(){} ``` would produce ``` /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.1/include/g++-v11/experimental/bits/fs_path.h:1209:9: error: 'begin' is missing exception specification 'noexcept' path::begin() const ^ /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.1/include/g++-v11/experimental/bits/fs_path.h:428:14: note: previous declaration is here iterator begin() const noexcept; ^ ``` on a Gentoo system. After applying 42eff613d0 to gcc-11.3.0, the bug disappears. Please see also: 1. https://bugs.gentoo.org/842405 2. https://github.com/gentoo/gentoo/pull/25313