libstdc++: Define function to throw filesystem_error [PR 98471]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 14 Jan 2021 14:26:19 +0000 (14:26 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 14 Jan 2021 16:26:30 +0000 (16:26 +0000)
commit57a4f5e4eacfbbbd0ca5f1e3f946c27d63e2b533
treef30f17d0467bcde9a963eb8537742daceb4ee094
parentaa3d33dccb57621b2ab2029dce79208c0c9392c1
libstdc++: Define function to throw filesystem_error [PR 98471]

Fix ordering problem on Windows targets where filesystem_error was used
before being defined.

libstdc++-v3/ChangeLog:

PR libstdc++/98471
* include/bits/fs_path.h (__throw_conversion_error): New
function to throw or abort on character conversion errors.
(__wstr_from_utf8): Move definition after filesystem_error has
been defined. Use __throw_conversion_error.
(path::_S_convert<_EcharT>): Use __throw_conversion_error.
(path::_S_str_convert<_CharT, _Traits, _Allocator>): Likewise.
(path::u8string): Likewise.
libstdc++-v3/include/bits/fs_path.h