libstdc++: Make filesystem::path(path&&) always noexcept
authorJonathan Wakely <jwakely@redhat.com>
Thu, 14 Oct 2021 12:58:02 +0000 (13:58 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 14 Oct 2021 21:19:38 +0000 (22:19 +0100)
commit373acac1c8f2d64409ccea6aea409a0e15e80a6a
tree03c50439903eadb18815e205c41e79c6a36b1ab6
parent04a9b8d2f38573d0527edeea9e4fd9b7dfdc7983
libstdc++: Make filesystem::path(path&&) always noexcept

Since r12-4065 std::basic_string is always nothrow-move-constructible,
so filesystem::path is too.

That also means that path::_S_convert(T) is noexcept when returning its
argument, because T is either a basci_string or basic_string_view, and
will be moved into the return value.

libstdc++-v3/ChangeLog:

* include/bits/fs_path.h (path(path&&)): Make unconditionally
noexcept.
(path::_S_convert(T)): Add condtional noexcept.
libstdc++-v3/include/bits/fs_path.h