0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

31.12 File systems [filesystems] C++N4910:2022 (695) p1577.cpp

Posted at

エンジニア夏休み企画

個人開発と読書感想文に焦点を当てたのは良い企画だと思った。

<この項は書きかけです。順次追記します。>

読書感想文

CコンパイラによるC言語規格の読書感想文として掲載しています。

コンパイル実験が、C++N4910に対する、G++とClang++による感想文だということご理解いただけると幸いです。

読書感想文は人間かAIだけが作るものとは限りません。
本(電子書籍を含む)を入力として、その内容に対する文字列を読書感想文として受け止めましょう。
元の文章をあり方、コンパイルできるように電子化しておくこと、コンパイラが解釈可能な断片の作り方など。

個人開発

【個人開発】 効率的な背景 <エンジニア夏休み企画>

Cコンパイラの試験を一人でもくもくとやっているのは個人開発の一つの姿です。

箱庭

箱庭もくもく会 #10 日時:2022/09/14(水) 17:30-19:30

はじめに(Introduction)

N4910 Working Draft, Standard for Programming Language C++

C++ n4910は、ISO/IEC JTC1 SC22 WG21の作業原案(Working Draft)です。
公式のISO/IEC 14882原本ではありません。
ISO/IEC JTC1 SC22 のWG21を含むいくつかのWGでは、可能な限り作業文書を公開し、幅広い意見を求めています。

ISO/IEC JTC1 SC7からISO/IEC JTC1 SC22リエゾンとして、2000年頃、C/C++の品質向上に貢献しようとした活動をしていたことがあります。その頃は、まだISO/IEC TS 17961の原案が出る前です。Cの精神が優勢で、セキュリティ対策は補助的な位置付けでした。ISO/IEC TS 17961の制定と、C/C++のライブラリ類の見直しと、C++の進化はどんどん進んでいきます。 

進化の具合が、どちらに行こうとしているかは、コンパイルて実行させてみないとわかりません。C/C++の規格案の電子ファイルは、そのままコンパイルできる形式であるとよいと主張してきました。MISRA-C/C++, CERTC/C++でも同様です。MISRA-C/C++は、Example Suiteという形で、コード断片をコンパイルできる形で提供するようになりました。

一連の記事はコード断片をコンパイルできる形にする方法を検討してコンパイル、リンク、実行して、規格案の原文と処理系(g++, Clang++)との違いを確認し、技術内容を検討し、ISO/IEC JTC1 SC22 WG21にフィードバックするために用います。
また、CERT C++, MISRA C++等のコーディング標準のコード断片をコンパイルする際の参考にさせていただこうと考えています。CERT C++, MISRA C++が標準化の動きとの時間的なずれがあれば確認できれば幸いです。また、boostライブラリとの関連、Linux OS, 箱庭プロジェクト、g++(GCC), clang++(LLVM)との関係も調査中です。
何か、抜け漏れ、耳より情報がありましたらおしらせくださると幸いです。

背景(back ground)

C/C++でコンパイルエラーが出ると、途方にくれることがしばしばあります。
何回かに1回は、該当するエラーが検索できます。
ただ、条件が違っていて、そこでの修正方法では目的を達成しないこともしばしばです。いろいろな条件のコンパイルエラーとその対応方法について、広く記録することによって、いつか同じエラーに遭遇した時にやくに立つことを目指しています。

この半年の間で、三度、自分のネットでの記録に助けられたことがあります。
また過去に解決できなかった記録を10種類以上、最近になって解決できたことがあります。それは、主に次の3つの情報に基づいています。

cpprefjp - C++日本語リファレンス

コンパイラの実装状況

また
https://researchmap.jp/joub9b3my-1797580/#_1797580
に記載したサイトのお世話になっています。

作業方針(sequence)

Clang++では-std=c++03, C++2bの2種類
g++では-std=c++03, c++2bの2種類
でコンパイルし、

1)コンパイルエラーを収集する。
2)コンパイルエラーをなくす方法を検討する。
コンパイルエラーになる例を示すだけが目的のコードは、コンパイルエラーをなくすのではなく、コンパイルエラーの種類を収集するだけにする。
文法を示すのが目的のコード場合に、コンパイルエラーをなくすのに手間がかかる場合は、順次作業します。
3)リンクエラーをなくす方法を検討する。
文法を示すのが目的のコード場合に、リンクエラーをなくすのに手間がかかる場合は、順次作業します。
4)意味のある出力を作る。
コンパイル、リンクが通っても、意味のある出力を示そうとすると、コンパイル・リンクエラーが出て収拾できそうにない場合がある。順次作業します。

1)だけのものから4)まで進んだものと色々ある状態です。一歩でも前に進むご助言をお待ちしています。「検討事項」の欄に現状を記録するようにしています。

C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list

C++N4741, 2018 Standard Working Draft on ISO/IEC 14882 sample code compile list

C++N4606, 2016符号断片編纂一覧(example code compile list)

C++N4606, 2016 Working Draft 2016, ISO/IEC 14882, C++ standard(1) Example code compile list
https://qiita.com/kaizen_nagoya/items/df5d62c35bd6ed1c3d43/

C++N3242, 2011 sample code compile list on clang++ and g++

編纂器(Compiler)

clang++ --version

20220826 以前

Debian clang version 14.0.5-++20220610033153+c12386ae247c-1~exp1~20220610153237.151
Target: x86_64-pc-linux-gnu, Thread model: posix, InstalledDir: /usr/bin

20220827 以降

Debian clang version 14.0.6-++20220622053050+f28c006a5895-1~exp1~20220622173135.152
Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin

g++- --version

g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

31.12 File systems [filesystems] C++N4910:2022 (695) p1577.cpp

算譜(source code)

p1577.cpp
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = "31.12 File systems [filesystems] C++N4910:2022 (695) p1577.cpp";
// Debian clang version 14.0.5-++20220610033153+c12386ae247c-
// g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
// Edited by Dr. OGAWA Kiyoshi. Compile procedure and results record.
// C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
// https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91

#include "N4910.h"

using namespace std;

// 31.12.2.1 General [fs.conformance.general]
//  Conformance is specified in terms of behavior. Ideal behavior is not always implementable, so the conformance subclauses take that into account.
// 31.12.2.2 POSIX conformance [fs.conform.9945]
// Some behavior is specified by reference to POSIX. How such behavior is actually implemented is unspecified. [Note 1: This constitutes an “as if” rule allowing implementations to call native operating system or other APIs.
//  Implementations should provide such behavior as it is defined by POSIX. Implementations shall document any behavior that differs from the behavior defined by POSIX. Implementations that do not support exact POSIX behavior should provide behavior as close to POSIX behavior as is reasonable given the limitations of actual operating systems and file systems. If an implementation cannot provide any reasonable behavior, the implementation shall report an error as specified in 31.12.5.
// [Note 2: This allows users to rely on an exception being thrown or an error code being set when an implementation cannot provide any reasonable behavior.
//  Implementations are not required to provide behavior that is not supported by a particular file system.
// [Example 1: The FAT file system used by some memory cards, camera memory, and floppy disks does not support hard links, symlinks, and many other features of more capable file systems, so implementations are not required to support those features on the FAT file system but instead are required to report an error as described above.
// 31.12.2.3 Operating system dependent behavior conformance [fs.conform.os]
// Behavior that is specified as being operating system dependent is dependent upon the behavior and character- istics of an operating system. The operating system an implementation is dependent upon is implementation- defined.
//  It is permissible for an implementation to be dependent upon an operating system emulator rather than the actual underlying operating system.
// 31.12.2.4 File system race behavior [fs.race.behavior]
// A file system race is the condition that occurs when multiple threads, processes, or computers interleave access and modification of the same object within a file system. Behavior is undefined if calls to functions provided by subclause 31.12 introduce a file system race.
// If the possibility of a file system race would make it unreliable for a program to test for a precondition before calling a function described herein, Preconditions: is not specified for the function.
// [Note 1: As a design practice, preconditions are not specified when it is unreasonable for a program to detect them prior to calling the function. —end note]
// 31.12.3 Requirements [fs.req]
//  Throughout subclause 31.12, char, wchar_t, char8_t, char16_t, and char32_t are collectively called encoded character types.
// Functions with template parameters named EcharT shall not participate in overload resolution unless EcharT is one of the encoded character types.
//  Template parameters named InputIterator shall meet the Cpp17InputIterator requirements (25.3.5.3) and shall have a value type that is one of the encoded character types.
//  [Note 1: Use of an encoded character type implies an associated character set and encoding. Since signed char and unsigned char have no implied character set and encoding, they are not included as permitted types. —end note]
//  Template parameters named Allocator shall meet the Cpp17Allocator requirements (16.4.4.6.1).
// 31.12.4 Header <filesystem> synopsis [fs.filesystem.syn]
#include <compare> // see 17.11.1
namespace std::filesystem {
// 31.12.6, paths class path;
// 31.12.6.8, path non-member functions
void swap(path& lhs, path& rhs) noexcept;
size_t hash_value(const path& p) noexcept;
// 31.12.7, filesystem errors
class filesystem_error;
// 31.12.10, directory entries
class directory_entry;
// 31.12.11, directory iterators
class directory_iterator;
// 31.12.11.3, range access for directory iterators
directory_iterator begin(directory_iterator iter) noexcept;
directory_iterator end(directory_iterator) noexcept;
// 31.12.12, recursive directory iterators
class recursive_directory_iterator;
// 31.12.12.3, range access for recursive directory iterators
recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept;
recursive_directory_iterator end(recursive_directory_iterator) noexcept;
// 31.12.9, file status
class file_status;
struct space_info {
    uintmax_t capacity;
    uintmax_t free;
    uintmax_t available;
    friend bool operator==(const space_info&, const space_info&) = default;
};
// 31.12.8, enumerations
enum class file_type;
enum class perms;
enum class perm_options;
enum class copy_options;
enum class directory_options;
using file_time_type = chrono::time_point<chrono::file_clock>;
// 31.12.13, filesystem operations
path absolute(const path& p);
path absolute(const path& p, error_code& ec);
path canonical(const path& p);
path canonical(const path& p, error_code& ec);
void copy(const path& from, const path& to);
void copy(const path& from, const path& to, error_code& ec);
void copy(const path& from, const path& to, copy_options options);
void copy(const path& from, const path& to, copy_options options,
          error_code& ec);
bool copy_file(const path& from, const path& to);
bool copy_file(const path& from, const path& to, error_code& ec);
bool copy_file(const path& from, const path& to, copy_options option);
bool copy_file(const path& from, const path& to, copy_options option,
               error_code& ec);
void copy_symlink(const path& existing_symlink, const path& new_symlink);
void copy_symlink(const path& existing_symlink, const path& new_symlink,
                  error_code& ec) noexcept;
bool create_directories(const path& p);
bool create_directories(const path& p, error_code& ec);
bool create_directory(const path& p);
bool create_directory(const path& p, error_code& ec) noexcept;
bool create_directory(const path& p, const path& attributes);
bool create_directory(const path& p, const path& attributes,
                      error_code& ec) noexcept;
void create_directory_symlink(const path& to, const path& new_symlink);
void create_directory_symlink(const path& to, const path& new_symlink,
                              error_code& ec) noexcept;
void create_hard_link(const path& to, const path& new_hard_link);
void create_hard_link(const path& to, const path& new_hard_link,
                      error_code& ec) noexcept;
void create_symlink(const path& to, const path& new_symlink);
void create_symlink(const path& to, const path& new_symlink,
                    error_code& ec) noexcept;
path current_path();
path current_path(error_code& ec);
void current_path(const path& p);
void current_path(const path& p, error_code& ec) noexcept;
bool equivalent(const path& p1, const path& p2);
bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
bool exists(file_status s) noexcept;
bool exists(const path& p);
bool exists(const path& p, error_code& ec) noexcept;
uintmax_t file_size(const path& p);
uintmax_t file_size(const path& p, error_code& ec) noexcept;
uintmax_t hard_link_count(const path& p);
uintmax_t hard_link_count(const path& p, error_code& ec) noexcept;
bool is_block_file(file_status s) noexcept;
bool is_block_file(const path& p);
bool is_block_file(const path& p, error_code& ec) noexcept;
bool is_character_file(file_status s) noexcept;
bool is_character_file(const path& p);
bool is_character_file(const path& p, error_code& ec) noexcept;
bool is_directory(file_status s) noexcept;
bool is_directory(const path& p);
bool is_directory(const path& p, error_code& ec) noexcept;
bool is_empty(const path& p);
bool is_empty(const path& p, error_code& ec);
bool is_fifo(file_status s) noexcept;
bool is_fifo(const path& p);
bool is_fifo(const path& p, error_code& ec) noexcept;
bool is_other(file_status s) noexcept;
bool is_other(const path& p);
bool is_other(const path& p, error_code& ec) noexcept;
bool is_regular_file(file_status s) noexcept;
bool is_regular_file(const path& p);
bool is_regular_file(const path& p, error_code& ec) noexcept;
bool is_socket(file_status s) noexcept;
bool is_socket(const path& p);
bool is_socket(const path& p, error_code& ec) noexcept;
bool is_symlink(file_status s) noexcept;
bool is_symlink(const path& p);
bool is_symlink(const path& p, error_code& ec) noexcept;
file_time_type last_write_time(const path& p);
file_time_type last_write_time(const path& p, error_code& ec) noexcept;
void last_write_time(const path& p, file_time_type new_time);
void last_write_time(const path& p, file_time_type new_time,
                     error_code& ec) noexcept;
void permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
void permissions(const path& p, perms prms, error_code& ec) noexcept;
void permissions(const path& p, perms prms, perm_options opts, error_code& ec);
path proximate(const path& p, error_code& ec);
path proximate(const path& p, const path& base = current_path());
path proximate(const path& p, const path& base, error_code& ec);
path read_symlink(const path& p);
path read_symlink(const path& p, error_code& ec);
path relative(const path& p, error_code& ec);
path relative(const path& p, const path& base = current_path());
path relative(const path& p, const path& base, error_code& ec);
bool remove(const path& p);
bool remove(const path& p, error_code& ec) noexcept;
uintmax_t remove_all(const path& p);
uintmax_t remove_all(const path& p, error_code& ec);
void rename(const path& from, const path& to);
void rename(const path& from, const path& to, error_code& ec) noexcept;
void resize_file(const path& p, uintmax_t size);
void resize_file(const path& p, uintmax_t size, error_code& ec) noexcept;
space_info space(const path& p);
space_info space(const path& p, error_code& ec) noexcept;
file_status status(const path& p);
file_status status(const path& p, error_code& ec) noexcept;
bool status_known(file_status s) noexcept;
file_status symlink_status(const path& p);
file_status symlink_status(const path& p, error_code& ec) noexcept;
path temp_directory_path();
path temp_directory_path(error_code& ec);
path weakly_canonical(const path& p);
path weakly_canonical(const path& p, error_code& ec);
}
// 31.12.6.9, hash support
namespace std {
template<class T> struct hash;
template<> struct hash<filesystem::path>;
}
namespace std::ranges {
template<>
inline constexpr bool enable_borrowed_range<filesystem::directory_iterator> = true;
template<>
inline constexpr bool enable_borrowed_range<filesystem::recursive_directory_iterator> = true;
template<>
inline constexpr bool enable_view<filesystem::directory_iterator> = true;
// appropriate response.
// — Uses where file system errors are routine and do not necessarily represent failure. Returning an error code is the most appropriate response. This allows application specific error handling, including simply ignoring the error.
template<>
inline constexpr bool enable_view<filesystem::recursive_directory_iterator> = true;
}
//  Implementations should ensure that the resolution and range of file_time_type reflect the operating system dependent resolution and range of file time values.
// 31.12.5 Error reporting [fs.err.report]
//  Filesystem library functions often provide two overloads, one that throws an exception to report file system errors, and another that sets an error_code.
// [Note 1: This supports two common use cases:
// — Uses where file system errors are truly exceptional and indicate a serious failure. Throwing an exception is an
// Functions not having an argument of type error_code& handle errors as follows, unless otherwise specified:
// — When a call by the implementation to an operating system or other underlying API results in an error that prevents the function from meeting its specifications, an exception of type filesystem_- error shall be thrown. For functions with a single path argument, that argument shall be passed to the filesystem_error constructor with a single path argument. For functions with two path arguments, the first of these arguments shall be passed to the filesystem_error constructor as the path1 argument, and the second shall be passed as the path2 argument. The filesystem_error constructor’s error_code argument is set as appropriate for the specific operating system dependent error.
// — Failure to allocate storage is reported by throwing an exception as described in 16.4.6.13.
//  An object of class path represents a path and contains a pathname. Such an object is concerned only with the lexical and syntactic aspects of a path. The path does not necessarily exist in external storage, and the pathname is not necessarily valid for the current operating system or for a particular file system.
//  [Note 1: Class path is used to support the differences between the string types used by different operating systems to represent pathnames, and to perform conversions between encodings when necessary.
//  A path is a sequence of elements that identify the location of a file within a filesystem. The elements are the root-nameopt, root-directoryopt, and an optional sequence of filenames (31.12.6.2). The maximum number of elements in the sequence is operating system dependent (31.12.2.3).
//  An absolute path is a path that unambiguously identifies the location of a file without reference to an additional starting location. The elements of a path that determine if it is absolute are operating system dependent. A relative path is a path that is not absolute, and as such, only unambiguously identifies the location of a file when resolved relative to an implied starting location. The elements of a path that determine if it is relative are operating system dependent.
// [Note 2: Pathnames “.” and “..” are relative paths.
//  A pathname is a character string that represents the name of a path. Pathnames are formatted according to the generic pathname format grammar (31.12.6.2) or according to an operating system dependent native pathname format accepted by the host operating system.
//  Pathname resolution is the operating system dependent mechanism for resolving a pathname to a particular file in a file hierarchy. There may be multiple pathnames that resolve to the same file.
// — Destructors throw nothing.
//  Functions having an argument of type error_code& handle errors as follows, unless otherwise specified:
// — If a call by the implementation to an operating system or other underlying API results in an error that prevents the function from meeting its specifications, the error_code& argument is set as appropriate for the specific operating system dependent error. Otherwise, clear() is called on the error_code& argument.
// 31.12.6 Class path [fs.class.path]
// 31.12.6.1 General [fs.class.path.general]
// [Example 1: POSIX specifies the mechanism in section 4.12, Pathname resolution.
namespace std::filesystem {
class path {
public:
    using value_type = see below ;
    using string_type = basic_string<value_type>;
    static constexpr value_type preferred_separator = see below;
// 31.12.8.1, enumeration format enum format;
// 31.12.6.5.1, constructors and destructor
    path() noexcept;
    path(const path& p);
    path(path&& p) noexcept;
    path(string_type&& source, format fmt = auto_format);
    template<class Source>
    path(const Source& source, format fmt = auto_format);
    template<class InputIterator>
    path(InputIterator first, InputIterator last, format fmt = auto_format);
    template<class Source>
    path(const Source& source, const locale& loc, format fmt = auto_format);
    template<class InputIterator>
    path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
    ~path();
// 31.12.6.5.2, assignments
    path& operator=(const path& p);
    path& operator=(path&& p) noexcept;
    path& operator=(string_type&& source);
    path& assign(string_type&& source);
    template<class Source>
    path& operator=(const Source& source);
    template<class Source>
    path& assign(const Source& source);
    template<class InputIterator>
    path& assign(InputIterator first, InputIterator last);
// 31.12.6.5.3, appends
    path& operator/=(const path& p);
    template<class Source>
    path& operator/=(const Source& source);
    template<class Source>
    path& append(const Source& source);
    template<class InputIterator>
    path& append(InputIterator first, InputIterator last);
// 31.12.6.5.4, concatenation
    path& operator+=(const path& x);
    path& operator+=(const string_type& x);
    path& operator+=(basic_string_view<value_type> x);
    path& operator+=(const value_type* x);
    path& operator+=(value_type x);
    template<class Source>
    path& operator+=(const Source& x);
    template<class EcharT>
    path& operator+=(EcharT x);
    template<class Source>
    path& concat(const Source& x);
    template<class InputIterator>
    path& concat(InputIterator first, InputIterator last);
// 31.12.6.5.5, modifiers
    void clear() noexcept;
    path& make_preferred();
    path& remove_filename();
    path& replace_filename(const path& replacement);
    path& replace_extension(const path& replacement = path());
    void swap(path& rhs) noexcept;
// 31.12.6.8, non-member operators
    friend bool operator==(const path& lhs, const path& rhs) noexcept;
    friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
    friend path operator/(const path& lhs, const path& rhs);
// 31.12.6.5.6, native format observers
    const string_type& native() const noexcept;
    const value_type* c_str() const noexcept;
    operator string_type() const;
    template<class EcharT, class traits = char_traits<EcharT>,
             class Allocator = allocator<EcharT>>
    basic_string<EcharT, traits, Allocator>
    string(const Allocator& a = Allocator()) const;
    std::string    string() const;
    std::wstring   wstring() const;
    std::u8string  u8string() const;
    std::u16string u16string() const;
    std::u32string u32string() const;
// 31.12.6.5.7, generic format observers
    template<class EcharT, class traits = char_traits<EcharT>,
             class Allocator = allocator<EcharT>>
    basic_string<EcharT, traits, Allocator>
    generic_string(const Allocator& a = Allocator()) const;
    std::string    generic_string() const;
    std::wstring   generic_wstring() const;
    std::u8string  generic_u8string() const;
    std::u16string generic_u16string() const;
    std::u32string generic_u32string() const;
// 31.12.6.5.8, compare
    int compare(const path& p) const noexcept;
    int compare(const string_type& s) const;
    int compare(basic_string_view<value_type> s) const;
    int compare(const value_type* s) const;
// 31.12.6.5.9, decomposition path root_name() const;
    path root_directory() const;
    path root_path() const;
    path relative_path() const;
    path parent_path() const;
    path filename() const;
    path stem() const;
    path extension() const;
// 31.12.6.5.10, query
    [[nodiscard]] bool empty() const noexcept;
    bool has_root_name() const;
    bool has_root_directory() const;
    bool has_root_path() const;
    bool has_relative_path() const;
    bool has_parent_path() const;
    bool has_filename() const;
    bool has_stem() const;
    bool has_extension() const;
    bool is_absolute() const;
    bool is_relative() const;
// 31.12.6.5.11, generation
    path lexically_normal() const;
    path lexically_relative(const path& base) const;
    path lexically_proximate(const path& base) const;
// 31.12.6.6, iterators
    class iterator;
    using const_iterator = iterator;
    iterator begin() const;
    iterator end() const;
// 31.12.6.7, path inserter and extractor template<class charT, class traits>
    friend basic_ostream<charT, traits>&
    operator<<(basic_ostream<charT, traits>& os, const path& p);
    template<class charT, class traits>
    friend basic_istream<charT, traits>&
    operator>>(basic_istream<charT, traits>& is, path& p);
};
}
//  value_type is a typedef for the operating system dependent encoded character type used to represent pathnames.
// The value of the preferred_separator member is the operating system dependent preferred-separator character (31.12.6.2).
//  [Example 2 : For POSIX-based operating systems, value_type is char and preferred_separator is the slash character (’/’). For Windows-based operating systems, value_type is wchar_t and preferred_separator is the backslash character (L’\\’).
// 31.12.6.2 Generic pathname format [fs.path.generic]
// pathname :root-nameopt root-directoryopt relative-path root-name :operating system dependent sequences of characters implementation-defined sequences of charactersroot-directory : directory-separatorrelative-path : filename filename directory-separator relative-path an empty path filename : non-empty sequence of characters other than directory-separator characters directory-separator : preferred-separator directory-separatoropt fallback-separator directory-separatoropt preferred-separator :operating system dependent directory separator character fallback-separator :/, if preferred-separator is not /
//  A filename is the name of a file. The dot and dot-dot filenames, consisting solely of one and two period characters respectively, have special meaning. The following characteristics of filenames are operating system dependent:
// — The permitted characters.
// [Example 1: Some operating systems prohibit the ASCII control characters (0x00 – 0x1F) in filenames.
// [Note 1: Wider portability can be achieved by limiting filename characters to the POSIX Portable Filename Character Set: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789. _
// — The maximum permitted length.
// — Filenames that are not permitted.
// — Filenames that have special meaning.
// — Case awareness and sensitivity during path resolution.
// — Special rules that may apply to file types other than regular files, such as directories.
// — The generic format is acceptable as a native path.
// — There is no need to distinguish between native format and generic format in function arguments. — Paths for regular files and paths for directories share the same syntax.
//  Except in a root-name, multiple successive directory-separator characters are considered to be the same as one directory-separator character.
//  The dot filename is treated as a reference to the current directory. The dot-dot filename is treated as a reference to the parent directory. What the dot-dot filename refers to relative to root-directory is implementation-defined. Specific filenames may have special meanings for a particular operating system.
//  A root-name identifies the starting location for pathname resolution (31.12.6). If there are no operating system dependent root-names, at least one implementation-defined root-name is required.
// [Note 2: Many operating systems define a name beginning with two directory-separator characters as a root-name that identifies network or other resource locations. Some operating systems define a single letter followed by a colon as a drive specifier – a root-name identifying a specific device such as a disk drive. —end note]
//  If a root-name is otherwise ambiguous, the possibility with the longest sequence of characters is chosen. [Note 3: On a POSIX-like operating system, it is impossible to have a root-name and a relative-path without an intervening root-directory element. —end note]
//  Normalization of a generic format pathname means:
// 1. If the path is empty, stop.
// 2. Replace each slash character in the root-name with a preferred-separator.
// 3. Replace each directory-separator with a preferred-separator.
// [Note 4: The generic pathname grammar defines directory-separator as one or more slashes and preferred- separators.
// 4. Remove each dot filename and any immediately following directory-separator.
// 5. As long as any appear, remove a non-dot-dot filename immediately followed by a directory-separator and a dot-dot filename, along with any immediately following directory-separator.
// 6. If there is a root-directory, remove all dot-dot filenames and any directory-separators immediately following them.
// [Note 5: These dot-dot filenames attempt to refer to nonexistent parent directories. —end note]
// 7. If the last filename is dot-dot, remove any trailing directory-separator.
// 8. If the path is empty, add a dot. The result of normalization is a path in normal form, which is said to be normalized.
// 31.12.6.3 Conversions [fs.path.cvt]
// 31.12.6.3.1 Argument format conversions [fs.path.fmt.cvt]
//  [Note 1: The format conversions described in this subclause are not applied on POSIX-based operating systems because on these systems:
// — char: The encoding is the native ordinary encoding. The method of conversion, if any, is operating system dependent.
// [Note 1: For POSIX-based operating systems path::value_type is char so no conversion from char value type arguments or to char value type return values is performed. For Windows-based operating systems, the native ordinary encoding is determined by calling a Windows API function.
// [Note 2: This results in behavior identical to other C and C++ standard library functions that perform file operations using ordinary character strings to identify paths. Changing this behavior would be surprising and error prone. —end note]
// — wchar_t: The encoding is the native wide encoding. The method of conversion is unspecified.
// [Note 3: For Windows-based operating systems path::value_type is wchar_t so no conversion from wchar_t value type arguments or to wchar_t value type return values is performed.
// — char8_t: The encoding is UTF-8. The method of conversion is unspecified.
// — char16_t: The encoding is UTF-16. The method of conversion is unspecified.
// — char32_t: The encoding is UTF-32. The method of conversion is unspecified.
//  Several functions are defined to accept detected-format arguments, which are character sequences. A detected- format argument represents a path using either a pathname in the generic format (31.12.6.2) or a pathname in the native format (31.12.6). Such an argument is taken to be in the generic format if and only if it matches the generic format and is not acceptable to the operating system as a native path.
//  [Note 2: Some operating systems have no unambiguous way to distinguish between native format and generic format arguments. This is by design as it simplifies use for operating systems that do not require disambiguation. An implementation for an operating system where disambiguation is required is permitted to distinguish between the formats.
//  Pathnames are converted as needed between the generic and native formats in an operating-system-dependent manner. Let G(n) and N(g) in a mathematical sense be the implementation’s functions that convert native- to-generic and generic-to-native formats respectively. If g=G(n) for some n, then G(N(g))=g; if n=N(g) for some g, then N(G(n))=n.
// [Note 3: Neither G nor N need be invertible.
//  If the native format requires paths for regular files to be formatted differently from paths for directories, the path shall be treated as a directory path if its last element is a directory-separator, otherwise it shall be treated as a path to a regular file.
//  [Note 4: A path stores a native format pathname (31.12.6.5.6) and acts as if it also stores a generic format pathname, related as given below. The implementation can generate the generic format pathname based on the native format pathname (and possibly other information) when requested. —end note]
//  When a path is constructed from or is assigned a single representation separate from any path, the other representation is selected by the appropriate conversion function (G or N ).
//  When the (new) value p of one representation of a path is derived from the representation of that or another path, a value q is chosen for the other representation. The value q converts to p (by G or N as appropriate) if any such value does so; q is otherwise unspecified.
// [Note 5: If q is the result of converting any path at all, it is the result of converting p.
// 31.12.6.3.2 Type and encoding conversions [fs.path.type.cvt]
// The native encoding of an ordinary character string is the operating system dependent current encoding for pathnames (31.12.6). The native encoding for wide character strings is the implementation-defined execution wide-character set encoding (16.3.3.3.5).
// For member function arguments that take character sequences representing paths and for member functions returning strings, value type and encoding conversion is performed if the value type of the argument or return value differs from path::value_type. For the argument or return value, the method of conversion and the encoding to be converted to is determined by its value type:
// If the encoding being converted to has no representation for source characters, the resulting converted characters, if any, are unspecified. Implementations should not modify member function arguments if already of type path::value_type.
// — basic_string<EcharT, traits, Allocator>. A function argument const Source& source shall have an effective range [source.begin(), source.end()).
// — basic_string_view<EcharT, traits>. A function argument const Source& source shall have an effective range [source.begin(), source.end()).
// — A type meeting the Cpp17InputIterator requirements that iterates over a NTCTS. The value type shall be an encoded character type. A function argument const Source& source shall have an effective range [source,end) where end is the first iterator value with an element value equal to iterator_traits<Source>::value_type().
// — A character array that after array-to-pointer decay results in a pointer to the start of a NTCTS. The value type shall be an encoded character type. A function argument const Source& source shall have an effective range [source, end) where end is the first iterator value with an element value equal to iterator_traits<decay_t<Source>>::value_type().
// — Source is a specialization of basic_string or basic_string_view, or
// — the qualified-id iterator_traits<decay_t<Source>>::value_type is valid and denotes a possibly
// Effects: Constructs an object of class path having the same pathname in the native and generic formats, respectively, as the original value of p. In the second form, p is left in a valid but unspecified state.
// 31.12.6.4 Requirements [fs.path.req]
//  In addition to the requirements (31.12.3), function template parameters named Source shall be one of:
//  Functions taking template parameters named Source shall not participate in overload resolution unless Source denotes a type other than path, and either const encoded character type (13.10.3).
//  [Note 1: See path conversions (31.12.6.3) for how the value types above and their encodings convert to path::value_- type and its encoding.
//  Arguments of type Source shall not be null pointers.
// 31.12.6.5 Members [fs.path.member]
// 31.12.6.5.1 Constructors [fs.path.construct]
path() noexcept;
// Postconditions: empty() == true.
path(const path& p);
path(path&& p) noexcept;
path(string_type&& source, format fmt = auto_format);
// Effects: Constructs an object of class path for which the pathname in the detected-format of source has the original value of source (31.12.6.3.1), converting format if required (31.12.6.3.1). source is left in a valid but unspecified state.
template<class Source>
path(const Source& source, format fmt = auto_format);
template<class InputIterator>
path(InputIterator first, InputIterator last, format fmt = auto_format);
// Effects: Let s be the effective range of source (31.12.6.4) or the range [first, last), with the encoding converted if required (31.12.6.3). Finds the detected-format of s (31.12.6.3.1) and constructs an object of class path for which the pathname in that format is s.
template<class Source>
path(const Source& source, const locale& loc, format fmt = auto_format);
template<class InputIterator>
path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
// Mandates: The value type of Source and InputIterator is char.
// Effects: Let s be the effective range of source or the range [first, last), after converting the encoding as follows:
// — If value_type is wchar_t, converts to the native wide encoding (31.12.6.3.2) using the codecvt< wchar_t, char, mbstate_t> facet of loc.
// — Otherwise a conversion is performed using the codecvt<wchar_t, char, mbstate_t> facet of loc, and then a second conversion to the current ordinary encoding. Finds the detected-format of s (31.12.6.3.1) and constructs an object of class path for which the pathname in that format is s.
// [Example 1: A string is to be read from a database that is encoded in ISO/IEC 8859-1, and used to create a directory:
namespace fs = std::filesystem;
std::string latin1_string = read_latin1_data();
codecvt_8859_1<wchar_t> latin1_facet;
std::locale latin1_locale(std::locale(), latin1_facet);
fs::create_directory(fs::path(latin1_string, latin1_locale));
// For POSIX-based operating systems, the path is constructed by first using latin1_facet to convert ISO/IEC 8859-1 encoded latin1_string to a wide character string in the native wide encoding (31.12.6.3.2). The resulting wide string is then converted to an ordinary character pathname string in the current native ordinary encoding. If the native wide encoding is UTF-16 or UTF-32, and the current native ordinary encoding is UTF-8, all of the characters in the ISO/IEC 8859-1 character set will be converted to their Unicode representation, but for other native ordinary encodings some characters may have no representation. For Windows-based operating systems, the path is constructed by using latin1_facet to convert ISO/IEC 8859-1 encoded latin1_string to a UTF-16 encoded wide character pathname string. All of the characters in the ISO/IEC 8859-1 character set will be converted to their Unicode representation.
// 31.12.6.5.2 Assignments [fs.path.assign]
path& operator=(const path& p);
// Effects: If *this and p are the same object, has no effect. Otherwise, sets both respective pathnames of *this to the respective pathnames of p.
//  The append operations use operator/= to denote their semantic effect of appending preferred-separator when needed.
// Returns: *this.
path& operator=(path&& p) noexcept;
// Effects: If *this and p are the same object, has no effect. Otherwise, sets both respective pathnames of *this to the respective pathnames of p. p is left in a valid but unspecified state.
// [Note 1: A valid implementation is swap(p).
// Returns: *this.
path& operator=(string_type&& source);
path& assign(string_type&& source);
// Effects: Sets the pathname in the detected-format of source to the original value of source. source is left in a valid but unspecified state.
// Returns: *this.
template<class Source>
path& operator=(const Source& source);
template<class Source>
path& assign(const Source& source);
template<class InputIterator>
path& assign(InputIterator first, InputIterator last);
// Effects: Let s be the effective range of source (31.12.6.4) or the range [first, last), with the encoding converted if required (31.12.6.3). Finds the detected-format of s (31.12.6.3.1) and sets the pathname in that format to s.
// Returns: *this.
// 31.12.6.5.3 Appends [fs.path.append]
template<class Source>
path& operator/=(const Source& source);
template<class Source>
path& append(const Source& source);
// Effects: Equivalent to: return operator/=(path(source)); template<class InputIterator>
// Effects: Appends path(x).native() to the pathname in the native format.
// [Note 1: This directly manipulates the value of native(), which is not necessarily portable between operating systems.
//  Returns: *this.
path& operator/=(const path& p);
// Effects: If p.is_absolute() || (p.has_root_name() && p.root_name() != root_name()), then operator=(p).Otherwise, modifies *this as if by these steps:
// — If p.has_root_directory(), then removes any root directory and relative path from the generic format pathname. Otherwise, if !has_root_directory() && is_absolute() is true or if has_- filename() is true, then appends path::preferred_separator to the generic format pathname.
// — Then appends the native format pathname of p, omitting any root-name from its generic format pathname, to the native format pathname.
// [Example 1: Even if //host is interpreted as a root-name, both of the paths path("//host")/"foo" and path("//host/")/"foo" equal "//host/foo" (although the former might use backslash as the preferred sepa- rator). Expression examples:
// On POSIX,
path("foo") /= path("");
path("foo") /= path("/bar");
// On Windows,
path("foo") /= path("");
path("foo") /= path("/bar");
path("foo") /= path("c:/bar");
path("foo") /= path("c:");
path("c:") /= path("");
path("c:foo") /= path("/bar");
path("c:foo") /= path("c:bar");
// Returns: *this.
// yields path("foo/") // yields path("/bar")
// yields path("foo\\") // yields path("/bar") // yields path("c:/bar") // yields path("c:")
// yields path("c:")
// yields path("c:/bar")
// yields path("c:foo\\bar")
path& append(InputIterator first, InputIterator last);
// Effects: Equivalent to:
return operator/=(path(first, last));
// 31.12.6.5.4 Concatenation [fs.path.concat]
path& operator+=(const path& x);
path& operator+=(const string_type& x);
path& operator+=(basic_string_view<value_type> x);
path& operator+=(const value_type* x);
template<class Source>
path& operator+=(const Source& x);
template<class Source>
path& concat(const Source& x);
path& operator+=(value_type x);
template<class EcharT>
path& operator+=(EcharT x);
// Effects: Equivalent to:
return *this += basic_string_view(&x, 1);
// Effects: Remove the generic format pathname of filename() from the generic format pathname. Postconditions: !has_filename().
// Returns: *this.
// [Example 2:
template<class InputIterator>
path& concat(InputIterator first, InputIterator last);
// Effects: Equivalent to:
return *this += path(first, last);
// 31.12.6.5.5 Modifiers [fs.path.modifiers]
void clear() noexcept;
// Postconditions: empty() == true.
path& make_preferred();
// Effects: Each directory-separator of the pathname in the generic format is converted to preferred-separator. Returns: *this.
// [Example 1:
path p("foo/bar");
std::cout << p << '\n';
p.make_preferred();
std::cout << p << '\n';
// On an operating system where preferred-separator is a slash, the output is: "foo/bar" "foo/bar"
// On an operating system where preferred-separator is a backslash, the output is: "foo/bar" "foo\bar"
path& remove_filename();
path("foo/bar").remove_filename();
path("foo/").remove_filename();
path("/foo").remove_filename();
path("/").remove_filename();
// yields "foo/" // yields "foo/" // yields "/"
// yields "/"
path& replace_filename(const path& replacement);
// Effects: Equivalent to: remove_filename();
operator/=(replacement);
// Returns: *this. [Example 3:
path("/foo").replace_filename("bar");
path("/").replace_filename("bar");
// yields "/bar" on POSIX // yields "/bar" on POSIX
path& replace_extension(const path& replacement = path());
// Effects:
// — Any existing extension() (31.12.6.5.9) is removed from the pathname in the generic format, then
// — If replacement is not empty and does not begin with a dot character, a dot character is appended to the pathname in the generic format, then
// — operator+=(replacement);. Returns: *this.
basic_string<EcharT, traits, Allocator>
generic_string(const Allocator& a = Allocator()) const;
// Returns: The pathname in the generic format.
// Remarks: All memory allocation, including for the return value, shall be performed by a. Conversion,
// if any, is specified by 31.12.6.3.
void swap(path& rhs) noexcept;
// Effects: Swaps the contents (in all formats) of the two paths. Complexity: Constant time.
// 31.12.6.5.6 Native format observers [fs.path.native.obs]
// The string returned by all native format observers is in the native pathname format (31.12.6).
const string_type& native() const noexcept;
//  Generic format observer functions return strings formatted according to the generic pathname format (31.12.6.2). A single slash (’/’) character is used as the directory-separator.
//  [Example 1: On an operating system that uses backslash as its preferred-separator, path("foo\\bar").generic_string() returns "foo/bar".
template<class EcharT, class traits = char_traits<EcharT>,
         class Allocator = allocator<EcharT>>
// Returns: The pathname in the native format.
const value_type* c_str() const noexcept;
// Effects: Equivalent to:
return native().c_str();
operator string_type() const;
// Returns: native().
template<class EcharT, class traits = char_traits<EcharT>,
         class Allocator = allocator<EcharT>>
basic_string<EcharT, traits, Allocator>
string(const Allocator& a = Allocator()) const;
// Returns: native().
// Remarks: All memory allocation, including for the return value, shall be performed by a. Conversion, if any, is specified by 31.12.6.3.
std::string string() const;
std::wstring wstring() const;
std::u8string u8string() const;
std::u16string u16string() const;
std::u32string u32string() const;
// Returns: native().
// Remarks: Conversion, if any, is performed as specified by 31.12.6.3.
// 31.12.6.5.7 Generic format observers [fs.path.generic.obs]
std::string generic_string() const;
std::wstring generic_wstring() const;
std::u8string generic_u8string() const;
std::u16string generic_u16string() const;
std::u32string generic_u32string() const;
// Returns: The pathname in the generic format. Remarks: Conversion, if any, is specified by 31.12.6.3.
// Returns: — Let rootNameComparison be the result of this->root_name().native().compare(p.root_- name().native()). If rootNameComparison is not 0, rootNameComparison.
// — Otherwise, if !this->has_root_directory() and p.has_root_directory(), a value less than 0.
// — Otherwise, if this->has_root_directory() and !p.has_root_directory(), a value greater than 0.
// — Otherwise, if native() for the elements of this->relative_path() are lexicographically less than native() for the elements of p.relative_path(), a value less than 0.
// — Otherwise, if native() for the elements of this->relative_path() are lexicographically greater than native() for the elements of p.relative_path(), a value greater than 0.
// — Otherwise, 0.
// Returns: Let f be the generic format pathname of filename(). Returns a path whose pathname in the generic format is
// 31.12.6.5.8 Compare [fs.path.compare]
int compare(const path& p) const noexcept;
int compare(const string_type& s) const;
int compare(basic_string_view<value_type> s) const;
int compare(const value_type* s) const;
// Effects: Equivalent to: return compare(path(s));
// 31.12.6.5.9 Decomposition [fs.path.decompose]
path root_name() const;
// Returns: root-name, if the pathname in the generic format includes root-name, otherwise path().
path root_directory() const;
// Returns: root-directory, if the pathname in the generic format includes root-directory, otherwise path().
path root_path() const;
// Returns: root_name() / root_directory().
path relative_path() const;
// Returns: A path composed from the pathname in the generic format, if empty() is false, beginning with the first filename after root_path(). Otherwise, path().
path parent_path() const;
// Returns: *this if has_relative_path() is false, otherwise a path whose generic format pathname is the longest prefix of the generic format pathname of *this that produces one fewer element in its iteration.
path filename() const;
// Returns: relative_path().empty() ? path() : *--end().
// [Example 1:
path("/foo/bar.txt").filename();
path("/foo/bar").filename();
path("/foo/bar/").filename();
path("/").filename();
path("//host").filename();
path(".").filename();
path("..").filename();
// yields "bar.txt" // yields "bar"
// yields ""
// yields ""
// yields "" // yields "." // yields ".."
path stem() const;
// — f, if it contains no periods other than a leading period or consists solely of one or two periods;
// — otherwise, the prefix of f ending before its last period. // [Example 2:
// Returns: A path whose pathname in the generic format is the suffix of filename() not included in stem().
std::cout << path("/foo/bar.txt").stem();
path p = "foo.bar.baz.tar";
for (; !p.extension().empty(); p = p.stem())
    std::cout << p.extension() << '\n'; // outputs: .tar
// .baz
// .bar
// outputs "bar"
path extension() const;
// [Example 3:
path("/foo/bar.txt").extension();
path("/foo/bar").extension();
path("/foo/.profile").extension();
path(".bar").extension();
path("..bar").extension();
// yields ".txt" and stem() is "bar" // yields "" and stem() is "bar"
// yields "" and stem() is ".profile" // yields "" and stem() is ".bar"
// yields ".bar" and stem() is "."
// [Note 1: The period is included in the return value so that it is possible to distinguish between no extension and an empty extension.
// [Note 2: On non-POSIX operating systems, for a path p, it is possible that p.stem() + p.extension() == p.filename() is false, even though the generic format pathnames are the same.
// 31.12.6.5.10 Query [fs.path.query]
[[nodiscard]] bool empty() const noexcept;
// Returns: true if the pathname in the generic format is empty, otherwise false.
bool has_root_path() const;
// Returns: !root_path().empty().
bool has_root_name() const;
// Returns: !root_name().empty().
bool has_root_directory() const;
// Returns: !root_directory().empty().
bool has_relative_path() const;
// Returns: !relative_path().empty().
bool has_parent_path() const;
// Returns: !parent_path().empty().
bool has_filename() const;
// Returns: !filename().empty().
bool has_stem() const;
// Returns: !stem().empty().
bool has_extension() const;
// Returns: !extension().empty().
bool is_absolute() const;
// Returns: true if the pathname in the native format contains an absolute path (31.12.6), otherwise false.
// [Example 1: path("/").is_absolute() is true for POSIX-based operating systems, and false for Windows- based operating systems.
bool is_relative() const;
// Returns: !is_absolute().
// 31.12.6.5.11 Generation [fs.path.gen]
path lexically_normal() const;
// Returns: A path whose pathname in the generic format is the normal form (31.12.6.2) of the pathname in the generic format of *this.
// [Example 1:
assert(path("foo/./bar/..").lexically_normal() == "foo/");
assert(path("foo/.///bar/../").lexically_normal() == "foo/");
// The above assertions will succeed. On Windows, the returned path’s directory-separator characters will be backslashes rather than slashes, but that does not affect path equality. ]
path lexically_relative(const path& base) const;
// Effects: If: — root_name() != base.root_name() is true, or
// — is_absolute() != base.is_absolute() is true, or
// — !has_root_directory() && base.has_root_directory() is true, or
// — any filename in relative_path() or base.relative_path() can be interpreted as a root-name, returns path().
// [Note 1: On a POSIX implementation, no filename in a relative-path is acceptable as a root-name.
// Determines the first mismatched element of *this and base as if by:
auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
// Then,
// — if a == end() and b == base.end(), returns path("."); otherwise
// — let n be the number of filename elements in [b, base.end()) that are not dot or dot-dot or empty, minus the number that are dot-dot. If n<0, returns path(); otherwise
// — if n == 0 and (a == end() || a->empty()), returns path("."); otherwise
// — returns an object of class path that is default-constructed, followed by
// — application of operator/=(path("..")) n times, and then
// — application of operator/= for each element in [a, end()).
// Returns: *this made relative to base. Does not resolve (31.12.6) symlinks. Does not first normalize (31.12.6.2) *this or base.
// [Example 2:
assert(path("/a/d").lexically_relative("/a/b/c") == "../../d");
assert(path("/a/b/c").lexically_relative("/a/d") == "../b/c");
assert(path("a/b/c").lexically_relative("a") == "b/c");
assert(path("a/b/c").lexically_relative("a/b/c/x/y") == "../..");
assert(path("a/b/c").lexically_relative("a/b/c") == ".");
assert(path("a/b").lexically_relative("c/d") == "../../a/b");
// The above assertions will succeed. On Windows, the returned path’s directory-separator characters will be backslashes rather than slashes, but that does not affect path equality.
// [Note 2: If symlink following semantics are desired, use the operational function relative().
// — The root-name element, if present.
// — The root-directory element, if present.
// [Note 1: The generic format is required to ensure lexicographical comparison works correctly. —end note] — Each successive filename element, if present.
// — An empty element, if a trailing non-root directory-separator is present.
// Returns: An iterator for the first present element in the traversal list above. If no elements are present, the end iterator.
// [Note 3: If normalization (31.12.6.2) is needed to ensure consistent matching of elements, apply lexically_- normal() to *this, base, or both.
//  Path iterators iterate over the elements of the pathname in the generic format (31.12.6.2).
//  A path::iterator is a constant iterator meeting all the requirements of a bidirectional iterator (25.3.5.6) except that, for dereferenceable iterators a and b of type path::iterator with a == b, there is no requirement that *a and *b are bound to the same object. Its value_type is path.
//  Calling any non-const member function of a path object invalidates all iterators referring to elements of that object.
//  For the elements of the pathname in the generic format, the forward traversal order is as follows:
path lexically_proximate(const path& base) const;
// Returns: If the value of lexically_relative(base) is not an empty path, return it. Otherwise return *this.
// [Note 4: If symlink following semantics are desired, use the operational function proximate().
// [Note 5: If normalization (31.12.6.2) is needed to ensure consistent matching of elements, apply lexically_- normal() to *this, base, or both.
// 31.12.6.6 Iterators [fs.path.itr]
// The backward traversal order is the reverse of forward traversal. iterator begin() const;
iterator end() const;
// Returns: The end iterator.
// 31.12.6.7 Inserter and extractor [fs.path.io]
template<class charT, class traits>
friend basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const path& p);
// Effects: Equivalent to os << quoted(p.string<charT, traits>()).
// [Note 1: The quoted function is described in 31.7.8.
// Returns: os.
template<class charT, class traits>
friend basic_istream<charT, traits>&
operator>>(basic_istream<charT, traits>& is, path& p);
// Effects: Equivalent to:
basic_string<charT, traits> tmp;
is >> quoted(tmp);
p = tmp;
// Returns: is.
// 31.12.6.8 Non-member functions [fs.path.nonmember]
void swap(path& lhs, path& rhs) noexcept;
// Effects: Equivalent to lhs.swap(rhs).
// Postconditions: — code() == ec,
// — path1().empty() == true,
// — path2().empty() == true, and
// — string_view(what()).find(what_arg.c_str()) != string_view::npos.
size_t hash_value(const path& p) noexcept;
// Returns: A hash value for the path p. If for two paths, p1 == p2 then hash_value(p1) == hash_- value(p2).
friend bool operator==(const path& lhs, const path& rhs) noexcept;
// Returns: lhs.compare(rhs) == 0.
// [Note 1: Path equality and path equivalence have different semantics.
// — Equality is determined by the path non-member operator==, which considers the two paths’ lexical representations only.
// [Example 1: path("foo") == "bar" is never true. —end example]
// — Equivalence is determined by the equivalent() non-member function, which determines if two paths resolve (31.12.6) to the same file system entity.
// [Example 2: equivalent("foo", "bar") will be true when both paths resolve to the same file.
friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
// Returns: lhs.compare(rhs) <=> 0.
friend path operator/(const path& lhs, const path& rhs);
// Effects: Equivalent to: return path(lhs) /= rhs;
// 31.12.6.9 Hash support [fs.path.hash]
template<> struct hash<filesystem::path>;
// For an object p of type filesystem::path, hash<filesystem::path>()(p) evaluates to the same result as filesystem::hash_value(p).
// 31.12.7 Class filesystem_error [fs.class.filesystem.error]
// 31.12.7.1 General [fs.class.filesystem.error.general]
namespace std::filesystem {
class filesystem_error : public system_error {
public:
    filesystem_error(const string& what_arg, error_code ec);
    filesystem_error(const string& what_arg,
                     const path& p1, error_code ec);
    filesystem_error(const string& what_arg,

                     const path& p1, const path& p2, error_code ec);
    const path& path1() const noexcept;
    const path& path2() const noexcept;
    const char* what() const noexcept override;
};
}
//  The class filesystem_error defines the type of objects thrown as exceptions to report file system errors from functions described in subclause 31.12.
// 31.12.7.2 Members [fs.filesystem.error.members]
//  Constructors are provided that store zero, one, or two paths associated with an error.
filesystem_error(const string& what_arg, error_code ec);
filesystem_error(const string& what_arg, const path& p1, error_code ec);
// 31.12.8.1 Enum path::format [fs.enum.path.format]
//  This enum specifies constants used to identify the format of the character sequence, with the meanings listed in Table 126.
// Table 126: Enum path::format [tab:fs.enum.path.format]
// Postconditions:
// — code() == ec,
// — path1() returns a reference to the stored copy of p1,
// — path2().empty() == true, and
// — string_view(what()).find(what_arg.c_str()) != string_view::npos.
filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
// Postconditions: — code() == ec,
// — path1() returns a reference to the stored copy of p1,
// — path2() returns a reference to the stored copy of p2, and
// — string_view(what()).find(what_arg.c_str()) != string_view::npos.
const path& path1() const noexcept;
// Returns: A reference to the copy of p1 stored by the constructor, or, if none, an empty path. const path& path2() const noexcept;
// Returns: A reference to the copy of p2 stored by the constructor, or, if none, an empty path. const char* what() const noexcept override;
// Returns: An ntbs that incorporates the what_arg argument supplied to the constructor. The exact format is unspecified. Implementations should include the system_error::what() string and the pathnames of path1 and path2 in the native format in the returned string.
// 31.12.8 Enumerations [fs.enum]
//    Name Meaning native_format The native pathname format.  generic_format The generic pathname format. auto_format The interpretation of the format of the character sequence is implementation-defined. The implementation may inspect the con- tent of the character sequence to determine the format. // Recommended practice: For POSIX-based systems, native and generic formats are equivalent and the character sequence should always be interpreted in the same way.
//  31.12.8.2 Enum class file_type [fs.enum.file.type]
//  This enum class specifies constants used to identify file types, with the meanings listed in Table 127. The values of the constants are distinct.
// 31.12.8.3 Enum class copy_options [fs.enum.copy.opts]
//  The enum class type copy_options is a bitmask type (16.3.3.3.4) that specifies bitmask constants used to control the semantics of copy operations. The constants are specified in option groups with the meanings listed in Table 128. The constant none represents the empty bitmask, and is shown in each option group for purposes of exposition; implementations shall provide only a single definition. Every other constant in the table represents a distinct bitmask element.
// Table 127: Enum class file_type[tab:fs.enum.file.type]  Constant Meaning none The type of the file has not been determined or an error occurred while trying to determine the type.   not_found Pseudo-type indicating the file was not found.
// [Note 1: The file not being found is not considered an error while determining the type of a file. regular Regular file directory Directory file symlink Symbolic link file block Block special file  character Character special file fifo FIFO or pipe file  socket Socket file implementation-defined Implementations that support file systems having file types in addition to the above file_type types shall supply implementation-defined file_type constants to separately identify each of those additional file types  unknown The file exists but the type cannot be determined
//   Table 128: Enum class copy_options[tab:fs.enum.copy.opts] Option group controlling copy_file function effects for existing target files  Constant Meaning  none (Default) Error; file already exists. skip_existing Do not overwrite existing file, do not report an error. overwrite_existing Overwrite the existing file. update_existing Overwrite the existing file if it is older than the replacement file.  Option group controlling copy function effects for sub-directories  Constant Meaning none (Default) Do not copy sub-directories.recursive Recursively copy sub-directories and their contents. Option group controlling copy function effects for symbolic links Constant Meaning none (Default) Follow symbolic links. copy_symlinks Copy symbolic links as symbolic links rather than copying the files that they point to.  skip_symlinks Ignore symbolic links. Option group controlling copy function effects for choosing the form of copying Constant Meaning none (Default) Copy content. directories_only Copy directory structure only, do not copy non-directory files. create_symlinks Make symbolic links instead of copies of files. The source path shall be an absolute path unless the destination path is in the current directory. create_hard_links Make hard links instead of copies of files.
//  31.12.8.4 Enum class perms [fs.enum.perms]
//   The enum class type perms is a bitmask type (16.3.3.3.4) that specifies bitmask constants used to identify file permissions, with the meanings listed in Table 129.
//  Table 129: Enum class perms [tab:fs.enum.perms]  Name Value POSIX Definition or notes (octal) macro none 0 There are no permissions set for the file.owner_read 0400 S_IRUSR Read permission, owner owner_write 0200 S_IWUSR Write permission, owner  owner_exec 0100 S_IXUSR Execute/search permission, owner  owner_all 0700 S_IRWXU Read, write, execute/search by owner; owner_read | owner_write | owner_exec group_read 040 S_IRGRP Read permission, group  group_write 020 S_IWGRP Write permission, group  group_exec 010 S_IXGRP Execute/search permission, group group_all 070 S_IRWXG Read, write, execute/search by group; group_read | group_write | group_exec others_read 04 S_IROTH Read permission, others others_write 02 S_IWOTH Write permission, others others_exec 01 S_IXOTH Execute/search permission, others others_all 07 S_IRWXO Read, write, execute/search by others; others_read | others_write | others_exec  all 0777 owner_all | group_all | others_all set_uid 04000 S_ISUID Set-user-ID on execution set_gid 02000 S_ISGID Set-group-ID on execution  sticky_bit 01000 S_ISVTX Operating system dependent. mask 07777 all | set_uid | set_gid | sticky_bit unknown 0xFFFF The permissions are not known, such as when a file_- status object is created without specifying the per-missions
//   31.12.8.5 Enum class perm_options [fs.enum.perm.opts]
//   The enum class type perm_options is a bitmask type (16.3.3.3.4) that specifies bitmask constants used to control the semantics of permissions operations, with the meanings listed in Table 130. The bitmask constants are bitmask elements. In Table 130 perm denotes a value of type perms passed to permissions.
//  Table 130: Enum class perm_options [tab:fs.enum.perm.opts]  Name Meaning   replace permissions shall replace the file’s permission bits with perm add permissions shall replace the file’s permission bits with the bitwise OR of perm and the file’s current permission bits. remove permissions shall replace the file’s permission bits with the bitwise AND of the complement of perm and the file’s current permission bits. nofollow permissions shall change the permissions of a symbolic link itself rather than the permissions of the file the link resolves to.
//  31.12.8.6 Enum class directory_options [fs.enum.dir.opts]
//  The enum class type directory_options is a bitmask type (16.3.3.3.4) that specifies bitmask constants used to identify directory traversal options, with the meanings listed in Table 131. The constant none represents the empty bitmask; every other constant in the table represents a distinct bitmask element.
// Postconditions: type() == ft and permissions() == prms.
// 31.12.9.3 Observers [fs.file.status.obs]
file_type type() const noexcept;
// Table 131: Enum class directory_options [tab:fs.enum.dir.opts]  Name Meaning  none (Default) Skip directory symlinks, permission de- nied is an error. follow_directory_symlink Follow rather than skip directory symlinks.  skip_permission_denied Skip directories that would otherwise result in per- mission denied.
//  31.12.9 Class file_status [fs.class.file.status]
// 31.12.9.1 General[fs.class.file.status.general]
namespace std::filesystem {
class file_status {
public:
// 31.12.9.2, constructors and destructor
    file_status() noexcept : file_status(file_type::none) {} explicit file_status(file_type ft,
            perms prms = perms::unknown) noexcept;
    file_status(const file_status&) noexcept = default;
    file_status(file_status&&) noexcept = default;
    ~file_status();
// assignments
    file_status& operator=(const file_status&) noexcept = default;
    file_status& operator=(file_status&&) noexcept = default;
// 31.12.9.4, modifiers
    void type(file_type ft) noexcept;
    void permissions(perms prms) noexcept;
// 31.12.9.3, observers
    file_type type() const noexcept;
    perms permissions() const noexcept;
    friend bool operator==(const file_status& lhs, const file_status& rhs) noexcept
    {
        return lhs.type() == rhs.type() && lhs.permissions() == rhs.permissions();
    }
};
}
//  An object of type file_status stores information about the type and permissions of a file.
// 31.12.9.2 Constructors [fs.file.status.cons]
explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
// Returns: The value of type() specified by the postconditions of the most recent call to a constructor, operator=, or type(file_type) function.
perms permissions() const noexcept;
// Returns: The value of permissions() specified by the postconditions of the most recent call to a constructor, operator=, or permissions(perms) function.
// 31.12.9.4 Modifiers [fs.file.status.mods]
void type(file_type ft) noexcept;
// Postconditions: type() == ft.
void permissions(perms prms) noexcept;
// Postconditions: permissions() == prms.
// 31.12.10 Class directory_entry[fs,ckass,durectirt,ebtrt]
// 31.12.10.1 General[fs,ckass,durectirt,ebtrt,geberak]
namespace std::filesystem {
class directory_entry {
public:
// 31.12.10.2, constructors and destructor
    directory_entry() noexcept = default;
    directory_entry(const directory_entry&) = default;
    directory_entry(directory_entry&&) noexcept = default;
    explicit directory_entry(const filesystem::path& p);
    directory_entry(const filesystem::path& p, error_code& ec);
    ~directory_entry();
// assignments
    directory_entry& operator=(const directory_entry&) = default;
    directory_entry& operator=(directory_entry&&) noexcept = default;
// 31.12.10.3, modifiers
    void assign(const filesystem::path& p);
    void assign(const filesystem::path& p, error_code& ec);
    void replace_filename(const filesystem::path& p);
    void replace_filename(const filesystem::path& p, error_code& ec);
    void refresh();
    void refresh(error_code& ec) noexcept;
// 31.12.10.4, observers
    const filesystem::path& path() const noexcept;
    operator const filesystem::path&() const noexcept;
    bool exists() const;
    bool exists(error_code& ec) const noexcept;
    bool is_block_file() const;
    bool is_block_file(error_code& ec) const noexcept;
    bool is_character_file() const;
    bool is_character_file(error_code& ec) const noexcept;
    bool is_directory() const;
    bool is_directory(error_code& ec) const noexcept;
    bool is_fifo() const;
    bool is_fifo(error_code& ec) const noexcept;
    bool is_other() const;
    bool is_other(error_code& ec) const noexcept;
    bool is_regular_file() const;
    bool is_regular_file(error_code& ec) const noexcept;
    bool is_socket() const;
    bool is_socket(error_code& ec) const noexcept;
    bool is_symlink() const;
    bool is_symlink(error_code& ec) const noexcept;
    uintmax_t file_size() const;
    uintmax_t file_size(error_code& ec) const noexcept;
    uintmax_t hard_link_count() const;
    uintmax_t hard_link_count(error_code& ec) const noexcept;
    file_time_type last_write_time() const;
    file_time_type last_write_time(error_code& ec) const noexcept;
    file_status status() const;
    file_status status(error_code& ec) const noexcept;
    file_status symlink_status() const;
    file_status symlink_status(error_code& ec) const noexcept;
    bool operator==(const directory_entry& rhs) const noexcept;
    strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
// Effects: Calls refresh() or refresh(ec), respectively.
// Postconditions: path() == p if no error occurs, otherwise path() == filesystem::path(). Throws: As specified in 31.12.5.
// 31.12.10.5, inserter
    template<class charT, class traits>
    friend basic_ostream<charT, traits>&
    operator<<(basic_ostream<charT, traits>& os, const directory_entry& d);
private:
    filesystem::path pathobject; // exposition only friend class directory_iterator; // exposition only
};
}
//  A directory_entry object stores a path object and may store additional objects for file attributes such as hard link count, status, symlink status, file size, and last write time.
//  Implementations should store such additional file attributes during directory iteration if their values are avail- able and storing the values would allow the implementation to eliminate file system accesses by directory_- entry observer functions (31.12.13). Such stored file attribute values are said to be cached.
//  [Note 1: For purposes of exposition, class directory_iterator (31.12.11) is shown above as a friend of class directory_entry. Friendship allows the directory_iterator implementation to cache already available attribute values directly into a directory_entry object without the cost of an unneeded call to refresh().
//  [Example 1 :
using namespace std::filesystem;
// use possibly cached last write time to minimize disk accesses
for (auto&& x : directory_iterator("."))
{
    std::cout << x.path() << " " << x.last_write_time() << std::endl;
}
// call refresh() to refresh a stale cache
for (auto&& x : directory_iterator(".")) {
    lengthy_function(x.path()); // cache becomes stale
    x.refresh();
    std::cout << x.path() << " " << x.last_write_time() << std::endl;
}
// On implementations that do not cache the last write time, both loops will result in a potentially expensive call to the std::filesystem::last_write_time function. On implementations that do cache the last write time, the first loop will use the cached value and so will not result in a potentially expensive call to the std::filesystem::last_write_- time function. The code is portable to any implementation, regardless of whether or not it employs caching.
// 31.12.10.2 Constructors [fs.dir.entry.cons]
explicit directory_entry(const filesystem::path& p);
directory_entry(const filesystem::path& p, error_code& ec);
// 31.12.10.3 Modifiers [fs.dir.entry.mods]
void assign(const filesystem::path& p);
void assign(const filesystem::path& p, error_code& ec);
// Effects: Equivalent to pathobject = p, then refresh() or refresh(ec), respectively. If an error occurs, the values of any cached attributes are unspecified.
// Throws: As specified in 31.12.5.
void replace_filename(const filesystem::path& p);
// Returns: exists(this->status()) or exists(this->status(ec)), respectively. Throws: As specified in 31.12.5.
void replace_filename(const filesystem::path& p, error_code& ec);
//  Unqualified function names in the Returns: elements of the directory_entry observers described below refer to members of the std::filesystem namespace.
const filesystem::path& path() const noexcept;
operator const filesystem::path&() const noexcept;
// Returns: pathobject. bool exists() const;
bool exists(error_code& ec) const noexcept;
// Effects: Equivalent to pathobject.replace_filename(p), then refresh() or refresh(ec), respec- tively. If an error occurs, the values of any cached attributes are unspecified.
// Throws: As specified in 31.12.5. void refresh();
void refresh(error_code& ec) noexcept;
// Effects: Stores the current values of any cached attributes of the file p resolves to. If an error occurs, an error is reported (31.12.5) and the values of any cached attributes are unspecified.
// Throws: As specified in 31.12.5.
// [Note 1: Implementations of directory_iterator (31.12.11) are prohibited from directly or indirectly calling
the refresh function as described in 31.12.11.1.
// 31.12.10.4 Observers [fs.dir.entry.obs]
bool is_block_file() const;
bool is_block_file(error_code& ec) const noexcept;
// Returns: is_block_file(this->status()) or is_block_file(this->status(ec)), respectively. Throws: As specified in 31.12.5.
bool is_character_file() const;
bool is_character_file(error_code& ec) const noexcept;
// Returns: is_character_file(this->status()) or is_character_file(this->status(ec)), respec- tively.
// Throws: As specified in 31.12.5.
bool is_directory() const;
bool is_directory(error_code& ec) const noexcept;
// Returns: is_directory(this->status()) or is_directory(this->status(ec)), respectively. Throws: As specified in 31.12.5.
bool is_fifo() const;
bool is_fifo(error_code& ec) const noexcept;
// Returns: is_fifo(this->status()) or is_fifo(this->status(ec)), respectively. Throws: As specified in 31.12.5.
bool is_other() const;
bool is_other(error_code& ec) const noexcept;
// Returns: is_other(this->status()) or is_other(this->status(ec)), respectively. Throws: As specified in 31.12.5.
bool is_regular_file() const;
bool is_regular_file(error_code& ec) const noexcept;
// Returns: is_regular_file(this->status()) or is_regular_file(this->status(ec)), respective- ly.
// Throws: As specified in 31.12.5.
bool is_socket() const;
bool is_socket(error_code& ec) const noexcept;
// Returns: is_socket(this->status()) or is_socket(this->status(ec)), respectively. Throws: As specified in 31.12.5.
bool is_symlink() const;
bool is_symlink(error_code& ec) const noexcept;
// Returns: is_symlink(this->symlink_status()) or is_symlink(this->symlink_status(ec)), re- spectively.
// Throws: As specified in 31.12.5. uintmax_t file_size() const;
uintmax_t file_size(error_code& ec) const noexcept;
// Returns: If cached, the file size attribute value. Otherwise, file_size(path()) or file_size(path(), ec), respectively.
// Throws: As specified in 31.12.5.
uintmax_t hard_link_count() const;
uintmax_t hard_link_count(error_code& ec) const noexcept;
// Returns: If cached, the hard link count attribute value. Otherwise, hard_link_count(path()) or hard_link_count(path(), ec), respectively.
// Throws: As specified in 31.12.5.
file_time_type last_write_time() const;
file_time_type last_write_time(error_code& ec) const noexcept;
// Returns: If cached, the last write time attribute value. Otherwise, last_write_time(path()) or last_write_time(path(), ec), respectively.
// Throws: As specified in 31.12.5.
file_status status() const;
file_status status(error_code& ec) const noexcept;
// Returns: If cached, the status attribute value. Otherwise, status(path()) or status(path(), ec), respectively.
// Throws: As specified in 31.12.5.
file_status symlink_status() const;
file_status symlink_status(error_code& ec) const noexcept;
// Returns: If cached, the symlink status attribute value. Otherwise, symlink_status(path()) or symlink_status(path(), ec), respectively.
// Throws: As specified in 31.12.5.
bool operator==(const directory_entry& rhs) const noexcept;
// Returns: pathobject == rhs.pathobject.
strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
// Returns: pathobject <=> rhs.pathobject.
// 31.12.10.5 Inserter [fs.dir.entry.io]
template<class charT, class traits>
friend basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const directory_entry& d);
// Effects: Equivalent to:
return os << d.path();
// 31.12.11 Class directory_iterator [fs.class.directory.iterator]
// 31.12.11.1 General [fs.class.directory.iterator.general]
//  An object of type directory_iterator provides an iterator for a sequence of directory_entry elements representing the path and any cached attribute values (31.12.10) for each file in a directory or in an implementation-defined directory-like file type.
// [Note 1: For iteration into sub-directories, see class recursive_directory_iterator (31.12.12).
namespace std::filesystem {
class directory_iterator {
public:
    using iterator_category = input_iterator_tag;
    using value_type = directory_entry;
    using difference_type = ptrdiff_t;
    using pointer = const directory_entry*;
    using reference = const directory_entry&;
// 31.12.11.2, member functions
    directory_iterator() noexcept;
    explicit directory_iterator(const path& p);
    directory_iterator(const path& p, directory_options options);
    directory_iterator(const path& p, error_code& ec);
    directory_iterator(const path& p, directory_options options,
                       error_code& ec);
    directory_iterator(const directory_iterator& rhs);
    directory_iterator(directory_iterator&& rhs) noexcept;
    ~directory_iterator();
    directory_iterator& operator=(const directory_iterator& rhs);
    directory_iterator& operator=(directory_iterator&& rhs) noexcept;
    const directory_entry& operator*() const;
    const directory_entry* operator->() const;
    directory_iterator&    operator++();
    directory_iterator&    increment(error_code& ec);
// other members as required by 25.3.5.3, input iterators
};
}
//  directory_iterator meets the Cpp17InputIterator requirements (25.3.5.3).
//  If an iterator of type directory_iterator reports an error or is advanced past the last directory element, that iterator shall become equal to the end iterator value. The directory_iterator default constructor shall create an iterator equal to the end iterator value, and this shall be the only valid iterator for the end condition.
//  The end iterator is not dereferenceable.
//  Two end iterators are always equal. An end iterator shall not be equal to a non-end iterator.
//  The result of calling the path() member of the directory_entry object obtained by dereferencing a directory_iterator is a reference to a path object composed of the directory argument from which the iterator was constructed with the filename of the directory entry appended as if by operator/=.
//  Directory iteration shall not yield directory entries for the current (dot) and parent (dot-dot) directories.
//  The order of directory entries obtained by dereferencing successive increments of a directory_iterator is unspecified.
// Constructors and non-const directory_iterator member functions store the values of any cached at- tributes (31.12.10) in the directory_entry element returned by operator*(). directory_iterator mem- ber functions shall not directly or indirectly call any directory_entry refresh function.
// [Note 2: The exact mechanism for storing cached attribute values is not exposed to users. For exposition, class directory_iterator is shown in 31.12.10 as a friend of class directory_entry.
// Returns: directory_iterator().
// 31.12.12 Class recursive_directory_iterator [fs.class.rec.dir.itr]
// 31.12.12.1 General [fs.class.rec.dir.itr.general]
//  [Note 3: A path obtained by dereferencing a directory iterator might not actually exist; it could be a symbolic link to a non-existent file. Recursively walking directory trees for purposes of removing and renaming entries might invalidate symbolic links that are being followed.
// [Note 4: If a file is removed from or added to a directory after the construction of a directory_iterator for the directory, it is unspecified whether or not subsequently incrementing the iterator will ever result in an iterator referencing the removed or added directory entry. See POSIX readdir.
// 31.12.11.2 Members [fs.dir.itr.members]
directory_iterator() noexcept;
//  These functions enable range access for directory_iterator. directory_iterator begin(directory_iterator iter) noexcept;
// Returns: iter.
directory_iterator end(directory_iterator) noexcept;
// Effects: Constructs the end iterator.
explicit directory_iterator(const path& p);
directory_iterator(const path& p, directory_options options);
directory_iterator(const path& p, error_code& ec);
directory_iterator(const path& p, directory_options options, error_code& ec);
// Effects: For the directory that p resolves to, constructs an iterator for the first element in a sequence of directory_entry elements representing the files in the directory, if any; otherwise the end iterator. However, if
(options & directory_options::skip_permission_denied) != directory_options::none
// and construction encounters an error indicating that permission to access p is denied, constructs the end iterator and does not report an error.
// Throws: As specified in 31.12.5.
// [Note 1: To iterate over the current directory, use directory_iterator(".") rather than directory_-
iterator(""). end note] directory_iterator(const directory_iterator& rhs);
directory_iterator(directory_iterator&& rhs) noexcept;
// Postconditions: *this has the original value of rhs. directory_iterator& operator=(const directory_iterator& rhs);
directory_iterator& operator=(directory_iterator&& rhs) noexcept;
// Effects: If *this and rhs are the same object, the member has no effect. Postconditions: *this has the original value of rhs.
// Returns: *this.
directory_iterator& operator++();
directory_iterator& increment(error_code& ec);
// Effects: As specified for the prefix increment operation of Input iterators (25.3.5.3). Returns: *this.
// Throws: As specified in 31.12.5.
// 31.12.11.3 Non-member functions [fs.dir.itr.nonmembers]
//  An object of type recursive_directory_iterator provides an iterator for a sequence of directory_entry elements representing the files in a directory or in an implementation-defined directory-like file type, and its sub-directories.
// Effects: Constructs the end iterator.
namespace std::filesystem {
class recursive_directory_iterator {
public:
    using iterator_category = input_iterator_tag;
    using value_type = directory_entry;
    using difference_type = ptrdiff_t;
    using pointer = const directory_entry*;
    using reference = const directory_entry&;
// 31.12.12.2, constructors and destructor
    recursive_directory_iterator() noexcept;
    explicit recursive_directory_iterator(const path& p);
    recursive_directory_iterator(const path& p, directory_options options);
    recursive_directory_iterator(const path& p, directory_options options,
                                 error_code& ec);
    recursive_directory_iterator(const path& p, error_code& ec);
    recursive_directory_iterator(const recursive_directory_iterator& rhs);
    recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
    ~recursive_directory_iterator();
// 31.12.12.2, observers
    directory_options options() const;
    int depth() const;
    bool recursion_pending() const;
    const directory_entry& operator*() const;
    const directory_entry* operator->() const;
// 31.12.12.2, modifiers recursive_directory_iterator&
    operator=(const recursive_directory_iterator& rhs);
    recursive_directory_iterator&
    operator=(recursive_directory_iterator&& rhs) noexcept;
    recursive_directory_iterator& operator++();
    recursive_directory_iterator& increment(error_code& ec);
    void pop();
    void pop(error_code& ec);
    void disable_recursion_pending();
// other members as required by 25.3.5.3, input iterators
};
}
// Calling options, depth, recursion_pending, pop or disable_recursion_pending on an iterator that is not dereferenceable results in undefined behavior.
//  The behavior of a recursive_directory_iterator is the same as a directory_iterator unless otherwise specified.
//  [Note 1: If the directory structure being iterated over contains cycles then it is possible that the end iterator is unreachable.
// 31.12.12.2 Members [fs.rec.dir.itr.members]
recursive_directory_iterator() noexcept;
explicit recursive_directory_iterator(const path& p);
recursive_directory_iterator(const path& p, directory_options options);
recursive_directory_iterator(const path& p, directory_options options, error_code& ec);
recursive_directory_iterator(const path& p, error_code& ec);
// Effects: Constructs an iterator representing the first entry in the directory to which p resolves, if any; otherwise, the end iterator. However, if (options & directory_options::skip_permission_denied) != directory_options::none and construction encounters an error indicating that permission to access p is denied, constructs the end iterator and does not report an error.
// Postconditions: options() == options for the signatures with a directory_options argument, otherwise options() == directory_options::none.
// Throws: As specified in 31.12.5.
// [Note 1: Use recursive_directory_iterator(".") rather than recursive_directory_iterator("") to iter-ate over the current directory.
// [Note 2: By default, recursive_directory_iterator does not follow directory symlinks. To follow directory
symlinks, specify options as directory_options::follow_directory_symlink. end note]
recursive_directory_iterator(const recursive_directory_iterator& rhs);
// Postconditions:— options() == rhs.options()
// — depth() == rhs.depth()
// — recursion_pending() == rhs.recursion_pending()
recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
// Postconditions: options(), depth(), and recursion_pending() have the values that rhs.options(), rhs.depth(), and rhs.recursion_pending(), respectively, had before the function call.
recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
// Effects: If *this and rhs are the same object, the member has no effect. Postconditions:
// — options() == rhs.options()
// — depth() == rhs.depth()
// — recursion_pending() == rhs.recursion_pending()
// Returns: *this.
recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noexcept;
// Effects: If *this and rhs are the same object, the member has no effect.
// Postconditions: options(), depth(), and recursion_pending() have the values that rhs.options(),rhs.depth(), and rhs.recursion_pending(), respectively, had before the function call. Returns: *this.
directory_options options() const;
// Returns: The value of the argument passed to the constructor for the options parameter, if present, otherwise directory_options::none.
// Throws: Nothing.
int depth() const;
// Returns: The current depth of the directory tree being traversed.
// [Note 3: The initial directory is depth 0, its immediate subdirectories are depth 1, and so forth.
// Throws: Nothing.
bool recursion_pending() const;
// Returns: true if disable_recursion_pending() has not been called subsequent to the prior construc- tion or increment operation, otherwise false.
// Throws: Nothing.
recursive_directory_iterator& operator++();
// Returns: iter.
recursive_directory_iterator end(recursive_directory_iterator) noexcept;
// Effects: Composes an absolute path referencing the same file system location as p according to the operating system (31.12.2.3).
// Returns: The composed path. The signature with argument ec returns path() if an error occurs.
// [Note 1: For the returned path, rp, rp.is_absolute() is true unless an error occurs.
// Throws: As specified in 31.12.5.
// [Note 2: To resolve symlinks or perform other sanitization that can involve queries to secondary storage, such as hard disks, consider canonical (31.12.13.3).
recursive_directory_iterator& increment(error_code& ec);
// Effects: As specified for the prefix increment operation of Input iterators (25.3.5.3), except that:
// — If there are no more entries at the current depth, then if depth() != 0 iteration over the parent
// directory resumes; otherwise *this = recursive_directory_iterator(). — Otherwise if
recursion_pending() && is_directory((*this)->status()) &&
(!is_symlink((*this)->symlink_status()) ||
 (options() & directory_options::follow_directory_symlink) != directory_options::none)
// then either directory (*this)->path() is recursively iterated into or, if
(options() & directory_options::skip_permission_denied) != directory_options::none
// and an error occurs indicating that permission to access directory (*this)->path() is denied, then directory (*this)->path() is treated as an empty directory and no error is reported.
// Returns: *this.
// Throws: As specified in 31.12.5.
void pop();
void pop(error_code& ec);
// Effects: If depth() == 0, set *this to recursive_directory_iterator(). Otherwise, cease iteration of the directory currently being iterated over, and continue iteration over the parent directory.
//  Remarks: Any copies of the previous value of *this are no longer required to be dereferenceable nor to be in
// Throws: As specified in 31.12.5. the domain of ==.
void disable_recursion_pending();
// Postconditions: recursion_pending() == false.
// [Note 4: disable_recursion_pending() is used to prevent unwanted recursion into a directory.
//  These functions enable use of recursive_directory_iterator with range-based for statements. recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept;
// 31.12.12.3 Non-member functions [fs.rec.dir.itr.nonmembers]
// Returns: recursive_directory_iterator().
// 31.12.13 Filesystem operation functions [fs.op.funcs]
// 31.12.13.1 General [fs.op.funcs.general]
//  Filesystem operation functions query or modify files, including directories, in external storage.
//  [Note 1: Because hardware failures, network failures, file system races (31.12.2.4), and many other kinds of errors occur frequently in file system operations, any filesystem operation function, no matter how apparently innocuous, can encounter an error; see 31.12.5. —end note]
// 31.12.13.2 Absolute [fs.op.absolute]
path filesystem::absolute(const path& p);
path filesystem::absolute(const path& p, error_code& ec);
// [Note 3 : Implementations are strongly encouraged to not query secondary storage, and not consider !exists(p) an error.
// [Example 1: For POSIX-based operating systems, absolute(p) is simply current_path()/p. For Windows- based operating systems, absolute might have the same semantics as GetFullPathNameW.
// 31.12.13.3 Canonical [fs.op.canonical]
path filesystem::canonical(const path& p);
path filesystem::canonical(const path& p, error_code& ec);
// Effects: Converts p to an absolute path that has no symbolic link, dot, or dot-dot elements in its pathname in the generic format.
// Returns: A path that refers to the same file system object as absolute(p). The signature with argument ec returns path() if an error occurs.
// Throws: As specified in 31.12.5. Remarks: !exists(p) is an error.
// 31.12.13.4 Copy [fs.op.copy]
void filesystem::copy(const path& from, const path& to);
// Effects: Equivalent to copy(from, to, copy_options::none).
void filesystem::copy(const path& from, const path& to, error_code& ec);
// Effects: Equivalent to copy(from, to, copy_options::none, ec).
void filesystem::copy(const path& from, const path& to, copy_options options);
void filesystem::copy(const path& from, const path& to, copy_options options, error_code& ec);
// Preconditions: At most one element from each option group (31.12.8.3) is set in options. Effects: Before the first use of f and t:
// — If then auto f = symlink_status(from) and if needed auto t = symlink_status(to).
// — Otherwise, if
(options & copy_options::copy_symlinks) != copy_options::none
// then auto f = symlink_status(from) and if needed auto t = status(to).
// — Otherwise, auto f = status(from) and if needed auto t = status(to).
// Effects are then as follows:
// — If f.type() or t.type() is an implementation-defined file type (31.12.8.2), then the effects are implementation-defined.
// — Otherwise, an error is reported as specified in 31.12.5 if: — exists(f) is false, or
// — equivalent(from, to) is true, or
// — is_other(f) || is_other(t) is true, or
// — is_directory(f) && is_regular_file(t) is true.
// — Otherwise, if is_symlink(f), then:
// — If (options & copy_options::skip_symlinks) != copy_options::none then return.
// — Otherwise if
!exists(t) && (options & copy_options::copy_symlinks) != copy_options::none
// then copy_symlink(from, to).
// — Otherwise report an error as specified in 31.12.5.
(options & copy_options::create_symlinks) != copy_options::none ||
(options & copy_options::skip_symlinks) != copy_options::none
// — Otherwise, if is_regular_file(f), then:
// — If (options & copy_options::directories_only) != copy_options::none, then return.
// — Otherwise, if (options & copy_options::create_symlinks) != copy_options::none, then create a symbolic link to the source file.
// — Otherwise, if (options & copy_options::create_hard_links) != copy_options::none, then create a hard link to the source file.
// — Otherwise, if is_directory(t), then copy_file(from, to/from.filename(), options).
// — Otherwise, copy_file(from, to, options).
// — Otherwise, if
is_directory(f) &&    (options & copy_options::create_symlinks) != copy_options::none
// then report an error with an error_code argument equal to make_error_code(errc::is_a_- directory).
// — Otherwise, if
is_directory(f) &&
((options & copy_options::recursive) != copy_options::none ||
 options == copy_options::none)
// then: — If exists(t) is false, then create_directory(to, from).
// — Then, iterate over the files in from, as if by
for (const directory_entry& x : directory_iterator(from))
copy(x.path(), to/x.path().filename(),
     options | copy_options::in-recursive-copy);
// where in-recursive-copy is a bitmask element of copy_options that is not one of the elements in 31.12.8.3.
// — Otherwise, for the signature with argument ec, ec.clear().
// — Otherwise, no effects.
// Throws: As specified in 31.12.5.
// Remarks: For the signature with argument ec, any library functions called by the implementation shall
// have an error_code argument if applicable. [Example 1: Given this directory structure: /dir1 file1 file2 dir2 file3
// Calling copy("/dir1", "/dir3") would result in: /dir1 file1 file2 dir2 file3 /dir3 file1 file2
// Alternatively, calling copy("/dir1", "/dir3", copy_options::recursive) would result in: /dir1 file1 file2 dir2 file3 /dir3
bool filesystem::copy_file(const path& from, const path& to, copy_options options);
bool filesystem::copy_file(const path& from, const path& to, copy_options options,error_code& ec);
//         file1 file2  dir2 file3
// 31.12.13.5 Copy file [fs.op.copy.file]
bool filesystem::copy_file(const path& from, const path& to);
bool filesystem::copy_file(const path& from, const path& to, error_code& ec);
// Returns: copy_file(from, to, copy_options::none) or copy_file(from, to, copy_options::none, ec), respectively.
// [fs.op.copy.file]Throws: As specified in 31.12.5.
// Preconditions: At most one element from each option group (31.12.8.3) is set in options. Effects: As follows:
// — Report an error as specified in 31.12.5 if:
// — is_regular_file(from) is false, or
// — exists(to) is true and is_regular_file(to) is false, or // — exists(to) is true and equivalent(from, to) is true, or — exists(to) is true and
(options & (copy_options::skip_existing |
            copy_options::overwrite_existing |
            copy_options::update_existing)) == copy_options::none
// — Otherwise, copy the contents and attributes of the file from resolves to, to the file to resolves to, if:
// — exists(to) is false, or
// — (options & copy_options::overwrite_existing) != copy_options::none, or
// — (options & copy_options::update_existing) != copy_options::none and from is more recent than to, determined as if by use of the last_write_time function (31.12.13.26).
// — Otherwise, no effects.
// Returns: true if the from file was copied, otherwise false. The signature with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// Complexity: At most one direct or indirect invocation of status(to).
// 31.12.13.6 Copy symlink [fs.op.copy.symlink]
void filesystem::copy_symlink(const path& existing_symlink, const path& new_symlink);
void filesystem::copy_symlink(const path& existing_symlink, const path& new_symlink,
                              error_code& ec) noexcept;
// Effects: Equivalent to function (read_symlink(existing_symlink), new_symlink) or function (read_symlink(existing_symlink, ec), new_symlink, ec), respectively, where in each case function is create_symlink or create_directory_symlink as appropriate.
// Throws: As specified in 31.12.5.
// 31.12.13.7 Create directories [fs.op.create.directories]
bool filesystem::create_directories(const path& p);
bool filesystem::create_directories(const path& p, error_code& ec);
// Effects: Calls create_directory() for each element of p that does not exist.
// Returns: true if a new directory was created for the directory p resolves to, otherwise false. Throws: As specified in 31.12.5.
// Complexity: O(n) where n is the number of elements of p.
// 31.12.13.8 Create directory [fs.op.create.directory]
bool filesystem::create_directory(const path& p);
bool filesystem::create_directory(const path& p, error_code& ec) noexcept;
// Effects: Creates the directory p resolves to, as if by POSIX mkdir with a second argument of static_- cast<int>(perms::all). If mkdir fails because p resolves to an existing directory, no error is reported. Otherwise on failure an error is reported.
// Returns: true if a new directory was created, otherwise false. Throws: As specified in 31.12.5.
bool filesystem::create_directory(const path& p, const path& existing_p);
bool filesystem::create_directory(const path& p, const path& existing_p, error_code& ec) noexcept;
// Effects: Creates the directory p resolves to, with attributes copied from directory existing_p. The set of attributes copied is operating system dependent. If mkdir fails because p resolves to an existing directory, no error is reported. Otherwise on failure an error is reported.
// [Note 1: For POSIX-based operating systems, the attributes are those copied by native API stat(existing_- p.c_str(), &attributes_stat) followed by mkdir(p.c_str(), attributes_stat.st_mode). For Windows- based operating systems, the attributes are those copied by native API CreateDirectoryExW(existing_p.c_- str(), p.c_str(), 0).
// Returns: true if a new directory was created with attributes copied from directory existing_p, otherwise false.
// Throws: As specified in 31.12.5.
// 31.12.13.9 Create directory symlink [fs.op.create.dir.symlk]
void filesystem::create_directory_symlink(const path& to, const path& new_symlink);
void filesystem::create_directory_symlink(const path& to, const path& new_symlink,
        error_code& ec) noexcept;
// Effects: Establishes the postcondition, as if by POSIX symlink().
// Postconditions: new_symlink resolves to a symbolic link file that contains an unspecified representation of to.
// Throws: As specified in 31.12.5.
// [Note 1: Some operating systems require symlink creation to identify that the link is to a directory. Thus, create_symlink() (instead of create_directory_symlink()) cannot be used reliably to create directory symlinks.
// [Note 2: Some operating systems do not support symbolic links at all or support them only for regular files. Some file systems (such as the FAT file system) do not support symbolic links regardless of the operating system.
// 31.12.13.10 Create hard link [fs.op.create.hard.lk]
void filesystem::create_hard_link(const path& to, const path& new_hard_link);
void filesystem::create_hard_link(const path& to, const path& new_hard_link,
                                  error_code& ec) noexcept;
// Effects: Establishes the postcondition, as if by POSIX link(). Postconditions:
// — exists(to) && exists(new_hard_link) && equivalent(to, new_hard_link)
// — The contents of the file or directory to resolves to are unchanged.
// Throws: As specified in 31.12.5.
// [Note 1: Some operating systems do not support hard links at all or support them only for regular files. Some file systems (such as the FAT file system) do not support hard links regardless of the operating system. Some file systems limit the number of links per file.
// Effects: Establishes the postcondition, as if by POSIX symlink().
// Postconditions: new_symlink resolves to a symbolic link file that contains an unspecified representation of to.
// Throws: As specified in 31.12.5.
// [Note 1: Some operating systems do not support symbolic links at all or support them only for regular files. Some file systems (such as the FAT file system) do not support symbolic links regardless of the operating system.
// 31.12.13.11 Create symlink [fs.op.create.symlink]
void filesystem::create_symlink(const path& to, const path& new_symlink);
void filesystem::create_symlink(const path& to, const path& new_symlink, error_code& ec) noexcept;
// 31.12.13.12 Current path [fs.op.current.path]
path filesystem::current_path();
path filesystem::current_path(error_code& ec);
// Returns: The absolute path of the current working directory, whose pathname in the native format is obtained as if by POSIX getcwd(). The signature with argument ec returns path() if an error occurs.
// Throws: As specified in 31.12.5.
// Remarks: The current working directory is the directory, associated with the process, that is used as the starting location in pathname resolution for relative paths.
// [Note 1: The current_path() name was chosen to emphasize that the returned value is a path, not just a single directory name.
// [Note 2: The current path as returned by many operating systems is a dangerous global variable and can be changed unexpectedly by third-party or system library functions, or by another thread.
void filesystem::current_path(const path& p);
void filesystem::current_path(const path& p, error_code& ec) noexcept;
// Effects: Establishes the postcondition, as if by POSIX chdir().
// Postconditions: equivalent(p, current_path()).
// Throws: As specified in 31.12.5.
// [Note 3: The current path for many operating systems is a dangerous global state and can be changed unexpectedly by third-party or system library functions, or by another thread.
// 31.12.13.13 Equivalent [fs.op.equivalent]
bool filesystem::equivalent(const path& p1, const path& p2);
bool filesystem::equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
// Two paths are considered to resolve to the same file system entity if two candidate entities reside on the same device at the same location.
// [Note 1: On POSIX platforms, this is determined as if by the values of the POSIX stat class, obtained as if by stat() for the two paths, having equal st_dev values and equal st_ino values.
// Returns: true, if p1 and p2 resolve to the same file system entity, otherwise false. The signature with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// Remarks: !exists(p1) || !exists(p2) is an error.
// 31.12.13.14 Exists [fs.op.exists]
bool filesystem::exists(file_status s) noexcept;
// Returns: status_known(s) && s.type() != file_type::not_found.
bool filesystem::exists(const path& p);
bool filesystem::exists(const path& p, error_code& ec) noexcept;
// Let s be a file_status, determined as if by status(p) or status(p, ec), respectively.
// Effects: The signature with argument ec calls ec.clear() if status_known(s). Returns: exists(s).
// Throws: As specified in 31.12.5.
// 31.12.13.15 File size [fs.op.file.size]
uintmax_t filesystem::file_size(const path& p);
uintmax_t filesystem::file_size(const path& p, error_code& ec) noexcept;
// Effects: If exists(p) is false, an error is reported (31.12.5). Returns:
// — If is_regular_file(p), the size in bytes of the file p resolves to, determined as if by the value of the POSIX stat class member st_size obtained as if by POSIX stat().
// — Otherwise, the result is implementation-defined. The signature with argument ec returns static_cast<uintmax_t>(-1) if an error occurs. Throws: As specified in 31.12.5.
// 31.12.13.16 Hard link count [fs.op.hard.lk.ct]
uintmax_t filesystem::hard_link_count(const path& p);
uintmax_t filesystem::hard_link_count(const path& p, error_code& ec) noexcept;
// Returns: The number of hard links for p. The signature with argument ec returns static_- cast<uintmax_t>(-1) if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.17 Is block file [fs.op.is.block.file]
bool filesystem::is_block_file(file_status s) noexcept;
// Returns: s.type() == file_type::block.
bool filesystem::is_block_file(const path& p);
bool filesystem::is_block_file(const path& p, error_code& ec) noexcept;
// Returns: is_block_file(status(p)) or is_block_file(status(p, ec)), respectively. The signa- ture with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.18 Is character file [fs.op.is.char.file]
bool filesystem::is_character_file(file_status s) noexcept;
// Returns: s.type() == file_type::character.
bool filesystem::is_character_file(const path& p);
bool filesystem::is_character_file(const path& p, error_code& ec) noexcept;
// Returns: is_character_file(status(p)) or is_character_file(status(p, ec)), respectively. The signature with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.19 Is directory [fs.op.is.directory]
bool filesystem::is_directory(file_status s) noexcept;
// Returns: s.type() == file_type::directory. bool filesystem::is_directory(const path& p);
bool filesystem::is_directory(const path& p, error_code& ec) noexcept;
// Returns: is_directory(status(p)) or is_directory(status(p, ec)), respectively. The signature with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// Effects: — Determine file_status s, as if by status(p) or status(p, ec), respectively. — For the signature with argument ec, return false if an error occurred.
// — Otherwise, if is_directory(s):
// — Create a variable itr, as if by directory_iterator itr(p) or directory_iterator itr(p, ec), respectively.
// — For the signature with argument ec, return false if an error occurred.
// — Otherwise, return itr == directory_iterator(). — Otherwise:
// — Determine uintmax_t sz, as if by file_size(p) or file_size(p, ec), respectively.
// — For the signature with argument ec, return false if an error occurred.
// — Otherwise, return sz == 0.
// Throws: As specified in 31.12.5.
// 31.12.13.21 Is fifo [fs.op.is.fifo]
bool filesystem::is_fifo(file_status s) noexcept;
// Returns: s.type() == file_type::fifo.
bool filesystem::is_fifo(const path& p);
bool filesystem::is_fifo(const path& p, error_code& ec) noexcept;
// 31.12.13.20 Is empty [fs.op.is.empty]
bool filesystem::is_empty(const path& p);
bool filesystem::is_empty(const path& p, error_code& ec);
// Returns: is_fifo(status(p)) or is_fifo(status(p, ec)), respectively. The signature with argu- ment ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.22 Is other [fs.op.is.other]
bool filesystem::is_other(file_status s) noexcept;
// Returns: exists(s) && !is_regular_file(s) && !is_directory(s) && !is_symlink(s).
bool filesystem::is_other(const path& p);
bool filesystem::is_other(const path& p, error_code& ec) noexcept;
// Returns: is_other(status(p)) or is_other(status(p, ec)), respectively. The signature with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.23 Is regular file [fs.op.is.regular.file]
bool filesystem::is_regular_file(file_status s) noexcept;
// Returns: s.type() == file_type::regular.
bool filesystem::is_regular_file(const path& p);
// Returns: is_regular_file(status(p)).
// Throws: filesystem_error if status(p) would throw filesystem_error.
bool filesystem::is_regular_file(const path& p, error_code& ec) noexcept;
// Effects: Sets ec as if by status(p, ec).
// [Note 1: file_type::none, file_type::not_found and file_type::unknown cases set ec to error values. To distinguish between cases, call the status function directly.
// Returns: is_regular_file(status(p, ec)). Returns false if an error occurs.
// Returns: is_socket(status(p)) or is_socket(status(p, ec)), respectively. The signature with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.24 Is socket [fs.op.is.socket]
bool filesystem::is_socket(file_status s) noexcept;
// Returns: s.type() == file_type::socket.
bool filesystem::is_socket(const path& p);
bool filesystem::is_socket(const path& p, error_code& ec) noexcept;
// 31.12.13.25 Is symlink [fs.op.is.symlink]
bool filesystem::is_symlink(file_status s) noexcept;
// Returns: s.type() == file_type::symlink.
bool filesystem::is_symlink(const path& p);
bool filesystem::is_symlink(const path& p, error_code& ec) noexcept;
// Returns: is_symlink(symlink_status(p)) or is_symlink(symlink_status(p, ec)), respectively. The signature with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.26 Last write time [fs.op.last.write.time]
file_time_type filesystem::last_write_time(const path& p);
file_time_type filesystem::last_write_time(const path& p, error_code& ec) noexcept;
// Returns: The time of last data modification of p, determined as if by the value of the POSIX stat class member st_mtime obtained as if by POSIX stat(). The signature with argument ec returns file_time_type::min() if an error occurs.
// Throws: As specified in 31.12.5.
void filesystem::last_write_time(const path& p, file_time_type new_time);
void filesystem::last_write_time(const path& p, file_time_type new_time,
                                 error_code& ec) noexcept;
// Effects: Sets the time of last data modification of the file resolved to by p to new_time, as if by POSIX futimens().
// Throws: As specified in 31.12.5.
// [Note 1: A postcondition of last_write_time(p) == new_time is not specified because it does not necessarily hold for file systems with coarse time granularity.
// 31.12.13.27 Permissions [fs.op.permissions]
void filesystem::permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
void filesystem::permissions(const path& p, perms prms, error_code& ec) noexcept;
void filesystem::permissions(const path& p, perms prms, perm_options opts, error_code& ec);
// Preconditions: Exactly one of the perm_options constants replace, add, or remove is present in opts. Effects: Applies the action specified by opts to the file p resolves to, or to file p itself if p is a symbolic link and perm_options::nofollow is set in opts. The action is applied as if by POSIX fchmodat(). [Note 1: Conceptually permissions are viewed as bits, but the actual implementation can use some other mechanism.
// Throws: As specified in 31.12.5.
// Remarks: The second signature behaves as if it had an additional parameter perm_options opts with an argument of perm_options::replace.
// 31.12.13.28 Proximate [fs.op.proximate]
path filesystem::proximate(const path& p, error_code& ec);
// Returns: proximate(p, current_path(), ec).
// Throws: As specified in 31.12.5.
path filesystem::proximate(const path& p, const path& base = current_path());
path filesystem::proximate(const path& p, const path& base, error_code& ec);
// Returns: For the first form: weakly_canonical(p).lexically_proximate(weakly_canonical(base));
// For the second form:
weakly_canonical(p, ec).lexically_proximate(weakly_canonical(base, ec));
// or path() at the first error occurrence, if any. Throws: As specified in 31.12.5.
// 31.12.13.29 Read symlink [fs.op.read.symlink]
path filesystem::read_symlink(const path& p);
path filesystem::read_symlink(const path& p, error_code& ec);
// Returns: If p resolves to a symbolic link, a path object containing the contents of that symbolic link. The signature with argument ec returns path() if an error occurs.
// Throws: As specified in 31.12.5.
// [Note 1: It is an error if p does not resolve to a symbolic link.
// 31.12.13.30 Relative [fs.op.relative]
path filesystem::relative(const path& p, error_code& ec);
// Returns: relative(p, current_path(), ec). Throws: As specified in 31.12.5.
path filesystem::relative(const path& p, const path& base = current_path());
path filesystem::relative(const path& p, const path& base, error_code& ec);
// Returns: For the first form: weakly_canonical(p).lexically_relative(weakly_canonical(base));
// For the second form:
weakly_canonical(p, ec).lexically_relative(weakly_canonical(base, ec));
// or path() at the first error occurrence, if any. Throws: As specified in 31.12.5.
// 31.12.13.31 Remove [fs.op.remove]
bool filesystem::remove(const path& p);
bool filesystem::remove(const path& p, error_code& ec) noexcept;
// Effects: If exists(symlink_status(p, ec)), the file p is removed as if by POSIX remove().
// [Note 1: A symbolic link is itself removed, rather than the file it resolves to.
// Postconditions: exists(symlink_status(p)) is false.
// Returns: false if p did not exist, otherwise true. The signature with argument ec returns false if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.32 Remove all [fs.op.remove.all]
uintmax_t filesystem::remove_all(const path& p);
uintmax_t filesystem::remove_all(const path& p, error_code& ec);
// Effects: Recursively deletes the contents of p if it exists, then deletes file p itself, as if by POSIX remove().
// [Note 1: A symbolic link is itself removed, rather than the file it resolves to.
// Postconditions: exists(symlink_status(p)) is false.
// Returns: The number of files removed. The signature with argument ec returns static_cast< uintmax_t>(-1) if an error occurs.
// Throws: As specified in 31.12.5.
// 31.12.13.33 Rename [fs.op.rename]
void filesystem::rename(const path& old_p, const path& new_p);
void filesystem::rename(const path& old_p, const path& new_p, error_code& ec) noexcept;
// Effects: Renames old_p to new_p, as if by POSIX rename(). // // [Note 1: — If old_p and new_p resolve to the same existing file, no action is taken. — Otherwise, the rename can include the following effects:
// — if new_p resolves to an existing non-directory file, new_p is removed; otherwise,
// — if new_p resolves to an existing directory, new_p is removed if empty on POSIX compliant operating systems but might be an error on other operating systems. A symbolic link is itself renamed, rather than the file it resolves to.
//  Throws: As specified in 31.12.5.
// 31.12.13.34 Resize file [fs.op.resize.file]
void filesystem::resize_file(const path& p, uintmax_t new_size);
void filesystem::resize_file(const path& p, uintmax_t new_size, error_code& ec) noexcept;
// Effects: Causes the size that would be returned by file_size(p) to be equal to new_size, as if by POSIX truncate().
// Throws: As specified in 31.12.5.
// 31.12.13.35 Space [fs.op.space]
space_info filesystem::space(const path& p);
space_info filesystem::space(const path& p, error_code& ec) noexcept;
// Returns: An object of type space_info. The value of the space_info object is determined as if by using POSIX statvfs to obtain a POSIX struct statvfs, and then multiplying its f_blocks, f_bfree, and f_bavail members by its f_frsize member, and assigning the results to the capacity, free, and available members respectively. Any members for which the value cannot be determined shall be set to static_cast<uintmax_t>(-1). For the signature with argument ec, all members are set to static_cast<uintmax_t>(-1) if an error occurs.
// Throws: As specified in 31.12.5.
// Remarks: The value of member space_info::available is operating system dependent. [Note 1: available might be less than free.
// 31.12.13.36 Status [fs.op.status]
file_status filesystem::status(const path& p);
// Effects: As if:
error_code ec;
file_status result = status(p, ec);
if (result.type() == file_type::none)
    throw filesystem_error(implementation-supplied-message, p, ec);
    return result;
// Returns: See above.
// Throws: filesystem_error.
// [Note 1: result values of file_status(file_type::not_found) and file_status(file_type::unknown) are not considered failures and do not cause an exception to be thrown.
    file_status filesystem::status(const path& p, error_code& ec) noexcept;
// Effects: If possible, determines the attributes of the file p resolves to, as if by using POSIX stat() to obtain a POSIX struct stat. If, during attribute determination, the underlying file system API reports an error, sets ec to indicate the specific error reported. Otherwise, ec.clear().
// [Note 2: This allows users to inspect the specifics of underlying API errors even when the value returned by status() is not file_status(file_type::none).
// Let prms denote the result of (m & perms::mask), where m is determined as if by converting the st_mode member of the obtained struct stat to the type perms.
// Returns:— If ec != error_code():
// — If the specific error indicates that p cannot be resolved because some element of the path does not exist, returns file_status(file_type::not_found).
// — Otherwise, if the specific error indicates that p can be resolved but the attributes cannot be determined, returns file_status(file_type::unknown).
// — Otherwise, returns file_status(file_type::none).
// [Note 3: These semantics distinguish between p being known not to exist, p existing but not being able to determine its attributes, and there being an error that prevents even knowing if p exists. These distinctions are important to some use cases.
// — Otherwise,
// — If the attributes indicate a regular file, as if by POSIX S_ISREG, returns file_status(file_- type::regular, prms).
// [Note 4: file_type::regular implies appropriate <fstream> operations would succeed, assuming no hardware, permission, access, or file system race errors. Lack of file_type::regular does not necessarily imply <fstream> operations would fail on a directory.
// — Otherwise, if the attributes indicate a directory, as if by POSIX S_ISDIR, returns file_- status(file_type::directory, prms).
// [Note 5 : file_type::directory implies that calling directory_iterator(p) would succeed.
// — Otherwise, if the attributes indicate a block special file, as if by POSIX S_ISBLK, returns file_status(file_type::block, prms).
// — Otherwise, if the attributes indicate a character special file, as if by POSIX S_ISCHR, returns file_status(file_type::character, prms).
// — Otherwise, if the attributes indicate a fifo or pipe file, as if by POSIX S_ISFIFO, returns file_status(file_type::fifo, prms).
// — Otherwise, if the attributes indicate a socket, as if by POSIX S_ISSOCK, returns file_- status(file_type::socket, prms).
// — Otherwise, if the attributes indicate an implementation-defined file type (31.12.8.2), returns file_status(file_type::A, prms), where A is the constant for the implementation-defined file type.
// — Otherwise, returns file_status(file_type::unknown, prms).
// Remarks: If a symbolic link is encountered during pathname resolution, pathname resolution continues
    using the contents of the symbolic link.
// 31.12.13.37 Status known [fs.op.status.known]
    bool filesystem::status_known(file_status s) noexcept;
// Returns: s.type() != file_type::none.
// 31.12.13.38 Symlink status [fs.op.symlink.status]
    file_status filesystem::symlink_status(const path& p);
    file_status filesystem::symlink_status(const path& p, error_code& ec) noexcept;
// #define NULL see 17.2.3
// #define _IOFBF see below
// #define _IOLBF see below
// #define _IONBF see below
// #define BUFSIZ see below
// #define EOF see below
// Effects: Same as status(), above, except that the attributes of p are determined as if by using POSIX lstat() to obtain a POSIX struct stat.
// Let prms denote the result of (m & perms::mask), where m is determined as if by converting the st_mode member of the obtained struct stat to the type perms.
// Returns: Same as status(), above, except that if the attributes indicate a symbolic link, as if by POSIX S_ISLNK, returns file_status(file_type::symlink, prms). The signature with argument ec returns file_status(file_type::none) if an error occurs.
// Throws: As specified in 31.12.5.
// Remarks: Pathname resolution terminates if p names a symbolic link.
// 31.12.13.39 Temporary directory path [fs.op.temp.dir.path]
    path filesystem::temp_directory_path();
    path filesystem::temp_directory_path(error_code& ec);
// Let p be an unspecified directory path suitable for temporary files.
// Effects: If exists(p) is false or is_directory(p) is false, an error is reported (31.12.5). Returns: The path p. The signature with argument ec returns path() if an error occurs. Throws: As specified in 31.12.5.
// [Example 1: For POSIX-based operating systems, an implementation might return the path supplied by the first environment variable found in the list TMPDIR, TMP, TEMP, TEMPDIR, or if none of these are found, "/tmp". For Windows-based operating systems, an implementation might return the path reported by the Windows GetTempPath API function.
// 31.12.13.40 Weakly canonical [fs.op.weakly.canonical]
    path filesystem::weakly_canonical(const path& p);
    path filesystem::weakly_canonical(const path& p, error_code& ec);
// Effects: Using status(p) or status(p, ec), respectively, to determine existence, return a path composed by operator/= from the result of calling canonical() with a path argument composed of the leading elements of p that exist, if any, followed by the elements of p that do not exist, if any. For the first form, canonical() is called without an error_code argument. For the second form, canonical() is called with ec as an error_code argument, and path() is returned at the first error occurrence, if any.
// Postconditions: The returned path is in normal form (31.12.6.2).
// Returns: p with symlinks resolved and the result normalized (31.12.6.2).
// Throws: As specified in 31.12.5.
// Remarks: Implementations should avoid unnecessary normalization such as when canonical has already been called on the entirety of p.
    int main() {
    cout  <<  n4910 << endl;
    return EXIT_SUCCESS;
}

編纂・実行結果(compile and go)

bash
$ clang++ p1577.cpp -std=03 -o p1577l -I. -Wall
In file included from p1577.cpp:10:
In file included from ./N4910.h:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/atomic:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/c++0x_warning.h:32:2: error: This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
 ^
p1577.cpp:37:19: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
     namespace std::filesystem {
                  ^~~~~~~~~~~~
                   { namespace filesystem
p1577.cpp:40:11: error: unknown type name 'path'
void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
          ^
p1577.cpp:40:22: error: unknown type name 'path'
void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
                     ^
p1577.cpp:40:33: error: expected function body after function declarator
void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
                                ^
p1577.cpp:40:67: error: unknown type name 'path'
void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
                                                                  ^
p1577.cpp:40:76: error: expected function body after function declarator
void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
                                                                           ^
p1577.cpp:48:51: error: expected function body after function declarator
directory_iterator begin(directory_iterator iter) noexcept; directory_iterator end(directory_iterator) noexcept;
                                                  ^
p1577.cpp:48:104: error: expected function body after function declarator
directory_iterator begin(directory_iterator iter) noexcept; directory_iterator end(directory_iterator) noexcept;
                                                                                                       ^
p1577.cpp:52:71: error: expected function body after function declarator
recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept; recursive_directory_iterator end(recursive_directory_iterator) noexcept;
                                                                      ^
p1577.cpp:52:144: error: expected function body after function declarator
recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept; recursive_directory_iterator end(recursive_directory_iterator) noexcept;
                                                                                                                                               ^
p1577.cpp:56:3: error: unknown type name 'uintmax_t'
  uintmax_t capacity;
  ^
p1577.cpp:57:3: error: unknown type name 'uintmax_t'
  uintmax_t free;
  ^
p1577.cpp:58:3: error: unknown type name 'uintmax_t'
  uintmax_t available;
  ^
p1577.cpp:59:66: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
  friend bool operator==(const space_info&, const space_info&) = default;
                                                                 ^
p1577.cpp:59:66: warning: defaulted comparison operators are a C++20 extension [-Wc++20-extensions]
p1577.cpp:62:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class file_type;
     ^
p1577.cpp:63:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class perms;
     ^
p1577.cpp:64:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class perm_options;
     ^
p1577.cpp:65:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class copy_options;
     ^
p1577.cpp:66:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class directory_options;
     ^
p1577.cpp:67:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using file_time_type = chrono::time_point<chrono::file_clock>;
                       ^
p1577.cpp:67:24: error: use of undeclared identifier 'chrono'
p1577.cpp:67:43: error: use of undeclared identifier 'chrono'
using file_time_type = chrono::time_point<chrono::file_clock>;
                                          ^
p1577.cpp:69:1: error: unknown type name 'path'
path absolute(const path& p);
^
p1577.cpp:69:21: error: unknown type name 'path'
path absolute(const path& p);
                    ^
p1577.cpp:70:1: error: unknown type name 'path'
path absolute(const path& p, error_code& ec);
^
p1577.cpp:70:21: error: unknown type name 'path'
path absolute(const path& p, error_code& ec);
                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
9 warnings and 20 errors generated.
$ clang++ p1577.cpp -std=2b -o p1577l -I. -Wall
p1577.cpp:40:11: error: unknown type name 'path'
void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
          ^
p1577.cpp:40:22: error: unknown type name 'path'
void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
                     ^
p1577.cpp:40:67: error: unknown type name 'path'
void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
                                                                  ^
p1577.cpp:67:24: error: use of undeclared identifier 'chrono'
using file_time_type = chrono::time_point<chrono::file_clock>;
                       ^
p1577.cpp:67:43: error: use of undeclared identifier 'chrono'
using file_time_type = chrono::time_point<chrono::file_clock>;
                                          ^
p1577.cpp:69:1: error: unknown type name 'path'
path absolute(const path& p);
^
p1577.cpp:69:21: error: unknown type name 'path'
path absolute(const path& p);
                    ^
p1577.cpp:70:1: error: unknown type name 'path'
path absolute(const path& p, error_code& ec);
^
p1577.cpp:70:21: error: unknown type name 'path'
path absolute(const path& p, error_code& ec);
                    ^
p1577.cpp:71:1: error: unknown type name 'path'
path canonical(const path& p);
^
p1577.cpp:71:22: error: unknown type name 'path'
path canonical(const path& p);
                     ^
p1577.cpp:72:1: error: unknown type name 'path'
path canonical(const path& p, error_code& ec);
^
p1577.cpp:72:22: error: unknown type name 'path'
path canonical(const path& p, error_code& ec);
                     ^
p1577.cpp:73:17: error: unknown type name 'path'
void copy(const path& from, const path& to);
                ^
p1577.cpp:73:35: error: unknown type name 'path'
void copy(const path& from, const path& to);
                                  ^
p1577.cpp:74:17: error: unknown type name 'path'
void copy(const path& from, const path& to, error_code& ec);
                ^
p1577.cpp:74:35: error: unknown type name 'path'
void copy(const path& from, const path& to, error_code& ec);
                                  ^
p1577.cpp:75:17: error: unknown type name 'path'
void copy(const path& from, const path& to, copy_options options);
                ^
p1577.cpp:75:35: error: unknown type name 'path'
void copy(const path& from, const path& to, copy_options options);
                                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

$ g++ p1577.cpp -std=03 -o p1577g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p1577.cpp:10:
/usr/local/include/c++/12.1.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
   32 | #error This file requires compiler and library support \
      |  ^~~~~
p1577.cpp:40:33: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++11-compat]
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                                 ^~~~~~~~
p1577.cpp:184:12: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++11-compat]
  184 |     inline constexpr bool enable_borrowed_range<filesystem::directory_iterator> = true;
      |            ^~~~~~~~~
p1577.cpp:932:38: error: too many decimal points in number
  932 | the refresh function as described in 31.12.11.1.
      |                                      ^~~~~~~~~~~
p1577.cpp:1046:15: error: extended character — is not valid in an identifier
 1046 | iterator(""). —end note] directory_iterator(const directory_iterator& rhs);
      |               ^
p1577.cpp:1105:75: error: extended character — is not valid in an identifier
 1105 | symlinks, specify options as directory_options::follow_directory_symlink. —end note]
      |                                                                           ^
p1577.cpp:40:6: error: variable or field 'swap' declared void
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |      ^~~~
p1577.cpp:40:11: error: 'path' was not declared in this scope
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |           ^~~~
p1577.cpp:40:17: error: 'lhs' was not declared in this scope
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                 ^~~
p1577.cpp:40:22: error: 'path' was not declared in this scope
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                      ^~~~
p1577.cpp:40:28: error: 'rhs' was not declared in this scope
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                            ^~~
p1577.cpp:40:67: error: 'path' does not name a type
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                                                                   ^~~~
p1577.cpp:40:76: error: expected initializer before 'noexcept'
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                                                                            ^~~~~~~~
p1577.cpp:48:51: error: expected initializer before 'noexcept'
   48 | directory_iterator begin(directory_iterator iter) noexcept; directory_iterator end(directory_iterator) noexcept;
      |                                                   ^~~~~~~~
p1577.cpp:48:104: error: expected initializer before 'noexcept'
   48 | directory_iterator begin(directory_iterator iter) noexcept; directory_iterator end(directory_iterator) noexcept;
      |                                                                                                        ^~~~~~~~
p1577.cpp:52:71: error: expected initializer before 'noexcept'
   52 | recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept; recursive_directory_iterator end(recursive_directory_iterator) noexcept;
      |                                                                       ^~~~~~~~
p1577.cpp:52:144: error: expected initializer before 'noexcept'
   52 | recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept; recursive_directory_iterator end(recursive_directory_iterator) noexcept;
      |                                                                                                                                                ^~~~~~~~
p1577.cpp:56:3: error: 'uintmax_t' does not name a type
   56 |   uintmax_t capacity;
      |   ^~~~~~~~~
p1577.cpp:57:3: error: 'uintmax_t' does not name a type
   57 |   uintmax_t free;
      |   ^~~~~~~~~
p1577.cpp:58:3: error: 'uintmax_t' does not name a type
   58 |   uintmax_t available;
      |   ^~~~~~~~~
p1577.cpp:59:66: warning: defaulted and deleted functions only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
   59 |   friend bool operator==(const space_info&, const space_info&) = default;
      |                                                                  ^~~~~~~
p1577.cpp:59:15: error: defaulted 'bool std::filesystem::operator==(const space_info&, const space_info&)' only available with '-std=c++20' or '-std=gnu++20'
   59 |   friend bool operator==(const space_info&, const space_info&) = default;
      |               ^~~~~~~~
p1577.cpp:62:1: warning: scoped enums only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
   62 | enum class file_type;
      | ^~~~
p1577.cpp:62:6: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
   62 | enum class file_type;
      | ~~~~ ^~~~~
      |      -----
p1577.cpp:62:12: error: use of enum 'file_type' without previous declaration
   62 | enum class file_type;
      |            ^~~~~~~~~
p1577.cpp:63:1: warning: scoped enums only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
   63 | enum class perms;
      | ^~~~
p1577.cpp:63:6: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
   63 | enum class perms;
      | ~~~~ ^~~~~
      |      -----
p1577.cpp:63:12: error: use of enum 'perms' without previous declaration
   63 | enum class perms;
      |            ^~~~~
p1577.cpp:64:1: warning: scoped enums only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
   64 | enum class perm_options;
      | ^~~~
p1577.cpp:64:6: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
   64 | enum class perm_options;
      | ~~~~ ^~~~~
      |      -----
p1577.cpp:64:12: error: use of enum 'perm_options' without previous declaration
   64 | enum class perm_options;
      |            ^~~~~~~~~~~~
p1577.cpp:65:1: warning: scoped enums only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
   65 | enum class copy_options;
      | ^~~~
p1577.cpp:65:6: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
   65 | enum class copy_options;
      | ~~~~ ^~~~~
      |      -----
p1577.cpp:65:12: error: use of enum 'copy_options' without previous declaration
   65 | enum class copy_options;
      |            ^~~~~~~~~~~~
p1577.cpp:66:1: warning: scoped enums only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
   66 | enum class directory_options;
      | ^~~~
p1577.cpp:66:6: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
   66 | enum class directory_options;
      | ~~~~ ^~~~~
      |      -----
p1577.cpp:66:12: error: use of enum 'directory_options' without previous declaration
   66 | enum class directory_options;
      |            ^~~~~~~~~~~~~~~~~
p1577.cpp:67:7: error: expected nested-name-specifier before 'file_time_type'
   67 | using file_time_type = chrono::time_point<chrono::file_clock>;
      |       ^~~~~~~~~~~~~~
p1577.cpp:69:1: error: 'path' does not name a type
   69 | path absolute(const path& p);
      | ^~~~
p1577.cpp:70:1: error: 'path' does not name a type
   70 | path absolute(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:71:1: error: 'path' does not name a type
   71 | path canonical(const path& p);
      | ^~~~
p1577.cpp:72:1: error: 'path' does not name a type
   72 | path canonical(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:73:17: error: 'path' does not name a type
   73 | void copy(const path& from, const path& to);
      |                 ^~~~
p1577.cpp:73:35: error: 'path' does not name a type
   73 | void copy(const path& from, const path& to);
      |                                   ^~~~
p1577.cpp:74:17: error: 'path' does not name a type
   74 | void copy(const path& from, const path& to, error_code& ec);
      |                 ^~~~
p1577.cpp:74:35: error: 'path' does not name a type
   74 | void copy(const path& from, const path& to, error_code& ec);
      |                                   ^~~~
p1577.cpp:74:45: error: 'error_code' has not been declared
   74 | void copy(const path& from, const path& to, error_code& ec);
      |                                             ^~~~~~~~~~
p1577.cpp:75:17: error: 'path' does not name a type
   75 | void copy(const path& from, const path& to, copy_options options);
      |                 ^~~~
p1577.cpp:75:35: error: 'path' does not name a type
   75 | void copy(const path& from, const path& to, copy_options options);
      |                                   ^~~~
p1577.cpp:75:45: error: 'copy_options' has not been declared
   75 | void copy(const path& from, const path& to, copy_options options);
      |                                             ^~~~~~~~~~~~
p1577.cpp:76:17: error: 'path' does not name a type
   76 | void copy(const path& from, const path& to, copy_options options,
      |                 ^~~~
p1577.cpp:76:35: error: 'path' does not name a type
   76 | void copy(const path& from, const path& to, copy_options options,
      |                                   ^~~~
p1577.cpp:76:45: error: 'copy_options' has not been declared
   76 | void copy(const path& from, const path& to, copy_options options,
      |                                             ^~~~~~~~~~~~
p1577.cpp:77:11: error: 'error_code' has not been declared
   77 |           error_code& ec);
      |           ^~~~~~~~~~
p1577.cpp:78:22: error: 'path' does not name a type
   78 | bool copy_file(const path& from, const path& to);
      |                      ^~~~
p1577.cpp:78:40: error: 'path' does not name a type
   78 | bool copy_file(const path& from, const path& to);
      |                                        ^~~~
p1577.cpp:79:22: error: 'path' does not name a type
   79 | bool copy_file(const path& from, const path& to, error_code& ec);
      |                      ^~~~
p1577.cpp:79:40: error: 'path' does not name a type
   79 | bool copy_file(const path& from, const path& to, error_code& ec);
      |                                        ^~~~
p1577.cpp:79:50: error: 'error_code' has not been declared
   79 | bool copy_file(const path& from, const path& to, error_code& ec);
      |                                                  ^~~~~~~~~~
p1577.cpp:80:22: error: 'path' does not name a type
   80 | bool copy_file(const path& from, const path& to, copy_options option);
      |                      ^~~~
p1577.cpp:80:40: error: 'path' does not name a type
   80 | bool copy_file(const path& from, const path& to, copy_options option);
      |                                        ^~~~
p1577.cpp:80:50: error: 'copy_options' has not been declared
   80 | bool copy_file(const path& from, const path& to, copy_options option);
      |                                                  ^~~~~~~~~~~~
p1577.cpp:81:22: error: 'path' does not name a type
   81 | bool copy_file(const path& from, const path& to, copy_options option,
      |                      ^~~~
p1577.cpp:81:40: error: 'path' does not name a type
   81 | bool copy_file(const path& from, const path& to, copy_options option,
      |                                        ^~~~
p1577.cpp:81:50: error: 'copy_options' has not been declared
   81 | bool copy_file(const path& from, const path& to, copy_options option,
      |                                                  ^~~~~~~~~~~~
p1577.cpp:82:16: error: 'error_code' has not been declared
   82 |                error_code& ec);
      |                ^~~~~~~~~~
p1577.cpp:83:25: error: 'path' does not name a type
   83 | void copy_symlink(const path& existing_symlink, const path& new_symlink);
      |                         ^~~~
p1577.cpp:83:55: error: 'path' does not name a type
   83 | void copy_symlink(const path& existing_symlink, const path& new_symlink);
      |                                                       ^~~~
p1577.cpp:84:25: error: 'path' does not name a type
   84 | void copy_symlink(const path& existing_symlink, const path& new_symlink,
      |                         ^~~~
p1577.cpp:84:55: error: 'path' does not name a type
   84 | void copy_symlink(const path& existing_symlink, const path& new_symlink,
      |                                                       ^~~~
p1577.cpp:85:19: error: 'error_code' has not been declared
   85 |                   error_code& ec) noexcept;
      |                   ^~~~~~~~~~
p1577.cpp:85:35: error: expected initializer before 'noexcept'
   85 |                   error_code& ec) noexcept;
      |                                   ^~~~~~~~
p1577.cpp:86:31: error: 'path' does not name a type
   86 | bool create_directories(const path& p);
      |                               ^~~~
p1577.cpp:87:31: error: 'path' does not name a type
   87 | bool create_directories(const path& p, error_code& ec);
      |                               ^~~~
p1577.cpp:87:40: error: 'error_code' has not been declared
   87 | bool create_directories(const path& p, error_code& ec);
      |                                        ^~~~~~~~~~
p1577.cpp:88:29: error: 'path' does not name a type
   88 | bool create_directory(const path& p);
      |                             ^~~~
p1577.cpp:89:29: error: 'path' does not name a type
   89 | bool create_directory(const path& p, error_code& ec) noexcept;
      |                             ^~~~
p1577.cpp:89:38: error: 'error_code' has not been declared
   89 | bool create_directory(const path& p, error_code& ec) noexcept;
      |                                      ^~~~~~~~~~
p1577.cpp:89:54: error: expected initializer before 'noexcept'
   89 | bool create_directory(const path& p, error_code& ec) noexcept;
      |                                                      ^~~~~~~~
p1577.cpp:90:29: error: 'path' does not name a type
   90 | bool create_directory(const path& p, const path& attributes);
      |                             ^~~~
p1577.cpp:90:44: error: 'path' does not name a type
   90 | bool create_directory(const path& p, const path& attributes);
      |                                            ^~~~
p1577.cpp:91:29: error: 'path' does not name a type
   91 | bool create_directory(const path& p, const path& attributes,
      |                             ^~~~
p1577.cpp:91:44: error: 'path' does not name a type
   91 | bool create_directory(const path& p, const path& attributes,
      |                                            ^~~~
p1577.cpp:92:23: error: 'error_code' has not been declared
   92 |                       error_code& ec) noexcept;
      |                       ^~~~~~~~~~
p1577.cpp:92:39: error: expected initializer before 'noexcept'
   92 |                       error_code& ec) noexcept;
      |                                       ^~~~~~~~
p1577.cpp:93:37: error: 'path' does not name a type
   93 | void create_directory_symlink(const path& to, const path& new_symlink);
      |                                     ^~~~
p1577.cpp:93:53: error: 'path' does not name a type
   93 | void create_directory_symlink(const path& to, const path& new_symlink);
      |                                                     ^~~~
p1577.cpp:94:37: error: 'path' does not name a type
   94 | void create_directory_symlink(const path& to, const path& new_symlink,
      |                                     ^~~~
p1577.cpp:94:53: error: 'path' does not name a type
   94 | void create_directory_symlink(const path& to, const path& new_symlink,
      |                                                     ^~~~
p1577.cpp:95:31: error: 'error_code' has not been declared
   95 |                               error_code& ec) noexcept;
      |                               ^~~~~~~~~~
p1577.cpp:95:47: error: expected initializer before 'noexcept'
   95 |                               error_code& ec) noexcept;
      |                                               ^~~~~~~~
p1577.cpp:96:29: error: 'path' does not name a type
   96 | void create_hard_link(const path& to, const path& new_hard_link);
      |                             ^~~~
p1577.cpp:96:45: error: 'path' does not name a type
   96 | void create_hard_link(const path& to, const path& new_hard_link);
      |                                             ^~~~
p1577.cpp:97:29: error: 'path' does not name a type
   97 | void create_hard_link(const path& to, const path& new_hard_link,
      |                             ^~~~
p1577.cpp:97:45: error: 'path' does not name a type
   97 | void create_hard_link(const path& to, const path& new_hard_link,
      |                                             ^~~~
p1577.cpp:98:23: error: 'error_code' has not been declared
   98 |                       error_code& ec) noexcept;
      |                       ^~~~~~~~~~
p1577.cpp:98:39: error: expected initializer before 'noexcept'
   98 |                       error_code& ec) noexcept;
      |                                       ^~~~~~~~
p1577.cpp:99:27: error: 'path' does not name a type
   99 | void create_symlink(const path& to, const path& new_symlink);
      |                           ^~~~
p1577.cpp:99:43: error: 'path' does not name a type
   99 | void create_symlink(const path& to, const path& new_symlink);
      |                                           ^~~~
p1577.cpp:100:27: error: 'path' does not name a type
  100 | void create_symlink(const path& to, const path& new_symlink,
      |                           ^~~~
p1577.cpp:100:43: error: 'path' does not name a type
  100 | void create_symlink(const path& to, const path& new_symlink,
      |                                           ^~~~
p1577.cpp:101:21: error: 'error_code' has not been declared
  101 |                     error_code& ec) noexcept;
      |                     ^~~~~~~~~~
p1577.cpp:101:37: error: expected initializer before 'noexcept'
  101 |                     error_code& ec) noexcept;
      |                                     ^~~~~~~~
p1577.cpp:102:1: error: 'path' does not name a type
  102 | path current_path();
      | ^~~~
p1577.cpp:103:1: error: 'path' does not name a type
  103 | path current_path(error_code& ec);
      | ^~~~
p1577.cpp:104:25: error: 'path' does not name a type
  104 | void current_path(const path& p);
      |                         ^~~~
p1577.cpp:105:25: error: 'path' does not name a type
  105 | void current_path(const path& p, error_code& ec) noexcept;
      |                         ^~~~
p1577.cpp:105:34: error: 'error_code' has not been declared
  105 | void current_path(const path& p, error_code& ec) noexcept;
      |                                  ^~~~~~~~~~
p1577.cpp:105:50: error: expected initializer before 'noexcept'
  105 | void current_path(const path& p, error_code& ec) noexcept;
      |                                                  ^~~~~~~~
p1577.cpp:106:23: error: 'path' does not name a type
  106 | bool equivalent(const path& p1, const path& p2);
      |                       ^~~~
p1577.cpp:106:39: error: 'path' does not name a type
  106 | bool equivalent(const path& p1, const path& p2);
      |                                       ^~~~
p1577.cpp:107:23: error: 'path' does not name a type
  107 | bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                       ^~~~
p1577.cpp:107:39: error: 'path' does not name a type
  107 | bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                                       ^~~~
p1577.cpp:107:49: error: 'error_code' has not been declared
  107 | bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                                                 ^~~~~~~~~~
p1577.cpp:107:65: error: expected initializer before 'noexcept'
  107 | bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                                                                 ^~~~~~~~
p1577.cpp:108:28: error: expected initializer before 'noexcept'
  108 | bool exists(file_status s) noexcept;
      |                            ^~~~~~~~
p1577.cpp:109:19: error: 'path' does not name a type
  109 | bool exists(const path& p);
      |                   ^~~~
p1577.cpp:110:19: error: 'path' does not name a type
  110 | bool exists(const path& p, error_code& ec) noexcept;
      |                   ^~~~
p1577.cpp:110:28: error: 'error_code' has not been declared
  110 | bool exists(const path& p, error_code& ec) noexcept;
      |                            ^~~~~~~~~~
p1577.cpp:110:44: error: expected initializer before 'noexcept'
  110 | bool exists(const path& p, error_code& ec) noexcept;
      |                                            ^~~~~~~~
p1577.cpp:111:1: error: 'uintmax_t' does not name a type
  111 | uintmax_t file_size(const path& p);
      | ^~~~~~~~~
p1577.cpp:112:1: error: 'uintmax_t' does not name a type
  112 | uintmax_t file_size(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~
p1577.cpp:113:1: error: 'uintmax_t' does not name a type
  113 | uintmax_t hard_link_count(const path& p);
      | ^~~~~~~~~
p1577.cpp:114:1: error: 'uintmax_t' does not name a type
  114 | uintmax_t hard_link_count(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~
p1577.cpp:115:35: error: expected initializer before 'noexcept'
  115 | bool is_block_file(file_status s) noexcept;
      |                                   ^~~~~~~~
p1577.cpp:116:26: error: 'path' does not name a type
  116 | bool is_block_file(const path& p);
      |                          ^~~~
p1577.cpp:117:26: error: 'path' does not name a type
  117 | bool is_block_file(const path& p, error_code& ec) noexcept;
      |                          ^~~~
p1577.cpp:117:35: error: 'error_code' has not been declared
  117 | bool is_block_file(const path& p, error_code& ec) noexcept;
      |                                   ^~~~~~~~~~
p1577.cpp:117:51: error: expected initializer before 'noexcept'
  117 | bool is_block_file(const path& p, error_code& ec) noexcept;
      |                                                   ^~~~~~~~
p1577.cpp:118:39: error: expected initializer before 'noexcept'
  118 | bool is_character_file(file_status s) noexcept;
      |                                       ^~~~~~~~
p1577.cpp:119:30: error: 'path' does not name a type
  119 | bool is_character_file(const path& p);
      |                              ^~~~
p1577.cpp:120:30: error: 'path' does not name a type
  120 | bool is_character_file(const path& p, error_code& ec) noexcept;
      |                              ^~~~
p1577.cpp:120:39: error: 'error_code' has not been declared
  120 | bool is_character_file(const path& p, error_code& ec) noexcept;
      |                                       ^~~~~~~~~~
p1577.cpp:120:55: error: expected initializer before 'noexcept'
  120 | bool is_character_file(const path& p, error_code& ec) noexcept;
      |                                                       ^~~~~~~~
p1577.cpp:121:34: error: expected initializer before 'noexcept'
  121 | bool is_directory(file_status s) noexcept;
      |                                  ^~~~~~~~
p1577.cpp:122:25: error: 'path' does not name a type
  122 | bool is_directory(const path& p);
      |                         ^~~~
p1577.cpp:123:25: error: 'path' does not name a type
  123 | bool is_directory(const path& p, error_code& ec) noexcept;
      |                         ^~~~
p1577.cpp:123:34: error: 'error_code' has not been declared
  123 | bool is_directory(const path& p, error_code& ec) noexcept;
      |                                  ^~~~~~~~~~
p1577.cpp:123:50: error: expected initializer before 'noexcept'
  123 | bool is_directory(const path& p, error_code& ec) noexcept;
      |                                                  ^~~~~~~~
p1577.cpp:124:21: error: 'path' does not name a type
  124 | bool is_empty(const path& p);
      |                     ^~~~
p1577.cpp:125:21: error: 'path' does not name a type
  125 | bool is_empty(const path& p, error_code& ec);
      |                     ^~~~
p1577.cpp:125:30: error: 'error_code' has not been declared
  125 | bool is_empty(const path& p, error_code& ec);
      |                              ^~~~~~~~~~
p1577.cpp:126:29: error: expected initializer before 'noexcept'
  126 | bool is_fifo(file_status s) noexcept;
      |                             ^~~~~~~~
p1577.cpp:127:20: error: 'path' does not name a type
  127 | bool is_fifo(const path& p);
      |                    ^~~~
p1577.cpp:128:20: error: 'path' does not name a type
  128 | bool is_fifo(const path& p, error_code& ec) noexcept;
      |                    ^~~~
p1577.cpp:128:29: error: 'error_code' has not been declared
  128 | bool is_fifo(const path& p, error_code& ec) noexcept;
      |                             ^~~~~~~~~~
p1577.cpp:128:45: error: expected initializer before 'noexcept'
  128 | bool is_fifo(const path& p, error_code& ec) noexcept;
      |                                             ^~~~~~~~
p1577.cpp:129:30: error: expected initializer before 'noexcept'
  129 | bool is_other(file_status s) noexcept;
      |                              ^~~~~~~~
p1577.cpp:130:21: error: 'path' does not name a type
  130 | bool is_other(const path& p);
      |                     ^~~~
p1577.cpp:131:21: error: 'path' does not name a type
  131 | bool is_other(const path& p, error_code& ec) noexcept;
      |                     ^~~~
p1577.cpp:131:30: error: 'error_code' has not been declared
  131 | bool is_other(const path& p, error_code& ec) noexcept;
      |                              ^~~~~~~~~~
p1577.cpp:131:46: error: expected initializer before 'noexcept'
  131 | bool is_other(const path& p, error_code& ec) noexcept;
      |                                              ^~~~~~~~
p1577.cpp:132:37: error: expected initializer before 'noexcept'
  132 | bool is_regular_file(file_status s) noexcept;
      |                                     ^~~~~~~~
p1577.cpp:133:28: error: 'path' does not name a type
  133 | bool is_regular_file(const path& p);
      |                            ^~~~
p1577.cpp:134:28: error: 'path' does not name a type
  134 | bool is_regular_file(const path& p, error_code& ec) noexcept;
      |                            ^~~~
p1577.cpp:134:37: error: 'error_code' has not been declared
  134 | bool is_regular_file(const path& p, error_code& ec) noexcept;
      |                                     ^~~~~~~~~~
p1577.cpp:134:53: error: expected initializer before 'noexcept'
  134 | bool is_regular_file(const path& p, error_code& ec) noexcept;
      |                                                     ^~~~~~~~
p1577.cpp:135:31: error: expected initializer before 'noexcept'
  135 | bool is_socket(file_status s) noexcept;
      |                               ^~~~~~~~
p1577.cpp:136:22: error: 'path' does not name a type
  136 | bool is_socket(const path& p);
      |                      ^~~~
p1577.cpp:137:22: error: 'path' does not name a type
  137 | bool is_socket(const path& p, error_code& ec) noexcept;
      |                      ^~~~
p1577.cpp:137:31: error: 'error_code' has not been declared
  137 | bool is_socket(const path& p, error_code& ec) noexcept;
      |                               ^~~~~~~~~~
p1577.cpp:137:47: error: expected initializer before 'noexcept'
  137 | bool is_socket(const path& p, error_code& ec) noexcept;
      |                                               ^~~~~~~~
p1577.cpp:138:32: error: expected initializer before 'noexcept'
  138 | bool is_symlink(file_status s) noexcept;
      |                                ^~~~~~~~
p1577.cpp:139:23: error: 'path' does not name a type
  139 | bool is_symlink(const path& p);
      |                       ^~~~
p1577.cpp:140:23: error: 'path' does not name a type
  140 | bool is_symlink(const path& p, error_code& ec) noexcept;
      |                       ^~~~
p1577.cpp:140:32: error: 'error_code' has not been declared
  140 | bool is_symlink(const path& p, error_code& ec) noexcept;
      |                                ^~~~~~~~~~
p1577.cpp:140:48: error: expected initializer before 'noexcept'
  140 | bool is_symlink(const path& p, error_code& ec) noexcept;
      |                                                ^~~~~~~~
p1577.cpp:141:1: error: 'file_time_type' does not name a type
  141 | file_time_type last_write_time(const path& p);
      | ^~~~~~~~~~~~~~
p1577.cpp:142:1: error: 'file_time_type' does not name a type
  142 | file_time_type last_write_time(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~~~~~~
p1577.cpp:143:28: error: 'path' does not name a type
  143 | void last_write_time(const path& p, file_time_type new_time);
      |                            ^~~~
p1577.cpp:143:37: error: 'file_time_type' has not been declared
  143 | void last_write_time(const path& p, file_time_type new_time);
      |                                     ^~~~~~~~~~~~~~
p1577.cpp:144:30: error: 'path' does not name a type
  144 |   void last_write_time(const path& p, file_time_type new_time,
      |                              ^~~~
p1577.cpp:144:39: error: 'file_time_type' has not been declared
  144 |   void last_write_time(const path& p, file_time_type new_time,
      |                                       ^~~~~~~~~~~~~~
p1577.cpp:145:24: error: 'error_code' has not been declared
  145 |                        error_code& ec) noexcept;
      |                        ^~~~~~~~~~
p1577.cpp:145:40: error: expected initializer before 'noexcept'
  145 |                        error_code& ec) noexcept;
      |                                        ^~~~~~~~
p1577.cpp:146:26: error: 'path' does not name a type
  146 |   void permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                          ^~~~
p1577.cpp:146:35: error: 'perms' has not been declared
  146 |   void permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                   ^~~~~
p1577.cpp:146:47: error: 'perm_options' has not been declared
  146 |   void permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                               ^~~~~~~~~~~~
p1577.cpp:146:65: error: 'perm_options' has not been declared
  146 |   void permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                                                 ^~~~~~~~~~~~
p1577.cpp:147:26: error: 'path' does not name a type
  147 |   void permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                          ^~~~
p1577.cpp:147:35: error: 'perms' has not been declared
  147 |   void permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                                   ^~~~~
p1577.cpp:147:47: error: 'error_code' has not been declared
  147 |   void permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                                               ^~~~~~~~~~
p1577.cpp:147:63: error: expected initializer before 'noexcept'
  147 |   void permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                                                               ^~~~~~~~
p1577.cpp:148:26: error: 'path' does not name a type
  148 |   void permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                          ^~~~
p1577.cpp:148:35: error: 'perms' has not been declared
  148 |   void permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                                   ^~~~~
p1577.cpp:148:47: error: 'perm_options' has not been declared
  148 |   void permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                                               ^~~~~~~~~~~~
p1577.cpp:148:66: error: 'error_code' has not been declared
  148 |   void permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                                                                  ^~~~~~~~~~
p1577.cpp:149:3: error: 'path' does not name a type
  149 |   path proximate(const path& p, error_code& ec);
      |   ^~~~
p1577.cpp:150:3: error: 'path' does not name a type
  150 |   path proximate(const path& p, const path& base = current_path());
      |   ^~~~
p1577.cpp:151:3: error: 'path' does not name a type
  151 |   path proximate(const path& p, const path& base, error_code& ec);
      |   ^~~~
p1577.cpp:152:3: error: 'path' does not name a type
  152 |   path read_symlink(const path& p);
      |   ^~~~
p1577.cpp:153:3: error: 'path' does not name a type
  153 |   path read_symlink(const path& p, error_code& ec);
      |   ^~~~
p1577.cpp:154:3: error: 'path' does not name a type
  154 |   path relative(const path& p, error_code& ec);
      |   ^~~~
p1577.cpp:155:3: error: 'path' does not name a type
  155 |   path relative(const path& p, const path& base = current_path());
      |   ^~~~
p1577.cpp:156:3: error: 'path' does not name a type
  156 |   path relative(const path& p, const path& base, error_code& ec);
      |   ^~~~
p1577.cpp:157:21: error: 'path' does not name a type
  157 |   bool remove(const path& p);
      |                     ^~~~
p1577.cpp:158:21: error: 'path' does not name a type
  158 |   bool remove(const path& p, error_code& ec) noexcept;
      |                     ^~~~
p1577.cpp:158:30: error: 'error_code' has not been declared
  158 |   bool remove(const path& p, error_code& ec) noexcept;
      |                              ^~~~~~~~~~
p1577.cpp:158:46: error: expected initializer before 'noexcept'
  158 |   bool remove(const path& p, error_code& ec) noexcept;
      |                                              ^~~~~~~~
p1577.cpp:159:3: error: 'uintmax_t' does not name a type
  159 |   uintmax_t remove_all(const path& p);
      |   ^~~~~~~~~
p1577.cpp:160:3: error: 'uintmax_t' does not name a type
  160 |   uintmax_t remove_all(const path& p, error_code& ec);
      |   ^~~~~~~~~
p1577.cpp:161:21: error: 'path' does not name a type
  161 |   void rename(const path& from, const path& to);
      |                     ^~~~
p1577.cpp:161:39: error: 'path' does not name a type
  161 |   void rename(const path& from, const path& to);
      |                                       ^~~~
p1577.cpp:162:21: error: 'path' does not name a type
  162 |   void rename(const path& from, const path& to, error_code& ec) noexcept;
      |                     ^~~~
p1577.cpp:162:39: error: 'path' does not name a type
  162 |   void rename(const path& from, const path& to, error_code& ec) noexcept;
      |                                       ^~~~
p1577.cpp:162:49: error: 'error_code' has not been declared
  162 |   void rename(const path& from, const path& to, error_code& ec) noexcept;
      |                                                 ^~~~~~~~~~
p1577.cpp:162:65: error: expected initializer before 'noexcept'
  162 |   void rename(const path& from, const path& to, error_code& ec) noexcept;
      |                                                                 ^~~~~~~~
p1577.cpp:163:26: error: 'path' does not name a type
  163 |   void resize_file(const path& p, uintmax_t size);
      |                          ^~~~
p1577.cpp:163:35: error: 'uintmax_t' has not been declared
  163 |   void resize_file(const path& p, uintmax_t size);
      |                                   ^~~~~~~~~
p1577.cpp:164:26: error: 'path' does not name a type
  164 |   void resize_file(const path& p, uintmax_t size, error_code& ec) noexcept;
      |                          ^~~~
p1577.cpp:164:35: error: 'uintmax_t' has not been declared
  164 |   void resize_file(const path& p, uintmax_t size, error_code& ec) noexcept;
      |                                   ^~~~~~~~~
p1577.cpp:164:51: error: 'error_code' has not been declared
  164 |   void resize_file(const path& p, uintmax_t size, error_code& ec) noexcept;
      |                                                   ^~~~~~~~~~
p1577.cpp:164:67: error: expected initializer before 'noexcept'
  164 |   void resize_file(const path& p, uintmax_t size, error_code& ec) noexcept;
      |                                                                   ^~~~~~~~
p1577.cpp:165:26: error: 'path' does not name a type
  165 |   space_info space(const path& p);
      |                          ^~~~
p1577.cpp:166:26: error: 'path' does not name a type
  166 |   space_info space(const path& p, error_code& ec) noexcept;
      |                          ^~~~
p1577.cpp:166:35: error: 'error_code' has not been declared
  166 |   space_info space(const path& p, error_code& ec) noexcept;
      |                                   ^~~~~~~~~~
p1577.cpp:166:51: error: expected initializer before 'noexcept'
  166 |   space_info space(const path& p, error_code& ec) noexcept;
      |                                                   ^~~~~~~~
p1577.cpp:167:28: error: 'path' does not name a type
  167 |   file_status status(const path& p);
      |                            ^~~~
p1577.cpp:168:28: error: 'path' does not name a type
  168 |   file_status status(const path& p, error_code& ec) noexcept;
      |                            ^~~~
p1577.cpp:168:37: error: 'error_code' has not been declared
  168 |   file_status status(const path& p, error_code& ec) noexcept;
      |                                     ^~~~~~~~~~
p1577.cpp:168:53: error: expected initializer before 'noexcept'
  168 |   file_status status(const path& p, error_code& ec) noexcept;
      |                                                     ^~~~~~~~
p1577.cpp:169:36: error: expected initializer before 'noexcept'
  169 |   bool status_known(file_status s) noexcept;
      |                                    ^~~~~~~~
p1577.cpp:170:36: error: 'path' does not name a type
  170 |   file_status symlink_status(const path& p);
      |                                    ^~~~
p1577.cpp:171:36: error: 'path' does not name a type
  171 |   file_status symlink_status(const path& p, error_code& ec) noexcept;
      |                                    ^~~~
p1577.cpp:171:45: error: 'error_code' has not been declared
  171 |   file_status symlink_status(const path& p, error_code& ec) noexcept;
      |                                             ^~~~~~~~~~
p1577.cpp:171:61: error: expected initializer before 'noexcept'
  171 |   file_status symlink_status(const path& p, error_code& ec) noexcept;
      |                                                             ^~~~~~~~
p1577.cpp:172:3: error: 'path' does not name a type
  172 |   path temp_directory_path();
      |   ^~~~
p1577.cpp:173:3: error: 'path' does not name a type
  173 |   path temp_directory_path(error_code& ec);
      |   ^~~~
p1577.cpp:174:3: error: 'path' does not name a type
  174 |   path weakly_canonical(const path& p);
      |   ^~~~
p1577.cpp:175:3: error: 'path' does not name a type
  175 |   path weakly_canonical(const path& p, error_code& ec);
      |   ^~~~
p1577.cpp:180:38: error: 'path' is not a member of 'std::filesystem'
  180 |   template<> struct hash<filesystem::path>;
      |                                      ^~~~
p1577.cpp:180:38: error: 'path' is not a member of 'std::filesystem'
p1577.cpp:180:42: error: template argument 1 is invalid
  180 |   template<> struct hash<filesystem::path>;
      |                                          ^
p1577.cpp:184:12: error: 'constexpr' does not name a type
  184 |     inline constexpr bool enable_borrowed_range<filesystem::directory_iterator> = true;
      |            ^~~~~~~~~
p1577.cpp:184:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:186:12: error: 'constexpr' does not name a type
  186 |     inline constexpr bool enable_borrowed_range<filesystem::recursive_directory_iterator> = true;
      |            ^~~~~~~~~
p1577.cpp:186:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:188:12: error: 'constexpr' does not name a type
  188 |     inline constexpr bool enable_view<filesystem::directory_iterator> = true;
      |            ^~~~~~~~~
p1577.cpp:188:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:192:10: error: 'constexpr' does not name a type
  192 |   inline constexpr bool enable_view<filesystem::recursive_directory_iterator> = true;
      |          ^~~~~~~~~
p1577.cpp:192:10: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:218:7: error: expected nested-name-specifier before 'value_type'
  218 | using value_type = see below ;
      |       ^~~~~~~~~~
p1577.cpp:219:7: error: expected nested-name-specifier before 'string_type'
  219 | using string_type = basic_string<value_type>;
      |       ^~~~~~~~~~~
p1577.cpp:220:8: error: 'constexpr' does not name a type
  220 | static constexpr value_type preferred_separator = see below;
      |        ^~~~~~~~~
p1577.cpp:220:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:223:6: error: expected ';' at end of member declaration
  223 | path() noexcept;
      |      ^
      |       ;
p1577.cpp:223:8: error: 'noexcept' does not name a type
  223 | path() noexcept;
      |        ^~~~~~~~
p1577.cpp:223:8: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:225:10: error: expected ',' or '...' before '&&' token
  225 | path(path&& p) noexcept;
      |          ^~
p1577.cpp:225:1: error: invalid constructor; you probably meant 'std::filesystem::path (const std::filesystem::path&)'
  225 | path(path&& p) noexcept;
      | ^~~~
p1577.cpp:225:14: error: expected ';' at end of member declaration
  225 | path(path&& p) noexcept;
      |              ^
      |               ;
p1577.cpp:225:16: error: 'noexcept' does not name a type
  225 | path(path&& p) noexcept;
      |                ^~~~~~~~
p1577.cpp:225:16: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:226:17: error: expected ')' before '&&' token
  226 | path(string_type&& source, format fmt = auto_format); template<class Source>
      |     ~           ^~
      |                 )
p1577.cpp:227:36: error: 'format' has not been declared
  227 |         path(const Source& source, format fmt = auto_format);
      |                                    ^~~~~~
p1577.cpp:229:55: error: 'format' has not been declared
  229 |         path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                       ^~~~~~
p1577.cpp:231:55: error: 'format' has not been declared
  231 |         path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                       ^~~~~~
p1577.cpp:233:66: error: 'format' has not been declared
  233 | path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format); ~path();
      |                                                                  ^~~~~~
p1577.cpp:236:21: error: expected ',' or '...' before '&&' token
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                     ^~
p1577.cpp:236:25: error: expected ';' at end of member declaration
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                         ^
      |                          ;
p1577.cpp:236:27: error: 'noexcept' does not name a type
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                           ^~~~~~~~
p1577.cpp:236:27: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:236:53: error: 'string_type' has not been declared
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                                                     ^~~~~~~~~~~
p1577.cpp:236:64: error: expected ',' or '...' before '&&' token
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                                                                ^~
p1577.cpp:236:89: error: 'string_type' has not been declared
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                                                                                         ^~~~~~~~~~~
p1577.cpp:236:100: error: expected ',' or '...' before '&&' token
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                                                                                                    ^~
p1577.cpp:251:24: error: 'string_type' does not name a type
  251 | path& operator+=(const string_type& x);
      |                        ^~~~~~~~~~~
p1577.cpp:252:18: error: 'basic_string_view' has not been declared
  252 | path& operator+=(basic_string_view<value_type> x); path& operator+=(const value_type* x);
      |                  ^~~~~~~~~~~~~~~~~
p1577.cpp:252:35: error: expected ',' or '...' before '<' token
  252 | path& operator+=(basic_string_view<value_type> x); path& operator+=(const value_type* x);
      |                                   ^
p1577.cpp:252:75: error: 'value_type' does not name a type
  252 | path& operator+=(basic_string_view<value_type> x); path& operator+=(const value_type* x);
      |                                                                           ^~~~~~~~~~
p1577.cpp:253:18: error: 'value_type' has not been declared
  253 | path& operator+=(value_type x);
      |                  ^~~~~~~~~~
p1577.cpp:253:7: error: 'std::filesystem::path& std::filesystem::path::operator+=(int)' cannot be overloaded with 'std::filesystem::path& std::filesystem::path::operator+=(int)'
  253 | path& operator+=(value_type x);
      |       ^~~~~~~~
p1577.cpp:252:7: note: previous declaration 'std::filesystem::path& std::filesystem::path::operator+=(int)'
  252 | path& operator+=(basic_string_view<value_type> x); path& operator+=(const value_type* x);
      |       ^~~~~~~~
p1577.cpp:263:12: error: expected ';' at end of member declaration
  263 | void clear() noexcept;
      |            ^
      |             ;
p1577.cpp:263:14: error: 'noexcept' does not name a type
  263 | void clear() noexcept;
      |              ^~~~~~~~
p1577.cpp:263:14: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:267:79: error: expected ';' at end of member declaration
  267 | path& replace_extension(const path& replacement = path()); void swap(path& rhs) noexcept;
      |                                                                               ^
      |                                                                                ;
p1577.cpp:267:81: error: 'noexcept' does not name a type
  267 | path& replace_extension(const path& replacement = path()); void swap(path& rhs) noexcept;
      |                                                                                 ^~~~~~~~
p1577.cpp:267:81: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:269:56: error: expected ';' at end of member declaration
  269 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      |                                                        ^
      |                                                         ;
p1577.cpp:269:58: error: 'noexcept' does not name a type
  269 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      |                                                          ^~~~~~~~
p1577.cpp:269:58: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:270:8: error: 'strong_ordering' does not name a type
  270 | friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
      |        ^~~~~~~~~~~~~~~
p1577.cpp:273:7: error: 'string_type' does not name a type
  273 | const string_type& native() const noexcept; const value_type* c_str() const noexcept; operator string_type() const;
      |       ^~~~~~~~~~~
p1577.cpp:273:51: error: 'value_type' does not name a type
  273 | const string_type& native() const noexcept; const value_type* c_str() const noexcept; operator string_type() const;
      |                                                   ^~~~~~~~~~
p1577.cpp:273:96: error: expected type-specifier before 'string_type'
  273 | const string_type& native() const noexcept; const value_type* c_str() const noexcept; operator string_type() const;
      |                                                                                                ^~~~~~~~~~~
p1577.cpp:275:44: error: spurious '>>', use '>' to terminate a template argument list
  275 |          class Allocator = allocator<EcharT>>
      |                                            ^~
p1577.cpp:276:32: error: 'Allocator' was not declared in this scope; did you mean 'allocator'?
  276 |   basic_string<EcharT, traits, Allocator>
      |                                ^~~~~~~~~
      |                                allocator
p1577.cpp:276:41: error: template argument 3 is invalid
  276 |   basic_string<EcharT, traits, Allocator>
      |                                         ^
p1577.cpp:277:18: error: 'Allocator' does not name a type; did you mean 'allocator'?
  277 |     string(const Allocator& a = Allocator()) const;
      |                  ^~~~~~~~~
      |                  allocator
p1577.cpp:277:31: error: default arguments are only permitted for function parameters [-fpermissive]
  277 |     string(const Allocator& a = Allocator()) const;
      |                               ^
p1577.cpp:275:28: error: two or more data types in declaration of 'type name'
  275 |          class Allocator = allocator<EcharT>>
      |                            ^~~~~~~~~~~~~~~~~~
p1577.cpp:277:51: error: expected '>' before ';' token
  277 |     string(const Allocator& a = Allocator()) const;
      |                                                   ^
p1577.cpp:277:51: error: expected unqualified-id before ';' token
p1577.cpp:280:6: error: 'u8string' in namespace 'std' does not name a type
  280 | std::u8string  u8string() const;
      |      ^~~~~~~~
p1577.cpp:280:1: note: 'std::u8string' is only available from C++20 onwards
  280 | std::u8string  u8string() const;
      | ^~~
p1577.cpp:281:6: error: 'u16string' in namespace 'std' does not name a type
  281 | std::u16string u16string() const;
      |      ^~~~~~~~~
p1577.cpp:281:1: note: 'std::u16string' is only available from C++11 onwards
  281 | std::u16string u16string() const;
      | ^~~
p1577.cpp:282:6: error: 'u32string' in namespace 'std' does not name a type
  282 | std::u32string u32string() const;
      |      ^~~~~~~~~
p1577.cpp:282:1: note: 'std::u32string' is only available from C++11 onwards
  282 | std::u32string u32string() const;
      | ^~~
p1577.cpp:285:44: error: spurious '>>', use '>' to terminate a template argument list
  285 |          class Allocator = allocator<EcharT>>
      |                                            ^~
p1577.cpp:286:32: error: 'Allocator' was not declared in this scope; did you mean 'allocator'?
  286 |   basic_string<EcharT, traits, Allocator>
      |                                ^~~~~~~~~
      |                                allocator
p1577.cpp:286:41: error: template argument 3 is invalid
  286 |   basic_string<EcharT, traits, Allocator>
      |                                         ^
p1577.cpp:285:28: error: two or more data types in declaration of 'type name'
  285 |          class Allocator = allocator<EcharT>>
      |                            ^~~~~~~~~~~~~~~~~~
p1577.cpp:287:5: error: expected '>' before 'generic_string'
  287 |     generic_string(const Allocator& a = Allocator()) const;
      |     ^~~~~~~~~~~~~~
p1577.cpp:287:59: error: expected unqualified-id before ';' token
  287 |     generic_string(const Allocator& a = Allocator()) const;
      |                                                           ^
p1577.cpp:290:6: error: 'u8string' in namespace 'std' does not name a type
  290 | std::u8string  generic_u8string() const;
      |      ^~~~~~~~
p1577.cpp:290:1: note: 'std::u8string' is only available from C++20 onwards
  290 | std::u8string  generic_u8string() const;
      | ^~~
p1577.cpp:291:6: error: 'u16string' in namespace 'std' does not name a type
  291 | std::u16string generic_u16string() const;
      |      ^~~~~~~~~
p1577.cpp:291:1: note: 'std::u16string' is only available from C++11 onwards
  291 | std::u16string generic_u16string() const;
      | ^~~
p1577.cpp:292:6: error: 'u32string' in namespace 'std' does not name a type
  292 | std::u32string generic_u32string() const;
      |      ^~~~~~~~~
p1577.cpp:292:1: note: 'std::u32string' is only available from C++11 onwards
  292 | std::u32string generic_u32string() const;
      | ^~~
p1577.cpp:294:28: error: expected ';' at end of member declaration
  294 | int compare(const path& p) const noexcept;
      |                            ^~~~~
      |                                 ;
p1577.cpp:294:34: error: 'noexcept' does not name a type
  294 | int compare(const path& p) const noexcept;
      |                                  ^~~~~~~~
p1577.cpp:294:34: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:295:19: error: 'string_type' does not name a type
  295 | int compare(const string_type& s) const;
      |                   ^~~~~~~~~~~
p1577.cpp:296:13: error: 'basic_string_view' has not been declared
  296 | int compare(basic_string_view<value_type> s) const; int compare(const value_type* s) const;
      |             ^~~~~~~~~~~~~~~~~
p1577.cpp:296:30: error: expected ',' or '...' before '<' token
  296 | int compare(basic_string_view<value_type> s) const; int compare(const value_type* s) const;
      |                              ^
p1577.cpp:296:71: error: 'value_type' does not name a type
  296 | int compare(basic_string_view<value_type> s) const; int compare(const value_type* s) const;
      |                                                                       ^~~~~~~~~~
p1577.cpp:305:1: error: expected unqualified-id before '[' token
  305 | [[nodiscard]] bool empty() const noexcept; bool has_root_name() const;
      | ^
p1577.cpp:320:7: error: expected nested-name-specifier before 'const_iterator'
  320 | using const_iterator = iterator;
      |       ^~~~~~~~~~~~~~
p1577.cpp:324:33: error: 'charT' was not declared in this scope; did you mean 'char'?
  324 |            friend basic_ostream<charT, traits>&
      |                                 ^~~~~
      |                                 char
p1577.cpp:324:40: error: 'traits' was not declared in this scope
  324 |            friend basic_ostream<charT, traits>&
      |                                        ^~~~~~
p1577.cpp:324:46: error: template argument 1 is invalid
  324 |            friend basic_ostream<charT, traits>&
      |                                              ^
p1577.cpp:324:46: error: template argument 2 is invalid
p1577.cpp:325:39: error: 'charT' was not declared in this scope; did you mean 'char'?
  325 |              operator<<(basic_ostream<charT, traits>& os, const path& p);
      |                                       ^~~~~
      |                                       char
p1577.cpp:325:46: error: 'traits' was not declared in this scope
  325 |              operator<<(basic_ostream<charT, traits>& os, const path& p);
      |                                              ^~~~~~
p1577.cpp:325:52: error: template argument 1 is invalid
  325 |              operator<<(basic_ostream<charT, traits>& os, const path& p);
      |                                                    ^
p1577.cpp:325:52: error: template argument 2 is invalid
p1577.cpp:227:49: error: 'auto_format' was not declared in this scope
  227 |         path(const Source& source, format fmt = auto_format);
      |                                                 ^~~~~~~~~~~
p1577.cpp:229:68: error: 'auto_format' was not declared in this scope
  229 |         path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                                    ^~~~~~~~~~~
p1577.cpp:231:68: error: 'auto_format' was not declared in this scope
  231 |         path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                                    ^~~~~~~~~~~
p1577.cpp:233:79: error: 'auto_format' was not declared in this scope
  233 | path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format); ~path();
      |                                                                               ^~~~~~~~~~~
p1577.cpp:400:11: error: expected constructor, destructor, or type conversion before 'noexcept'
  400 |    path() noexcept;
      |           ^~~~~~~~
p1577.cpp:402:12: error: 'path' does not name a type
  402 | path(const path& p);
      |            ^~~~
p1577.cpp:402:20: error: expected constructor, destructor, or type conversion before ';' token
  402 | path(const path& p);
      |                    ^
p1577.cpp:403:8: error: expected constructor, destructor, or type conversion before '(' token
  403 |    path(path&& p) noexcept;
      |        ^
p1577.cpp:404:5: error: expected constructor, destructor, or type conversion before '(' token
  404 | path(string_type&& source, format fmt = auto_format);
      |     ^
p1577.cpp:407:30: error: 'format' has not been declared
  407 |   path(const Source& source, format fmt = auto_format);
      |                              ^~~~~~
p1577.cpp:407:43: error: 'auto_format' was not declared in this scope
  407 |   path(const Source& source, format fmt = auto_format);
      |                                           ^~~~~~~~~~~
p1577.cpp:407:55: error: expected constructor, destructor, or type conversion before ';' token
  407 |   path(const Source& source, format fmt = auto_format);
      |                                                       ^
p1577.cpp:409:49: error: 'format' has not been declared
  409 |   path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                 ^~~~~~
p1577.cpp:409:62: error: 'auto_format' was not declared in this scope
  409 |   path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                              ^~~~~~~~~~~
p1577.cpp:409:74: error: expected constructor, destructor, or type conversion before ';' token
  409 |   path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                                          ^
p1577.cpp:412:49: error: 'format' has not been declared
  412 |   path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                 ^~~~~~
p1577.cpp:412:62: error: 'auto_format' was not declared in this scope
  412 |   path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                              ^~~~~~~~~~~
p1577.cpp:412:74: error: expected constructor, destructor, or type conversion before ';' token
  412 |   path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                                          ^
p1577.cpp:414:68: error: 'format' has not been declared
  414 |   path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
      |                                                                    ^~~~~~
p1577.cpp:414:81: error: 'auto_format' was not declared in this scope
  414 |   path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
      |                                                                                 ^~~~~~~~~~~
p1577.cpp:414:93: error: expected constructor, destructor, or type conversion before ';' token
  414 |   path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
      |                                                                                             ^
p1577.cpp:421:31: error: 'read_latin1_data' was not declared in this scope
  421 |   std::string latin1_string = read_latin1_data();
      |                               ^~~~~~~~~~~~~~~~
p1577.cpp:422:3: error: 'codecvt_8859_1' does not name a type
  422 |   codecvt_8859_1<wchar_t> latin1_facet;
      |   ^~~~~~~~~~~~~~
p1577.cpp:423:44: error: 'latin1_facet' was not declared in this scope
  423 |   std::locale latin1_locale(std::locale(), latin1_facet);
      |                                            ^~~~~~~~~~~~
p1577.cpp:424:23: error: expected constructor, destructor, or type conversion before '(' token
  424 |   fs::create_directory(fs::path(latin1_string, latin1_locale));
      |                       ^
p1577.cpp:427:1: error: 'path' does not name a type
  427 | path& operator=(const path& p);
      | ^~~~
p1577.cpp:431:1: error: 'path' does not name a type
  431 | path& operator=(path&& p) noexcept;
      | ^~~~
p1577.cpp:435:1: error: 'path' does not name a type
  435 | path& operator=(string_type&& source);
      | ^~~~
p1577.cpp:436:1: error: 'path' does not name a type
  436 | path& assign(string_type&& source);
      | ^~~~
p1577.cpp:440:3: error: 'path' does not name a type
  440 |   path& operator=(const Source& source);
      |   ^~~~
p1577.cpp:442:3: error: 'path' does not name a type
  442 |   path& assign(const Source& source);
      |   ^~~~
p1577.cpp:444:3: error: 'path' does not name a type
  444 |   path& assign(InputIterator first, InputIterator last);
      |   ^~~~
p1577.cpp:449:3: error: 'path' does not name a type
  449 |   path& operator/=(const Source& source);
      |   ^~~~
p1577.cpp:451:3: error: 'path' does not name a type
  451 |   path& append(const Source& source);
      |   ^~~~
p1577.cpp:456:6: error: 'path' does not name a type
  456 |      path& operator/=(const path& p);
      |      ^~~~
p1577.cpp:462:7: error: expected constructor, destructor, or type conversion before '(' token
  462 |   path("foo") /= path("");
      |       ^
p1577.cpp:463:7: error: expected constructor, destructor, or type conversion before '(' token
  463 |   path("foo") /= path("/bar");
      |       ^
p1577.cpp:465:7: error: expected constructor, destructor, or type conversion before '(' token
  465 |   path("foo") /= path("");
      |       ^
p1577.cpp:466:7: error: expected constructor, destructor, or type conversion before '(' token
  466 |   path("foo") /= path("/bar");
      |       ^
p1577.cpp:467:7: error: expected constructor, destructor, or type conversion before '(' token
  467 |   path("foo") /= path("c:/bar");
      |       ^
p1577.cpp:468:7: error: expected constructor, destructor, or type conversion before '(' token
  468 |   path("foo") /= path("c:");
      |       ^
p1577.cpp:469:7: error: expected constructor, destructor, or type conversion before '(' token
  469 |   path("c:") /= path("");
      |       ^
p1577.cpp:470:7: error: expected constructor, destructor, or type conversion before '(' token
  470 |   path("c:foo") /= path("/bar");
      |       ^
p1577.cpp:471:7: error: expected constructor, destructor, or type conversion before '(' token
  471 |   path("c:foo") /= path("c:bar");
      |       ^
p1577.cpp:478:3: error: 'path' does not name a type
  478 |   path& append(InputIterator first, InputIterator last);
      |   ^~~~
p1577.cpp:480:1: error: expected unqualified-id before 'return'
  480 | return operator/=(path(first, last));
      | ^~~~~~
p1577.cpp:482:1: error: 'path' does not name a type
  482 | path& operator+=(const path& x);
      | ^~~~
p1577.cpp:483:1: error: 'path' does not name a type
  483 | path& operator+=(const string_type& x);
      | ^~~~
p1577.cpp:484:1: error: 'path' does not name a type
  484 | path& operator+=(basic_string_view<value_type> x);
      | ^~~~
p1577.cpp:485:1: error: 'path' does not name a type
  485 | path& operator+=(const value_type* x);
      | ^~~~
p1577.cpp:487:3: error: 'path' does not name a type
  487 |   path& operator+=(const Source& x);
      |   ^~~~
p1577.cpp:489:1: error: 'path' does not name a type
  489 | path& concat(const Source& x);
      | ^~~~
p1577.cpp:490:1: error: 'path' does not name a type
  490 | path& operator+=(value_type x);
      | ^~~~
p1577.cpp:492:3: error: 'path' does not name a type
  492 |   path& operator+=(EcharT x);
      |   ^~~~
p1577.cpp:494:1: error: expected unqualified-id before 'return'
  494 | return *this += basic_string_view(&x, 1);
      | ^~~~~~
p1577.cpp:499:6: error: 'path' does not name a type
  499 |      path& concat(InputIterator first, InputIterator last);
      |      ^~~~
p1577.cpp:501:1: error: expected unqualified-id before 'return'
  501 | return *this += path(first, last);
      | ^~~~~~
p1577.cpp:503:14: error: expected initializer before 'noexcept'
  503 | void clear() noexcept;
      |              ^~~~~~~~
p1577.cpp:505:1: error: 'path' does not name a type
  505 | path& make_preferred();
      | ^~~~
p1577.cpp:508:3: error: 'path' does not name a type
  508 |   path p("foo/bar");
      |   ^~~~
p1577.cpp:509:8: error: 'cout' in namespace 'std' does not name a type
  509 |   std::cout << p << '\n';
      |        ^~~~
In file included from N4910.h:2:
/usr/local/include/c++/12.1.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
p1577.cpp:510:3: error: 'p' does not name a type
  510 |   p.make_preferred();
      |   ^
p1577.cpp:511:8: error: 'cout' in namespace 'std' does not name a type
  511 |   std::cout << p << '\n';
      |        ^~~~
/usr/local/include/c++/12.1.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
p1577.cpp:514:1: error: 'path' does not name a type
  514 | path& remove_filename();
      | ^~~~
p1577.cpp:515:7: error: expected constructor, destructor, or type conversion before '(' token
  515 |   path("foo/bar").remove_filename();
      |       ^
p1577.cpp:516:7: error: expected constructor, destructor, or type conversion before '(' token
  516 |   path("foo/").remove_filename();
      |       ^
p1577.cpp:517:7: error: expected constructor, destructor, or type conversion before '(' token
  517 |   path("/foo").remove_filename();
      |       ^
p1577.cpp:518:7: error: expected constructor, destructor, or type conversion before '(' token
  518 |   path("/").remove_filename();
      |       ^
p1577.cpp:521:1: error: 'path' does not name a type
  521 | path& replace_filename(const path& replacement);
      | ^~~~
p1577.cpp:523:13: error: expected constructor, destructor, or type conversion before '(' token
  523 |   operator/=(replacement);
      |             ^
p1577.cpp:525:7: error: expected constructor, destructor, or type conversion before '(' token
  525 |   path("/foo").replace_filename("bar");
      |       ^
p1577.cpp:526:7: error: expected constructor, destructor, or type conversion before '(' token
  526 |   path("/").replace_filename("bar");
      |       ^
p1577.cpp:528:1: error: 'path' does not name a type
  528 | path& replace_extension(const path& replacement = path());
      | ^~~~
p1577.cpp:533:14: error: 'EcharT' was not declared in this scope; did you mean 'char'?
  533 | basic_string<EcharT, traits, Allocator>
      |              ^~~~~~
      |              char
p1577.cpp:533:22: error: 'traits' was not declared in this scope
  533 | basic_string<EcharT, traits, Allocator>
      |                      ^~~~~~
p1577.cpp:533:30: error: 'Allocator' was not declared in this scope; did you mean 'alloca'?
  533 | basic_string<EcharT, traits, Allocator>
      |                              ^~~~~~~~~
      |                              alloca
p1577.cpp:533:39: error: template argument 1 is invalid
  533 | basic_string<EcharT, traits, Allocator>
      |                                       ^
p1577.cpp:533:39: error: template argument 2 is invalid
p1577.cpp:533:39: error: template argument 3 is invalid
p1577.cpp:534:24: error: 'Allocator' does not name a type; did you mean 'alloca'?
  534 |   generic_string(const Allocator& a = Allocator()) const;
      |                        ^~~~~~~~~
      |                        alloca
p1577.cpp:534:39: error: 'Allocator' was not declared in this scope; did you mean 'alloca'?
  534 |   generic_string(const Allocator& a = Allocator()) const;
      |                                       ^~~~~~~~~
      |                                       alloca
p1577.cpp:534:52: error: non-member function 'int generic_string(const int&)' cannot have cv-qualifier
  534 |   generic_string(const Allocator& a = Allocator()) const;
      |                                                    ^~~~~
p1577.cpp:538:9: error: variable or field 'swap' declared void
  538 |    void swap(path& rhs) noexcept;
      |         ^~~~
p1577.cpp:538:14: error: 'path' was not declared in this scope; did you mean 'std::filesystem::path'?
  538 |    void swap(path& rhs) noexcept;
      |              ^~~~
      |              std::filesystem::path
p1577.cpp:216:11: note: 'std::filesystem::path' declared here
  216 |     class path {
      |           ^~~~
p1577.cpp:538:20: error: 'rhs' was not declared in this scope
  538 |    void swap(path& rhs) noexcept;
      |                    ^~~
p1577.cpp:542:7: error: 'string_type' does not name a type
  542 | const string_type& native() const noexcept;
      |       ^~~~~~~~~~~
p1577.cpp:546:47: error: spurious '>>', use '>' to terminate a template argument list
  546 |             class Allocator = allocator<EcharT>>
      |                                               ^~
p1577.cpp:548:7: error: expected '>' before 'value_type'
  548 | const value_type* c_str() const noexcept;
      |       ^~~~~~~~~~
p1577.cpp:548:41: error: expected unqualified-id before ';' token
  548 | const value_type* c_str() const noexcept;
      |                                         ^
p1577.cpp:550:1: error: expected unqualified-id before 'return'
  550 | return native().c_str(); operator string_type() const;
      | ^~~~~~
p1577.cpp:550:35: error: expected type-specifier before 'string_type'
  550 | return native().c_str(); operator string_type() const;
      |                                   ^~~~~~~~~~~
p1577.cpp:553:44: error: spurious '>>', use '>' to terminate a template argument list
  553 |          class Allocator = allocator<EcharT>>
      |                                            ^~
p1577.cpp:554:30: error: 'Allocator' was not declared in this scope; did you mean 'alloca'?
  554 | basic_string<EcharT, traits, Allocator>
      |                              ^~~~~~~~~
      |                              alloca
p1577.cpp:554:39: error: template argument 3 is invalid
  554 | basic_string<EcharT, traits, Allocator>
      |                                       ^
p1577.cpp:555:16: error: 'Allocator' does not name a type; did you mean 'alloca'?
  555 |   string(const Allocator& a = Allocator()) const;
      |                ^~~~~~~~~
      |                alloca
p1577.cpp:555:31: error: there are no arguments to 'Allocator' that depend on a template parameter, so a declaration of 'Allocator' must be available [-fpermissive]
  555 |   string(const Allocator& a = Allocator()) const;
      |                               ^~~~~~~~~
p1577.cpp:555:31: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
p1577.cpp:555:29: error: default arguments are only permitted for function parameters [-fpermissive]
  555 |   string(const Allocator& a = Allocator()) const;
      |                             ^
p1577.cpp:553:28: error: two or more data types in declaration of 'type name'
  553 |          class Allocator = allocator<EcharT>>
      |                            ^~~~~~~~~~~~~~~~~~
p1577.cpp:555:49: error: expected '>' before ';' token
  555 |   string(const Allocator& a = Allocator()) const;
      |                                                 ^
p1577.cpp:555:49: error: expected unqualified-id before ';' token
p1577.cpp:558:22: error: non-member function 'std::string string()' cannot have cv-qualifier
  558 | std::string string() const;
      |                      ^~~~~
p1577.cpp:559:24: error: non-member function 'std::wstring wstring()' cannot have cv-qualifier
  559 | std::wstring wstring() const;
      |                        ^~~~~
p1577.cpp:560:6: error: 'u8string' in namespace 'std' does not name a type
  560 | std::u8string u8string() const;
      |      ^~~~~~~~
p1577.cpp:560:1: note: 'std::u8string' is only available from C++20 onwards
  560 | std::u8string u8string() const;
      | ^~~
p1577.cpp:561:6: error: 'u16string' in namespace 'std' does not name a type
  561 | std::u16string u16string() const;
      |      ^~~~~~~~~
p1577.cpp:561:1: note: 'std::u16string' is only available from C++11 onwards
  561 | std::u16string u16string() const;
      | ^~~
p1577.cpp:562:6: error: 'u32string' in namespace 'std' does not name a type
  562 | std::u32string u32string() const;
      |      ^~~~~~~~~
p1577.cpp:562:1: note: 'std::u32string' is only available from C++11 onwards
  562 | std::u32string u32string() const;
      | ^~~
p1577.cpp:566:30: error: non-member function 'std::string generic_string()' cannot have cv-qualifier
  566 | std::string generic_string() const;
      |                              ^~~~~
p1577.cpp:567:32: error: non-member function 'std::wstring generic_wstring()' cannot have cv-qualifier
  567 | std::wstring generic_wstring() const;
      |                                ^~~~~
p1577.cpp:568:6: error: 'u8string' in namespace 'std' does not name a type
  568 | std::u8string generic_u8string() const;
      |      ^~~~~~~~
p1577.cpp:568:1: note: 'std::u8string' is only available from C++20 onwards
  568 | std::u8string generic_u8string() const;
      | ^~~
p1577.cpp:569:6: error: 'u16string' in namespace 'std' does not name a type
  569 | std::u16string generic_u16string() const;
      |      ^~~~~~~~~
p1577.cpp:569:1: note: 'std::u16string' is only available from C++11 onwards
  569 | std::u16string generic_u16string() const;
      | ^~~
p1577.cpp:570:6: error: 'u32string' in namespace 'std' does not name a type
  570 | std::u32string generic_u32string() const;
      |      ^~~~~~~~~
p1577.cpp:570:1: note: 'std::u32string' is only available from C++11 onwards
  570 | std::u32string generic_u32string() const;
      | ^~~
p1577.cpp:580:19: error: 'path' does not name a type
  580 | int compare(const path& p) const noexcept;
      |                   ^~~~
p1577.cpp:580:34: error: expected initializer before 'noexcept'
  580 | int compare(const path& p) const noexcept;
      |                                  ^~~~~~~~
p1577.cpp:581:19: error: 'string_type' does not name a type
  581 | int compare(const string_type& s) const;
      |                   ^~~~~~~~~~~
p1577.cpp:581:35: error: non-member function 'int compare(const int&)' cannot have cv-qualifier
  581 | int compare(const string_type& s) const;
      |                                   ^~~~~
p1577.cpp:582:13: error: 'int compare' redeclared as different kind of entity
  582 | int compare(basic_string_view<value_type> s) const;
      |             ^~~~~~~~~~~~~~~~~
p1577.cpp:581:5: note: previous declaration 'int compare(const int&)'
  581 | int compare(const string_type& s) const;
      |     ^~~~~~~
p1577.cpp:582:13: error: 'basic_string_view' was not declared in this scope
  582 | int compare(basic_string_view<value_type> s) const;
      |             ^~~~~~~~~~~~~~~~~
p1577.cpp:582:13: note: 'std::basic_string_view' is only available from C++17 onwards
p1577.cpp:582:31: error: 'value_type' was not declared in this scope
  582 | int compare(basic_string_view<value_type> s) const;
      |                               ^~~~~~~~~~
p1577.cpp:582:43: error: 's' was not declared in this scope; did you mean 'fs'?
  582 | int compare(basic_string_view<value_type> s) const;
      |                                           ^
      |                                           fs
p1577.cpp:583:19: error: 'value_type' does not name a type
  583 | int compare(const value_type* s) const;
      |                   ^~~~~~~~~~
p1577.cpp:583:34: error: non-member function 'int compare(const int*)' cannot have cv-qualifier
  583 | int compare(const value_type* s) const;
      |                                  ^~~~~
p1577.cpp:586:1: error: 'path' does not name a type
  586 | path root_name() const;
      | ^~~~
p1577.cpp:588:1: error: 'path' does not name a type
  588 | path root_directory() const;
      | ^~~~
p1577.cpp:590:1: error: 'path' does not name a type
  590 | path root_path() const;
      | ^~~~
p1577.cpp:592:1: error: 'path' does not name a type
  592 | path relative_path() const;
      | ^~~~
p1577.cpp:594:1: error: 'path' does not name a type
  594 | path parent_path() const;
      | ^~~~
p1577.cpp:596:1: error: 'path' does not name a type
  596 | path filename() const;
      | ^~~~
p1577.cpp:599:5: error: expected constructor, destructor, or type conversion before '(' token
  599 | path("/foo/bar.txt").filename();
      |     ^
p1577.cpp:600:5: error: expected constructor, destructor, or type conversion before '(' token
  600 | path("/foo/bar").filename();
      |     ^
p1577.cpp:601:5: error: expected constructor, destructor, or type conversion before '(' token
  601 | path("/foo/bar/").filename();
      |     ^
p1577.cpp:602:5: error: expected constructor, destructor, or type conversion before '(' token
  602 | path("/").filename();
      |     ^
p1577.cpp:603:5: error: expected constructor, destructor, or type conversion before '(' token
  603 | path("//host").filename();
      |     ^
p1577.cpp:604:5: error: expected constructor, destructor, or type conversion before '(' token
  604 | path(".").filename();
      |     ^
p1577.cpp:605:5: error: expected constructor, destructor, or type conversion before '(' token
  605 | path("..").filename();
      |     ^
p1577.cpp:610:2: error: 'path' does not name a type
  610 |  path stem() const;
      |  ^~~~
p1577.cpp:614:6: error: 'cout' in namespace 'std' does not name a type
  614 | std::cout << path("/foo/bar.txt").stem();
      |      ^~~~
/usr/local/include/c++/12.1.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
p1577.cpp:615:1: error: 'path' does not name a type
  615 | path p = "foo.bar.baz.tar";
      | ^~~~
p1577.cpp:616:1: error: expected unqualified-id before 'for'
  616 | for (; !p.extension().empty(); p = p.stem())
      | ^~~
p1577.cpp:616:8: error: expected unqualified-id before '!' token
  616 | for (; !p.extension().empty(); p = p.stem())
      |        ^
p1577.cpp:616:32: error: 'p' does not name a type
  616 | for (; !p.extension().empty(); p = p.stem())
      |                                ^
p1577.cpp:621:1: error: 'path' does not name a type
  621 | path extension() const;
      | ^~~~
p1577.cpp:623:7: error: expected constructor, destructor, or type conversion before '(' token
  623 |   path("/foo/bar.txt").extension();
      |       ^
p1577.cpp:624:7: error: expected constructor, destructor, or type conversion before '(' token
  624 |   path("/foo/bar").extension();
      |       ^
p1577.cpp:625:7: error: expected constructor, destructor, or type conversion before '(' token
  625 |   path("/foo/.profile").extension();
      |       ^
p1577.cpp:626:7: error: expected constructor, destructor, or type conversion before '(' token
  626 |   path(".bar").extension();
      |       ^
p1577.cpp:627:7: error: expected constructor, destructor, or type conversion before '(' token
  627 |   path("..bar").extension();
      |       ^
p1577.cpp:634:1: error: expected unqualified-id before '[' token
  634 | [[nodiscard]] bool empty() const noexcept;
      | ^
p1577.cpp:636:22: error: non-member function 'bool has_root_path()' cannot have cv-qualifier
  636 | bool has_root_path() const;
      |                      ^~~~~
p1577.cpp:638:22: error: non-member function 'bool has_root_name()' cannot have cv-qualifier
  638 | bool has_root_name() const;
      |                      ^~~~~
p1577.cpp:640:27: error: non-member function 'bool has_root_directory()' cannot have cv-qualifier
  640 | bool has_root_directory() const;
      |                           ^~~~~
p1577.cpp:642:26: error: non-member function 'bool has_relative_path()' cannot have cv-qualifier
  642 | bool has_relative_path() const;
      |                          ^~~~~
p1577.cpp:644:24: error: non-member function 'bool has_parent_path()' cannot have cv-qualifier
  644 | bool has_parent_path() const;
      |                        ^~~~~
p1577.cpp:646:21: error: non-member function 'bool has_filename()' cannot have cv-qualifier
  646 | bool has_filename() const;
      |                     ^~~~~
p1577.cpp:648:17: error: non-member function 'bool has_stem()' cannot have cv-qualifier
  648 | bool has_stem() const;
      |                 ^~~~~
p1577.cpp:650:22: error: non-member function 'bool has_extension()' cannot have cv-qualifier
  650 | bool has_extension() const;
      |                      ^~~~~
p1577.cpp:652:26: error: non-member function 'bool is_absolute()' cannot have cv-qualifier
  652 |       bool is_absolute() const;
      |                          ^~~~~
p1577.cpp:655:20: error: non-member function 'bool is_relative()' cannot have cv-qualifier
  655 | bool is_relative() const;
      |                    ^~~~~
p1577.cpp:658:1: error: 'path' does not name a type
  658 | path lexically_normal() const;
      | ^~~~
In file included from /usr/local/include/c++/12.1.0/cassert:44,
                 from N4910.h:6:
p1577.cpp:661:1: error: expected unqualified-id before 'static_cast'
  661 | assert(path("foo/./bar/..").lexically_normal() == "foo/");
      | ^~~~~~
p1577.cpp:661:1: error: expected ')' before 'static_cast'
  661 | assert(path("foo/./bar/..").lexically_normal() == "foo/");
      | ^~~~~~
p1577.cpp:662:3: error: expected unqualified-id before 'static_cast'
  662 |   assert(path("foo/.///bar/../").lexically_normal() == "foo/");
      |   ^~~~~~
p1577.cpp:662:3: error: expected ')' before 'static_cast'
  662 |   assert(path("foo/.///bar/../").lexically_normal() == "foo/");
      |   ^~~~~~
p1577.cpp:664:1: error: 'path' does not name a type
  664 | path lexically_relative(const path& base) const;
      | ^~~~
p1577.cpp:671:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |   ^~~~
      |   ----
p1577.cpp:671:8: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |        ^
p1577.cpp:671:8: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |        ^~~~~~
p1577.cpp:671:8: error: structured binding declaration cannot be C++98 'auto'
p1577.cpp:671:8: error: structured binding declaration cannot have type 'int'
p1577.cpp:671:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
p1577.cpp:671:26: error: 'begin' was not declared in this scope
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                          ^~~~~
p1577.cpp:671:26: note: 'std::begin' is only available from C++11 onwards
p1577.cpp:671:35: error: 'end' was not declared in this scope
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                   ^~~
p1577.cpp:671:35: note: 'std::end' is only available from C++11 onwards
p1577.cpp:671:42: error: 'base' was not declared in this scope
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                          ^~~~
p1577.cpp:671:56: error: 'base' was not declared in this scope
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                                        ^~~~
p1577.cpp:681:3: error: expected unqualified-id before 'static_cast'
  681 |   assert(path("/a/d").lexically_relative("/a/b/c") == "../../d");
      |   ^~~~~~
p1577.cpp:681:3: error: expected ')' before 'static_cast'
  681 |   assert(path("/a/d").lexically_relative("/a/b/c") == "../../d");
      |   ^~~~~~
p1577.cpp:682:3: error: expected unqualified-id before 'static_cast'
  682 |   assert(path("/a/b/c").lexically_relative("/a/d") == "../b/c");
      |   ^~~~~~
p1577.cpp:682:3: error: expected ')' before 'static_cast'
  682 |   assert(path("/a/b/c").lexically_relative("/a/d") == "../b/c");
      |   ^~~~~~
p1577.cpp:683:3: error: expected unqualified-id before 'static_cast'
  683 |   assert(path("a/b/c").lexically_relative("a") == "b/c");
      |   ^~~~~~
p1577.cpp:683:3: error: expected ')' before 'static_cast'
  683 |   assert(path("a/b/c").lexically_relative("a") == "b/c");
      |   ^~~~~~
p1577.cpp:684:3: error: expected unqualified-id before 'static_cast'
  684 |   assert(path("a/b/c").lexically_relative("a/b/c/x/y") == "../..");
      |   ^~~~~~
p1577.cpp:684:3: error: expected ')' before 'static_cast'
  684 |   assert(path("a/b/c").lexically_relative("a/b/c/x/y") == "../..");
      |   ^~~~~~
p1577.cpp:685:3: error: expected unqualified-id before 'static_cast'
  685 |   assert(path("a/b/c").lexically_relative("a/b/c") == ".");
      |   ^~~~~~
p1577.cpp:685:3: error: expected ')' before 'static_cast'
  685 |   assert(path("a/b/c").lexically_relative("a/b/c") == ".");
      |   ^~~~~~
p1577.cpp:686:3: error: expected unqualified-id before 'static_cast'
  686 |   assert(path("a/b").lexically_relative("c/d") == "../../a/b");
      |   ^~~~~~
p1577.cpp:686:3: error: expected ')' before 'static_cast'
  686 |   assert(path("a/b").lexically_relative("c/d") == "../../a/b");
      |   ^~~~~~
p1577.cpp:699:1: error: 'path' does not name a type
  699 | path lexically_proximate(const path& base) const;
      | ^~~~
p1577.cpp:705:1: error: invalid use of template-name 'std::iterator' without an argument list
  705 | iterator end() const;
      | ^~~~~~~~
p1577.cpp:705:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
In file included from /usr/local/include/c++/12.1.0/string:45,
                 from /usr/local/include/c++/12.1.0/bits/locale_classes.h:40,
                 from /usr/local/include/c++/12.1.0/bits/ios_base.h:41,
                 from /usr/local/include/c++/12.1.0/ios:42,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p1577.cpp:709:3: error: 'friend' used outside of class
  709 |   friend basic_ostream<charT, traits>&
      |   ^~~~~~
      |   ------
p1577.cpp:710:52: error: 'path' does not name a type
  710 | operator<<(basic_ostream<charT, traits>& os, const path& p);
      |                                                    ^~~~
p1577.cpp:715:3: error: 'friend' used outside of class
  715 |   friend basic_istream<charT, traits>&
      |   ^~~~~~
      |   ------
p1577.cpp:716:50: error: 'path' has not been declared
  716 |     operator>>(basic_istream<charT, traits>& is, path& p);
      |                                                  ^~~~
p1577.cpp:718:21: error: 'charT' was not declared in this scope; did you mean 'char'?
  718 |        basic_string<charT, traits> tmp;
      |                     ^~~~~
      |                     char
p1577.cpp:718:28: error: 'traits' was not declared in this scope
  718 |        basic_string<charT, traits> tmp;
      |                            ^~~~~~
p1577.cpp:718:34: error: template argument 1 is invalid
  718 |        basic_string<charT, traits> tmp;
      |                                  ^
p1577.cpp:718:34: error: template argument 2 is invalid
p1577.cpp:718:34: error: template argument 3 is invalid
p1577.cpp:719:8: error: 'is' does not name a type
  719 |        is >> quoted(tmp);
      |        ^~
p1577.cpp:720:8: error: 'p' does not name a type
  720 |        p = tmp;
      |        ^
p1577.cpp:723:6: error: variable or field 'swap' declared void
  723 | void swap(path& lhs, path& rhs) noexcept;
      |      ^~~~
p1577.cpp:723:11: error: 'path' was not declared in this scope; did you mean 'std::filesystem::path'?
  723 | void swap(path& lhs, path& rhs) noexcept;
      |           ^~~~
      |           std::filesystem::path
p1577.cpp:216:11: note: 'std::filesystem::path' declared here
  216 |     class path {
      |           ^~~~
p1577.cpp:723:17: error: 'lhs' was not declared in this scope
  723 | void swap(path& lhs, path& rhs) noexcept;
      |                 ^~~
p1577.cpp:723:22: error: 'path' was not declared in this scope; did you mean 'std::filesystem::path'?
  723 | void swap(path& lhs, path& rhs) noexcept;
      |                      ^~~~
      |                      std::filesystem::path
p1577.cpp:216:11: note: 'std::filesystem::path' declared here
  216 |     class path {
      |           ^~~~
p1577.cpp:723:28: error: 'rhs' was not declared in this scope
  723 | void swap(path& lhs, path& rhs) noexcept;
      |                            ^~~
p1577.cpp:729:30: error: 'path' does not name a type
  729 |      size_t hash_value(const path& p) noexcept;
      |                              ^~~~
p1577.cpp:729:39: error: expected initializer before 'noexcept'
  729 |      size_t hash_value(const path& p) noexcept;
      |                                       ^~~~~~~~
p1577.cpp:731:1: error: 'friend' used outside of class
  731 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      | ^~~~~~
      | ------
p1577.cpp:731:30: error: 'path' does not name a type
  731 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      |                              ^~~~
p1577.cpp:731:47: error: 'path' does not name a type
  731 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      |                                               ^~~~
p1577.cpp:731:58: error: expected initializer before 'noexcept'
  731 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      |                                                          ^~~~~~~~
p1577.cpp:738:1: error: 'friend' used outside of class
  738 | friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
      | ^~~~~~
      | ------
p1577.cpp:738:8: error: 'strong_ordering' does not name a type
  738 | friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
      |        ^~~~~~~~~~~~~~~
p1577.cpp:740:1: error: 'friend' used outside of class
  740 | friend path operator/(const path& lhs, const path& rhs);
      | ^~~~~~
      | ------
p1577.cpp:740:8: error: 'path' does not name a type
  740 | friend path operator/(const path& lhs, const path& rhs);
      |        ^~~~
p1577.cpp:743:19: error: explicit specialization of 'template<class T> struct std::hash' outside its namespace must use a nested-name-specifier [-fpermissive]
  743 | template<> struct hash<filesystem::path>;
      |                   ^~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:743:19: error: specialization of 'template<class T> struct std::hash' in different namespace [-fpermissive]
p1577.cpp:179:28: note:   from definition of 'template<class T> struct std::hash'
  179 |   template<class T> struct hash;
      |                            ^~~~
p1577.cpp:748:50: error: expected class-name before '{' token
  748 |     class filesystem_error : public system_error {
      |                                                  ^
p1577.cpp:750:48: error: 'error_code' has not been declared
  750 |       filesystem_error(const string& what_arg, error_code ec);
      |                                                ^~~~~~~~~~
p1577.cpp:752:40: error: 'error_code' has not been declared
  752 |                        const path& p1, error_code ec);
      |                                        ^~~~~~~~~~
p1577.cpp:755:54: error: 'error_code' has not been declared
  755 |                      const path& p1, const path& p2, error_code ec);
      |                                                      ^~~~~~~~~~
p1577.cpp:756:25: error: expected ';' at end of member declaration
  756 |     const path& path1() const noexcept;
      |                         ^~~~~
      |                              ;
p1577.cpp:756:31: error: 'noexcept' does not name a type
  756 |     const path& path1() const noexcept;
      |                               ^~~~~~~~
p1577.cpp:756:31: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:757:25: error: expected ';' at end of member declaration
  757 |     const path& path2() const noexcept;
      |                         ^~~~~
      |                              ;
p1577.cpp:757:31: error: 'noexcept' does not name a type
  757 |     const path& path2() const noexcept;
      |                               ^~~~~~~~
p1577.cpp:757:31: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:758:24: error: expected ';' at end of member declaration
  758 |     const char* what() const noexcept override;
      |                        ^~~~~
      |                             ;
p1577.cpp:758:30: error: 'noexcept' does not name a type
  758 |     const char* what() const noexcept override;
      |                              ^~~~~~~~
p1577.cpp:758:30: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:763:27: error: reference to 'string' is ambiguous
  763 |    filesystem_error(const string& what_arg, error_code ec);
      |                           ^~~~~~
In file included from /usr/local/include/c++/12.1.0/iosfwd:39,
                 from /usr/local/include/c++/12.1.0/ios:38:
/usr/local/include/c++/12.1.0/bits/stringfwd.h:77:33: note: candidates are: 'typedef class std::__cxx11::basic_string<char> std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
p1577.cpp:558:13: note:                 'std::string string()'
  558 | std::string string() const;
      |             ^~~~~~
p1577.cpp:763:45: error: 'error_code' has not been declared
  763 |    filesystem_error(const string& what_arg, error_code ec);
      |                                             ^~~~~~~~~~
p1577.cpp:763:59: error: expected constructor, destructor, or type conversion before ';' token
  763 |    filesystem_error(const string& what_arg, error_code ec);
      |                                                           ^
p1577.cpp:764:29: error: reference to 'string' is ambiguous
  764 |      filesystem_error(const string& what_arg, const path& p1, error_code ec);
      |                             ^~~~~~
/usr/local/include/c++/12.1.0/bits/stringfwd.h:77:33: note: candidates are: 'typedef class std::__cxx11::basic_string<char> std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
p1577.cpp:558:13: note:                 'std::string string()'
  558 | std::string string() const;
      |             ^~~~~~
p1577.cpp:764:53: error: 'path' does not name a type
  764 |      filesystem_error(const string& what_arg, const path& p1, error_code ec);
      |                                                     ^~~~
p1577.cpp:764:63: error: 'error_code' has not been declared
  764 |      filesystem_error(const string& what_arg, const path& p1, error_code ec);
      |                                                               ^~~~~~~~~~
p1577.cpp:764:77: error: expected constructor, destructor, or type conversion before ';' token
  764 |      filesystem_error(const string& what_arg, const path& p1, error_code ec);
      |                                                                             ^
p1577.cpp:773:24: error: reference to 'string' is ambiguous
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                        ^~~~~~
/usr/local/include/c++/12.1.0/bits/stringfwd.h:77:33: note: candidates are: 'typedef class std::__cxx11::basic_string<char> std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
p1577.cpp:558:13: note:                 'std::string string()'
  558 | std::string string() const;
      |             ^~~~~~
p1577.cpp:773:48: error: 'path' does not name a type
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                                                ^~~~
p1577.cpp:773:64: error: 'path' does not name a type
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                                                                ^~~~
p1577.cpp:773:74: error: 'error_code' has not been declared
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                                                                          ^~~~~~~~~~
p1577.cpp:773:88: error: expected constructor, destructor, or type conversion before ';' token
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                                                                                        ^
p1577.cpp:778:7: error: 'path' does not name a type
  778 | const path& path1() const noexcept;
      |       ^~~~
p1577.cpp:801:1: error: 'file_type' does not name a type
  801 | file_type type() const noexcept;
      | ^~~~~~~~~
p1577.cpp:809:13: error: expected ';' at end of member declaration
  809 | file_status() noexcept : file_status(file_type::none) {} explicit file_status(file_type ft,
      |             ^
      |              ;
p1577.cpp:809:15: error: 'noexcept' does not name a type
  809 | file_status() noexcept : file_status(file_type::none) {} explicit file_status(file_type ft,
      |               ^~~~~~~~
p1577.cpp:809:15: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:809:88: error: expected ')' before 'ft'
  809 | file_status() noexcept : file_status(file_type::none) {} explicit file_status(file_type ft,
      |                                                                              ~         ^~~
      |                                                                                        )
p1577.cpp:811:37: error: expected ';' at end of member declaration
  811 |       file_status(const file_status&) noexcept = default;
      |                                     ^
      |                                      ;
p1577.cpp:811:39: error: 'noexcept' does not name a type
  811 |       file_status(const file_status&) noexcept = default;
      |                                       ^~~~~~~~
p1577.cpp:811:39: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:812:24: error: expected ',' or '...' before '&&' token
  812 | file_status(file_status&&) noexcept = default; ~file_status();
      |                        ^~
p1577.cpp:812:1: error: invalid constructor; you probably meant 'std::filesystem::file_status (const std::filesystem::file_status&)'
  812 | file_status(file_status&&) noexcept = default; ~file_status();
      | ^~~~~~~~~~~
p1577.cpp:812:26: error: expected ';' at end of member declaration
  812 | file_status(file_status&&) noexcept = default; ~file_status();
      |                          ^
      |                           ;
p1577.cpp:812:28: error: 'noexcept' does not name a type
  812 | file_status(file_status&&) noexcept = default; ~file_status();
      |                            ^~~~~~~~
p1577.cpp:812:28: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:814:48: error: expected ';' at end of member declaration
  814 |       file_status& operator=(const file_status&) noexcept = default;
      |                                                ^
      |                                                 ;
p1577.cpp:814:50: error: 'noexcept' does not name a type
  814 |       file_status& operator=(const file_status&) noexcept = default;
      |                                                  ^~~~~~~~
p1577.cpp:814:50: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:815:41: error: expected ',' or '...' before '&&' token
  815 |       file_status& operator=(file_status&&) noexcept = default;
      |                                         ^~
p1577.cpp:815:43: error: expected ';' at end of member declaration
  815 |       file_status& operator=(file_status&&) noexcept = default;
      |                                           ^
      |                                            ;
p1577.cpp:815:45: error: 'noexcept' does not name a type
  815 |       file_status& operator=(file_status&&) noexcept = default;
      |                                             ^~~~~~~~
p1577.cpp:815:45: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:817:11: error: 'file_type' has not been declared
  817 | void type(file_type ft) noexcept;
      |           ^~~~~~~~~
p1577.cpp:817:23: error: expected ';' at end of member declaration
  817 | void type(file_type ft) noexcept;
      |                       ^
      |                        ;
p1577.cpp:817:25: error: 'noexcept' does not name a type
  817 | void type(file_type ft) noexcept;
      |                         ^~~~~~~~
p1577.cpp:817:25: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:818:18: error: 'perms' has not been declared
  818 | void permissions(perms prms) noexcept;
      |                  ^~~~~
p1577.cpp:818:28: error: expected ';' at end of member declaration
  818 | void permissions(perms prms) noexcept;
      |                            ^
      |                             ;
p1577.cpp:818:30: error: 'noexcept' does not name a type
  818 | void permissions(perms prms) noexcept;
      |                              ^~~~~~~~
p1577.cpp:818:30: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:820:1: error: 'file_type' does not name a type
  820 | file_type type() const noexcept;
      | ^~~~~~~~~
p1577.cpp:821:1: error: 'perms' does not name a type
  821 | perms permissions() const noexcept;
      | ^~~~~
p1577.cpp:822:79: error: expected ';' at end of member declaration
  822 |          friend bool operator==(const file_status& lhs, const file_status& rhs) noexcept
      |                                                                               ^
      |                                                                                ;
p1577.cpp:822:81: error: 'noexcept' does not name a type
  822 |          friend bool operator==(const file_status& lhs, const file_status& rhs) noexcept
      |                                                                                 ^~~~~~~~
p1577.cpp:822:81: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:827:10: error: ISO C++ forbids declaration of 'file_status' with no type [-fpermissive]
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:827:1: error: 'explicit' outside class declaration
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      | ^~~~~~~~
p1577.cpp:827:22: error: 'file_type' was not declared in this scope
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |                      ^~~~~~~~~
p1577.cpp:827:36: error: 'perms' was not declared in this scope
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |                                    ^~~~~
p1577.cpp:827:63: error: expression list treated as compound expression in initializer [-fpermissive]
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |                                                               ^
p1577.cpp:829:1: error: 'perms' does not name a type
  829 | perms permissions() const noexcept;
      | ^~~~~
p1577.cpp:832:6: error: variable or field 'type' declared void
  832 | void type(file_type ft) noexcept;
      |      ^~~~
p1577.cpp:832:11: error: 'file_type' was not declared in this scope
  832 | void type(file_type ft) noexcept;
      |           ^~~~~~~~~
p1577.cpp:834:9: error: variable or field 'permissions' declared void
  834 |    void permissions(perms prms) noexcept;
      |         ^~~~~~~~~~~
p1577.cpp:834:21: error: 'perms' was not declared in this scope
  834 |    void permissions(perms prms) noexcept;
      |                     ^~~~~
p1577.cpp:842:17: error: expected ';' at end of member declaration
  842 | directory_entry() noexcept = default;
      |                 ^
      |                  ;
p1577.cpp:842:19: error: 'noexcept' does not name a type
  842 | directory_entry() noexcept = default;
      |                   ^~~~~~~~
p1577.cpp:842:19: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:843:43: warning: defaulted and deleted functions only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  843 | directory_entry(const directory_entry&) = default; directory_entry(directory_entry&&) noexcept = default; explicit directory_entry(const filesystem::path& p); directory_entry(const filesystem::path& p, error_code& ec); ~directory_entry();
      |                                           ^~~~~~~
p1577.cpp:843:83: error: expected ',' or '...' before '&&' token
  843 | directory_entry(const directory_entry&) = default; directory_entry(directory_entry&&) noexcept = default; explicit directory_entry(const filesystem::path& p); directory_entry(const filesystem::path& p, error_code& ec); ~directory_entry();
      |                                                                                   ^~
p1577.cpp:843:52: error: invalid constructor; you probably meant 'std::filesystem::directory_entry (const std::filesystem::directory_entry&)'
  843 | directory_entry(const directory_entry&) = default; directory_entry(directory_entry&&) noexcept = default; explicit directory_entry(const filesystem::path& p); directory_entry(const filesystem::path& p, error_code& ec); ~directory_entry();
      |                                                    ^~~~~~~~~~~~~~~
p1577.cpp:843:85: error: expected ';' at end of member declaration
  843 | directory_entry(const directory_entry&) = default; directory_entry(directory_entry&&) noexcept = default; explicit directory_entry(const filesystem::path& p); directory_entry(const filesystem::path& p, error_code& ec); ~directory_entry();
      |                                                                                     ^
      |                                                                                      ;
p1577.cpp:843:87: error: 'noexcept' does not name a type
  843 | directory_entry(const directory_entry&) = default; directory_entry(directory_entry&&) noexcept = default; explicit directory_entry(const filesystem::path& p); directory_entry(const filesystem::path& p, error_code& ec); ~directory_entry();
      |                                                                                       ^~~~~~~~
p1577.cpp:843:87: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:843:203: error: 'error_code' has not been declared
  843 | lt; directory_entry(directory_entry&&) noexcept = default; explicit directory_entry(const filesystem::path& p); directory_entry(const filesystem::path& p, error_code& ec); ~directory_entry();
      |                                                                                                                                                            ^~~~~~~~~~

p1577.cpp:845:54: warning: defaulted and deleted functions only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  845 | directory_entry& operator=(const directory_entry&) = default;
      |                                                      ^~~~~~~
p1577.cpp:846:43: error: expected ',' or '...' before '&&' token
  846 | directory_entry& operator=(directory_entry&&) noexcept = default;
      |                                           ^~
p1577.cpp:846:45: error: expected ';' at end of member declaration
  846 | directory_entry& operator=(directory_entry&&) noexcept = default;
      |                                             ^
      |                                              ;
p1577.cpp:846:47: error: 'noexcept' does not name a type
  846 | directory_entry& operator=(directory_entry&&) noexcept = default;
      |                                               ^~~~~~~~
p1577.cpp:846:47: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:849:40: error: 'error_code' has not been declared
  849 | void assign(const filesystem::path& p, error_code& ec);
      |                                        ^~~~~~~~~~
p1577.cpp:851:50: error: 'error_code' has not been declared
  851 | void replace_filename(const filesystem::path& p, error_code& ec); void refresh();
      |                                                  ^~~~~~~~~~
p1577.cpp:852:14: error: 'error_code' has not been declared
  852 | void refresh(error_code& ec) noexcept;
      |              ^~~~~~~~~~
p1577.cpp:852:28: error: expected ';' at end of member declaration
  852 | void refresh(error_code& ec) noexcept;
      |                            ^
      |                             ;
p1577.cpp:852:30: error: 'noexcept' does not name a type
  852 | void refresh(error_code& ec) noexcept;
      |                              ^~~~~~~~
p1577.cpp:852:30: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:854:32: error: expected ';' at end of member declaration
  854 | const filesystem::path& path() const noexcept;
      |                                ^~~~~
      |                                     ;
p1577.cpp:854:38: error: 'noexcept' does not name a type
  854 | const filesystem::path& path() const noexcept;
      |                                      ^~~~~~~~
p1577.cpp:854:38: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:855:36: error: expected ';' at end of member declaration
  855 | operator const filesystem::path&() const noexcept;
      |                                    ^~~~~
      |                                         ;
p1577.cpp:855:42: error: 'noexcept' does not name a type
  855 | operator const filesystem::path&() const noexcept;
      |                                          ^~~~~~~~
p1577.cpp:855:42: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:857:13: error: 'error_code' has not been declared
  857 | bool exists(error_code& ec) const noexcept;
      |             ^~~~~~~~~~
p1577.cpp:857:29: error: expected ';' at end of member declaration
  857 | bool exists(error_code& ec) const noexcept;
      |                             ^~~~~
      |                                  ;
p1577.cpp:857:35: error: 'noexcept' does not name a type
  857 | bool exists(error_code& ec) const noexcept;
      |                                   ^~~~~~~~
p1577.cpp:857:35: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:859:20: error: 'error_code' has not been declared
  859 | bool is_block_file(error_code& ec) const noexcept;
      |                    ^~~~~~~~~~
p1577.cpp:859:36: error: expected ';' at end of member declaration
  859 | bool is_block_file(error_code& ec) const noexcept;
      |                                    ^~~~~
      |                                         ;
p1577.cpp:859:42: error: 'noexcept' does not name a type
  859 | bool is_block_file(error_code& ec) const noexcept;
      |                                          ^~~~~~~~
p1577.cpp:859:42: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:861:24: error: 'error_code' has not been declared
  861 | bool is_character_file(error_code& ec) const noexcept;
      |                        ^~~~~~~~~~
p1577.cpp:861:40: error: expected ';' at end of member declaration
  861 | bool is_character_file(error_code& ec) const noexcept;
      |                                        ^~~~~
      |                                             ;
p1577.cpp:861:46: error: 'noexcept' does not name a type
  861 | bool is_character_file(error_code& ec) const noexcept;
      |                                              ^~~~~~~~
p1577.cpp:861:46: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:863:19: error: 'error_code' has not been declared
  863 | bool is_directory(error_code& ec) const noexcept;
      |                   ^~~~~~~~~~
p1577.cpp:863:35: error: expected ';' at end of member declaration
  863 | bool is_directory(error_code& ec) const noexcept;
      |                                   ^~~~~
      |                                        ;
p1577.cpp:863:41: error: 'noexcept' does not name a type
  863 | bool is_directory(error_code& ec) const noexcept;
      |                                         ^~~~~~~~
p1577.cpp:863:41: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:865:14: error: 'error_code' has not been declared
  865 | bool is_fifo(error_code& ec) const noexcept;
      |              ^~~~~~~~~~
p1577.cpp:865:30: error: expected ';' at end of member declaration
  865 | bool is_fifo(error_code& ec) const noexcept;
      |                              ^~~~~
      |                                   ;
p1577.cpp:865:36: error: 'noexcept' does not name a type
  865 | bool is_fifo(error_code& ec) const noexcept;
      |                                    ^~~~~~~~
p1577.cpp:865:36: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:867:15: error: 'error_code' has not been declared
  867 | bool is_other(error_code& ec) const noexcept;
      |               ^~~~~~~~~~
p1577.cpp:867:31: error: expected ';' at end of member declaration
  867 | bool is_other(error_code& ec) const noexcept;
      |                               ^~~~~
      |                                    ;
p1577.cpp:867:37: error: 'noexcept' does not name a type
  867 | bool is_other(error_code& ec) const noexcept;
      |                                     ^~~~~~~~
p1577.cpp:867:37: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:869:22: error: 'error_code' has not been declared
  869 | bool is_regular_file(error_code& ec) const noexcept;
      |                      ^~~~~~~~~~
p1577.cpp:869:38: error: expected ';' at end of member declaration
  869 | bool is_regular_file(error_code& ec) const noexcept;
      |                                      ^~~~~
      |                                           ;
p1577.cpp:869:44: error: 'noexcept' does not name a type
  869 | bool is_regular_file(error_code& ec) const noexcept;
      |                                            ^~~~~~~~
p1577.cpp:869:44: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:871:16: error: 'error_code' has not been declared
  871 | bool is_socket(error_code& ec) const noexcept;
      |                ^~~~~~~~~~
p1577.cpp:871:32: error: expected ';' at end of member declaration
  871 | bool is_socket(error_code& ec) const noexcept;
      |                                ^~~~~
      |                                     ;
p1577.cpp:871:38: error: 'noexcept' does not name a type
  871 | bool is_socket(error_code& ec) const noexcept;
      |                                      ^~~~~~~~
p1577.cpp:871:38: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:873:17: error: 'error_code' has not been declared
  873 | bool is_symlink(error_code& ec) const noexcept;
      |                 ^~~~~~~~~~
p1577.cpp:873:33: error: expected ';' at end of member declaration
  873 | bool is_symlink(error_code& ec) const noexcept;
      |                                 ^~~~~
      |                                      ;
p1577.cpp:873:39: error: 'noexcept' does not name a type
  873 | bool is_symlink(error_code& ec) const noexcept;
      |                                       ^~~~~~~~
p1577.cpp:873:39: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:874:1: error: 'uintmax_t' does not name a type
  874 | uintmax_t file_size() const;
      | ^~~~~~~~~
p1577.cpp:875:1: error: 'uintmax_t' does not name a type
  875 | uintmax_t file_size(error_code& ec) const noexcept;
      | ^~~~~~~~~
p1577.cpp:876:1: error: 'uintmax_t' does not name a type
  876 | uintmax_t hard_link_count() const;
      | ^~~~~~~~~
p1577.cpp:877:1: error: 'uintmax_t' does not name a type
  877 | uintmax_t hard_link_count(error_code& ec) const noexcept; file_time_type last_write_time() const;
      | ^~~~~~~~~
p1577.cpp:877:59: error: 'file_time_type' does not name a type
  877 | uintmax_t hard_link_count(error_code& ec) const noexcept; file_time_type last_write_time() const;
      |                                                           ^~~~~~~~~~~~~~
p1577.cpp:878:1: error: 'file_time_type' does not name a type
  878 | file_time_type last_write_time(error_code& ec) const noexcept; file_status status() const;
      | ^~~~~~~~~~~~~~
p1577.cpp:879:20: error: 'error_code' has not been declared
  879 | file_status status(error_code& ec) const noexcept;
      |                    ^~~~~~~~~~
p1577.cpp:879:36: error: expected ';' at end of member declaration
  879 | file_status status(error_code& ec) const noexcept;
      |                                    ^~~~~
      |                                         ;
p1577.cpp:879:42: error: 'noexcept' does not name a type
  879 | file_status status(error_code& ec) const noexcept;
      |                                          ^~~~~~~~
p1577.cpp:879:42: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:881:28: error: 'error_code' has not been declared
  881 | file_status symlink_status(error_code& ec) const noexcept;
      |                            ^~~~~~~~~~
p1577.cpp:881:44: error: expected ';' at end of member declaration
  881 | file_status symlink_status(error_code& ec) const noexcept;
      |                                            ^~~~~
      |                                                 ;
p1577.cpp:881:50: error: 'noexcept' does not name a type
  881 | file_status symlink_status(error_code& ec) const noexcept;
      |                                                  ^~~~~~~~
p1577.cpp:881:50: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:882:45: error: expected ';' at end of member declaration
  882 | bool operator==(const directory_entry& rhs) const noexcept;
      |                                             ^~~~~
      |                                                  ;
p1577.cpp:882:51: error: 'noexcept' does not name a type
  882 | bool operator==(const directory_entry& rhs) const noexcept;
      |                                                   ^~~~~~~~
p1577.cpp:882:51: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:883:1: error: 'strong_ordering' does not name a type
  883 | strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
      | ^~~~~~~~~~~~~~~
p1577.cpp:899:6: error: expected unqualified-id before 'for'
  899 |      for (auto&& x : directory_iterator("."))
      |      ^~~
p1577.cpp:904:1: error: expected unqualified-id before 'for'
  904 | for (auto&& x : directory_iterator(".")) {
      | ^~~
p1577.cpp:911:26: error: expected unqualified-id before 'const'
  911 | explicit directory_entry(const filesystem::path& p);
      |                          ^~~~~
p1577.cpp:911:26: error: expected ')' before 'const'
  911 | explicit directory_entry(const filesystem::path& p);
      |                         ~^~~~~
      |                          )
p1577.cpp:912:17: error: expected unqualified-id before 'const'
  912 | directory_entry(const filesystem::path& p, error_code& ec);
      |                 ^~~~~
p1577.cpp:912:17: error: expected ')' before 'const'
  912 | directory_entry(const filesystem::path& p, error_code& ec);
      |                ~^~~~~
      |                 )
p1577.cpp:915:40: error: 'error_code' has not been declared
  915 | void assign(const filesystem::path& p, error_code& ec);
      |                                        ^~~~~~~~~~
p1577.cpp:920:53: error: 'error_code' has not been declared
  920 |    void replace_filename(const filesystem::path& p, error_code& ec);
      |                                                     ^~~~~~~~~~
p1577.cpp:922:41: error: expected initializer before 'noexcept'
  922 |    const filesystem::path& path() const noexcept;
      |                                         ^~~~~~~~
p1577.cpp:923:45: error: expected constructor, destructor, or type conversion before 'noexcept'
  923 |    operator const filesystem::path&() const noexcept;
      |                                             ^~~~~~~~
p1577.cpp:925:16: error: 'error_code' was not declared in this scope
  925 |    bool exists(error_code& ec) const noexcept;
      |                ^~~~~~~~~~
p1577.cpp:925:28: error: 'ec' was not declared in this scope
  925 |    bool exists(error_code& ec) const noexcept;
      |                            ^~
p1577.cpp:928:6: error: variable or field 'refresh' declared void
  928 | void refresh(error_code& ec) noexcept;
      |      ^~~~~~~
p1577.cpp:928:14: error: 'error_code' was not declared in this scope
  928 | void refresh(error_code& ec) noexcept;
      |              ^~~~~~~~~~
p1577.cpp:928:26: error: 'ec' was not declared in this scope
  928 | void refresh(error_code& ec) noexcept;
      |                          ^~
p1577.cpp:932:1: error: 'the' does not name a type
  932 | the refresh function as described in 31.12.11.1.
      | ^~~
p1577.cpp:935:20: error: 'error_code' was not declared in this scope
  935 | bool is_block_file(error_code& ec) const noexcept;
      |                    ^~~~~~~~~~
p1577.cpp:935:32: error: 'ec' was not declared in this scope
  935 | bool is_block_file(error_code& ec) const noexcept;
      |                                ^~
p1577.cpp:937:26: error: non-member function 'bool is_character_file()' cannot have cv-qualifier
  937 | bool is_character_file() const;
      |                          ^~~~~
p1577.cpp:938:24: error: 'bool is_character_file' redeclared as different kind of entity
  938 | bool is_character_file(error_code& ec) const noexcept;
      |                        ^~~~~~~~~~
p1577.cpp:937:6: note: previous declaration 'bool is_character_file()'
  937 | bool is_character_file() const;
      |      ^~~~~~~~~~~~~~~~~
p1577.cpp:938:24: error: 'error_code' was not declared in this scope
  938 | bool is_character_file(error_code& ec) const noexcept;
      |                        ^~~~~~~~~~
p1577.cpp:938:36: error: 'ec' was not declared in this scope
  938 | bool is_character_file(error_code& ec) const noexcept;
      |                                    ^~
p1577.cpp:941:21: error: non-member function 'bool is_directory()' cannot have cv-qualifier
  941 | bool is_directory() const;
      |                     ^~~~~
p1577.cpp:942:19: error: 'bool is_directory' redeclared as different kind of entity
  942 | bool is_directory(error_code& ec) const noexcept;
      |                   ^~~~~~~~~~
p1577.cpp:941:6: note: previous declaration 'bool is_directory()'
  941 | bool is_directory() const;
      |      ^~~~~~~~~~~~
p1577.cpp:942:19: error: 'error_code' was not declared in this scope
  942 | bool is_directory(error_code& ec) const noexcept;
      |                   ^~~~~~~~~~
p1577.cpp:942:31: error: 'ec' was not declared in this scope
  942 | bool is_directory(error_code& ec) const noexcept;
      |                               ^~
p1577.cpp:944:16: error: non-member function 'bool is_fifo()' cannot have cv-qualifier
  944 | bool is_fifo() const;
      |                ^~~~~
p1577.cpp:945:14: error: 'bool is_fifo' redeclared as different kind of entity
  945 | bool is_fifo(error_code& ec) const noexcept;
      |              ^~~~~~~~~~
p1577.cpp:944:6: note: previous declaration 'bool is_fifo()'
  944 | bool is_fifo() const;
      |      ^~~~~~~
p1577.cpp:945:14: error: 'error_code' was not declared in this scope
  945 | bool is_fifo(error_code& ec) const noexcept;
      |              ^~~~~~~~~~
p1577.cpp:945:26: error: 'ec' was not declared in this scope
  945 | bool is_fifo(error_code& ec) const noexcept;
      |                          ^~
p1577.cpp:947:17: error: non-member function 'bool is_other()' cannot have cv-qualifier
  947 | bool is_other() const;
      |                 ^~~~~
p1577.cpp:948:15: error: 'bool is_other' redeclared as different kind of entity
  948 | bool is_other(error_code& ec) const noexcept;
      |               ^~~~~~~~~~
p1577.cpp:947:6: note: previous declaration 'bool is_other()'
  947 | bool is_other() const;
      |      ^~~~~~~~
p1577.cpp:948:15: error: 'error_code' was not declared in this scope
  948 | bool is_other(error_code& ec) const noexcept;
      |               ^~~~~~~~~~
p1577.cpp:948:27: error: 'ec' was not declared in this scope
  948 | bool is_other(error_code& ec) const noexcept;
      |                           ^~
p1577.cpp:950:24: error: non-member function 'bool is_regular_file()' cannot have cv-qualifier
  950 | bool is_regular_file() const;
      |                        ^~~~~
p1577.cpp:951:22: error: 'bool is_regular_file' redeclared as different kind of entity
  951 | bool is_regular_file(error_code& ec) const noexcept;
      |                      ^~~~~~~~~~
p1577.cpp:950:6: note: previous declaration 'bool is_regular_file()'
  950 | bool is_regular_file() const;
      |      ^~~~~~~~~~~~~~~
p1577.cpp:951:22: error: 'error_code' was not declared in this scope
  951 | bool is_regular_file(error_code& ec) const noexcept;
      |                      ^~~~~~~~~~
p1577.cpp:951:34: error: 'ec' was not declared in this scope
  951 | bool is_regular_file(error_code& ec) const noexcept;
      |                                  ^~
p1577.cpp:954:18: error: non-member function 'bool is_socket()' cannot have cv-qualifier
  954 | bool is_socket() const;
      |                  ^~~~~
p1577.cpp:955:16: error: 'bool is_socket' redeclared as different kind of entity
  955 | bool is_socket(error_code& ec) const noexcept;
      |                ^~~~~~~~~~
p1577.cpp:954:6: note: previous declaration 'bool is_socket()'
  954 | bool is_socket() const;
      |      ^~~~~~~~~
p1577.cpp:955:16: error: 'error_code' was not declared in this scope
  955 | bool is_socket(error_code& ec) const noexcept;
      |                ^~~~~~~~~~
p1577.cpp:955:28: error: 'ec' was not declared in this scope
  955 | bool is_socket(error_code& ec) const noexcept;
      |                            ^~
p1577.cpp:957:19: error: non-member function 'bool is_symlink()' cannot have cv-qualifier
  957 | bool is_symlink() const;
      |                   ^~~~~
p1577.cpp:958:17: error: 'bool is_symlink' redeclared as different kind of entity
  958 | bool is_symlink(error_code& ec) const noexcept;
      |                 ^~~~~~~~~~
p1577.cpp:957:6: note: previous declaration 'bool is_symlink()'
  957 | bool is_symlink() const;
      |      ^~~~~~~~~~
p1577.cpp:958:17: error: 'error_code' was not declared in this scope
  958 | bool is_symlink(error_code& ec) const noexcept;
      |                 ^~~~~~~~~~
p1577.cpp:958:29: error: 'ec' was not declared in this scope
  958 | bool is_symlink(error_code& ec) const noexcept;
      |                             ^~
p1577.cpp:961:1: error: 'uintmax_t' does not name a type
  961 | uintmax_t file_size(error_code& ec) const noexcept;
      | ^~~~~~~~~
p1577.cpp:964:1: error: 'uintmax_t' does not name a type
  964 | uintmax_t hard_link_count() const;
      | ^~~~~~~~~
p1577.cpp:965:1: error: 'uintmax_t' does not name a type
  965 | uintmax_t hard_link_count(error_code& ec) const noexcept;
      | ^~~~~~~~~
p1577.cpp:968:1: error: 'file_time_type' does not name a type
  968 | file_time_type last_write_time() const;
      | ^~~~~~~~~~~~~~
p1577.cpp:969:1: error: 'file_time_type' does not name a type
  969 | file_time_type last_write_time(error_code& ec) const noexcept;
      | ^~~~~~~~~~~~~~
p1577.cpp:972:1: error: reference to 'file_status' is ambiguous
  972 | file_status status() const;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:973:1: error: reference to 'file_status' is ambiguous
  973 | file_status status(error_code& ec) const noexcept;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:976:1: error: reference to 'file_status' is ambiguous
  976 | file_status symlink_status() const;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:977:1: error: reference to 'file_status' is ambiguous
  977 | file_status symlink_status(error_code& ec) const noexcept;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:980:51: error: expected initializer before 'noexcept'
  980 | bool operator==(const directory_entry& rhs) const noexcept;
      |                                                   ^~~~~~~~
p1577.cpp:982:1: error: 'strong_ordering' does not name a type
  982 | strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
      | ^~~~~~~~~~~~~~~
p1577.cpp:986:3: error: 'friend' used outside of class
  986 |   friend basic_ostream<charT, traits>&
      |   ^~~~~~
      |   ------
p1577.cpp:989:1: error: expected unqualified-id before 'return'
  989 | return os << d.path();
      | ^~~~~~
p1577.cpp:997:16: error: expected nested-name-specifier before 'iterator_category'
  997 |          using iterator_category = input_iterator_tag;
      |                ^~~~~~~~~~~~~~~~~
p1577.cpp:998:7: error: expected nested-name-specifier before 'value_type'
  998 | using value_type = directory_entry;
      |       ^~~~~~~~~~
p1577.cpp:999:7: error: expected nested-name-specifier before 'difference_type'
  999 | using difference_type = ptrdiff_t;
      |       ^~~~~~~~~~~~~~~
p1577.cpp:1000:7: error: expected nested-name-specifier before 'pointer'
 1000 | using pointer = const directory_entry*;
      |       ^~~~~~~
p1577.cpp:1001:7: error: expected nested-name-specifier before 'reference'
 1001 | using reference = const directory_entry&;
      |       ^~~~~~~~~
p1577.cpp:1003:20: error: expected ';' at end of member declaration
 1003 | directory_iterator() noexcept;
      |                    ^
      |                     ;
p1577.cpp:1003:22: error: 'noexcept' does not name a type
 1003 | directory_iterator() noexcept;
      |                      ^~~~~~~~
p1577.cpp:1003:22: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:1004:79: error: 'directory_options' has not been declared
 1004 | explicit directory_iterator(const path& p); directory_iterator(const path& p, directory_options options); directory_iterator(const path& p, error_code& ec); directory_iterator(const path& p, directory_options options,
      |                                                                               ^~~~~~~~~~~~~~~~~
p1577.cpp:1004:141: error: 'error_code' has not been declared
 1004 | explicit directory_iterator(const path& p); directory_iterator(const path& p, directory_options options); directory_iterator(const path& p, error_code& ec); directory_iterator(const path& p, directory_options options,
      |                                                                                                                                             ^~~~~~~~~~
p1577.cpp:1004:192: error: 'directory_options' has not been declared
 1004 | th& p); directory_iterator(const path& p, directory_options options); directory_iterator(const path& p, error_code& ec); directory_iterator(const path& p, directory_options options,
      |                                                                                                                                                            ^~~~~~~~~~~~~~~~~

p1577.cpp:1005:29: error: 'error_code' has not been declared
 1005 |                             error_code& ec);
      |                             ^~~~~~~~~~
p1577.cpp:1007:38: error: expected ',' or '...' before '&&' token
 1007 | directory_iterator(directory_iterator&& rhs) noexcept; ~directory_iterator();
      |                                      ^~
p1577.cpp:1007:1: error: invalid constructor; you probably meant 'std::filesystem::directory_iterator (const std::filesystem::directory_iterator&)'
 1007 | directory_iterator(directory_iterator&& rhs) noexcept; ~directory_iterator();
      | ^~~~~~~~~~~~~~~~~~
p1577.cpp:1007:44: error: expected ';' at end of member declaration
 1007 | directory_iterator(directory_iterator&& rhs) noexcept; ~directory_iterator();
      |                                            ^
      |                                             ;
p1577.cpp:1007:46: error: 'noexcept' does not name a type
 1007 | directory_iterator(directory_iterator&& rhs) noexcept; ~directory_iterator();
      |                                              ^~~~~~~~
p1577.cpp:1007:46: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:1009:58: error: expected ',' or '...' before '&&' token
 1009 |          directory_iterator& operator=(directory_iterator&& rhs) noexcept;
      |                                                          ^~
p1577.cpp:1009:64: error: expected ';' at end of member declaration
 1009 |          directory_iterator& operator=(directory_iterator&& rhs) noexcept;
      |                                                                ^
      |                                                                 ;
p1577.cpp:1009:66: error: 'noexcept' does not name a type
 1009 |          directory_iterator& operator=(directory_iterator&& rhs) noexcept;
      |                                                                  ^~~~~~~~
p1577.cpp:1009:66: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:1013:43: error: 'error_code' has not been declared
 1013 |          directory_iterator&    increment(error_code& ec);
      |                                           ^~~~~~~~~~
p1577.cpp:1032:20: error: expected unqualified-id before ')' token
 1032 | directory_iterator() noexcept;
      |                    ^
p1577.cpp:1035:44: error: expected initializer before 'noexcept'
 1035 | directory_iterator end(directory_iterator) noexcept;
      |                                            ^~~~~~~~
p1577.cpp:1037:29: error: expected unqualified-id before 'const'
 1037 | explicit directory_iterator(const path& p);
      |                             ^~~~~
p1577.cpp:1037:29: error: expected ')' before 'const'
 1037 | explicit directory_iterator(const path& p);
      |                            ~^~~~~
      |                             )
p1577.cpp:1038:20: error: expected unqualified-id before 'const'
 1038 | directory_iterator(const path& p, directory_options options);
      |                    ^~~~~
p1577.cpp:1038:20: error: expected ')' before 'const'
 1038 | directory_iterator(const path& p, directory_options options);
      |                   ~^~~~~
      |                    )
p1577.cpp:1039:20: error: expected unqualified-id before 'const'
 1039 | directory_iterator(const path& p, error_code& ec);
      |                    ^~~~~
p1577.cpp:1039:20: error: expected ')' before 'const'
 1039 | directory_iterator(const path& p, error_code& ec);
      |                   ~^~~~~
      |                    )
p1577.cpp:1040:20: error: expected unqualified-id before 'const'
 1040 | directory_iterator(const path& p, directory_options options, error_code& ec);
      |                    ^~~~~
p1577.cpp:1040:20: error: expected ')' before 'const'
 1040 | directory_iterator(const path& p, directory_options options, error_code& ec);
      |                   ~^~~~~
      |                    )
p1577.cpp:1042:11: error: expected ')' before '&' token
 1042 |   (options & directory_options::skip_permission_denied) != directory_options::none
      |   ~       ^~
      |           )
p1577.cpp:1047:38: error: expected ')' before '&&' token
 1047 | directory_iterator(directory_iterator&& rhs) noexcept;
      |                   ~                  ^~
      |                                      )
p1577.cpp:1049:49: error: expected ',' or '...' before '&&' token
 1049 | directory_iterator& operator=(directory_iterator&& rhs) noexcept;
      |                                                 ^~
p1577.cpp:1049:57: error: expected initializer before 'noexcept'
 1049 | directory_iterator& operator=(directory_iterator&& rhs) noexcept;
      |                                                         ^~~~~~~~
p1577.cpp:1052:21: error: 'std::filesystem::directory_iterator& operator++()' must have an argument of class or enumerated type
 1052 | directory_iterator& operator++();
      |                     ^~~~~~~~
p1577.cpp:1053:31: error: 'error_code' was not declared in this scope
 1053 | directory_iterator& increment(error_code& ec);
      |                               ^~~~~~~~~~
p1577.cpp:1053:43: error: 'ec' was not declared in this scope
 1053 | directory_iterator& increment(error_code& ec);
      |                                           ^~
p1577.cpp:1062:11: error: expected nested-name-specifier before 'iterator_category'
 1062 |     using iterator_category = input_iterator_tag;
      |           ^~~~~~~~~~~~~~~~~
p1577.cpp:1063:7: error: expected nested-name-specifier before 'value_type'
 1063 | using value_type = directory_entry;
      |       ^~~~~~~~~~
p1577.cpp:1064:7: error: expected nested-name-specifier before 'difference_type'
 1064 | using difference_type = ptrdiff_t;
      |       ^~~~~~~~~~~~~~~
p1577.cpp:1065:7: error: expected nested-name-specifier before 'pointer'
 1065 | using pointer = const directory_entry*;
      |       ^~~~~~~
p1577.cpp:1066:7: error: expected nested-name-specifier before 'reference'
 1066 | using reference = const directory_entry&;
      |       ^~~~~~~~~
p1577.cpp:1068:30: error: expected ';' at end of member declaration
 1068 | recursive_directory_iterator() noexcept;
      |                              ^
      |                               ;
p1577.cpp:1068:32: error: 'noexcept' does not name a type
 1068 | recursive_directory_iterator() noexcept;
      |                                ^~~~~~~~
p1577.cpp:1068:32: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:1069:99: error: 'directory_options' has not been declared
 1069 | explicit recursive_directory_iterator(const path& p); recursive_directory_iterator(const path& p, directory_options options); recursive_directory_iterator(const path& p, directory_options options,
      |                                                                                                   ^~~~~~~~~~~~~~~~~
p1577.cpp:1069:171: error: 'directory_options' has not been declared
 1069 | ive_directory_iterator(const path& p); recursive_directory_iterator(const path& p, directory_options options); recursive_directory_iterator(const path& p, directory_options options,
      |                                                                                                                                                            ^~~~~~~~~~~~~~~~~

p1577.cpp:1070:39: error: 'error_code' has not been declared
 1070 |                                       error_code& ec);
      |                                       ^~~~~~~~~~
p1577.cpp:1071:54: error: 'error_code' has not been declared
 1071 |          recursive_directory_iterator(const path& p, error_code& ec);
      |                                                      ^~~~~~~~~~
p1577.cpp:1072:129: error: expected ',' or '...' before '&&' token
 1072 | recursive_directory_iterator(const recursive_directory_iterator& rhs); recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept; ~recursive_directory_iterator();
      |                                                                                                                                 ^~
p1577.cpp:1072:72: error: invalid constructor; you probably meant 'std::filesystem::recursive_directory_iterator (const std::filesystem::recursive_directory_iterator&)'
 1072 | recursive_directory_iterator(const recursive_directory_iterator& rhs); recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept; ~recursive_directory_iterator();
      |                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1072:135: error: expected ';' at end of member declaration
 1072 | recursive_directory_iterator(const recursive_directory_iterator& rhs); recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept; ~recursive_directory_iterator();
      |                                                                                                                                       ^
      |                                                                                                                                        ;
p1577.cpp:1072:137: error: 'noexcept' does not name a type
 1072 | recursive_directory_iterator(const recursive_directory_iterator& rhs); recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept; ~recursive_directory_iterator();
      |                                                                                                                                         ^~~~~~~~
p1577.cpp:1072:137: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:1074:1: error: 'directory_options' does not name a type; did you mean 'directory_entry'?
 1074 | directory_options options() const;
      | ^~~~~~~~~~~~~~~~~
      | directory_entry
p1577.cpp:1080:12: error: ISO C++ forbids declaration of 'operator=' with no type [-fpermissive]
 1080 |            operator=(const recursive_directory_iterator& rhs);
      |            ^~~~~~~~
p1577.cpp:1082:50: error: expected ',' or '...' before '&&' token
 1082 |            operator=(recursive_directory_iterator&& rhs) noexcept;
      |                                                  ^~
p1577.cpp:1082:56: error: expected ';' at end of member declaration
 1082 |            operator=(recursive_directory_iterator&& rhs) noexcept;
      |                                                        ^
      |                                                         ;
p1577.cpp:1082:58: error: 'noexcept' does not name a type
 1082 |            operator=(recursive_directory_iterator&& rhs) noexcept;
      |                                                          ^~~~~~~~
p1577.cpp:1082:58: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p1577.cpp:1084:50: error: 'error_code' has not been declared
 1084 |          recursive_directory_iterator& increment(error_code& ec);
      |                                                  ^~~~~~~~~~
p1577.cpp:1086:19: error: 'error_code' has not been declared
 1086 |          void pop(error_code& ec);
      |                   ^~~~~~~~~~
p1577.cpp:1095:30: error: expected unqualified-id before ')' token
 1095 | recursive_directory_iterator() noexcept;
      |                              ^
p1577.cpp:1096:39: error: expected unqualified-id before 'const'
 1096 | explicit recursive_directory_iterator(const path& p);
      |                                       ^~~~~
p1577.cpp:1096:39: error: expected ')' before 'const'
 1096 | explicit recursive_directory_iterator(const path& p);
      |                                      ~^~~~~
      |                                       )
p1577.cpp:1097:30: error: expected unqualified-id before 'const'
 1097 | recursive_directory_iterator(const path& p, directory_options options);
      |                              ^~~~~
p1577.cpp:1097:30: error: expected ')' before 'const'
 1097 | recursive_directory_iterator(const path& p, directory_options options);
      |                             ~^~~~~
      |                              )
p1577.cpp:1098:30: error: expected unqualified-id before 'const'
 1098 | recursive_directory_iterator(const path& p, directory_options options, error_code& ec);
      |                              ^~~~~
p1577.cpp:1098:30: error: expected ')' before 'const'
 1098 | recursive_directory_iterator(const path& p, directory_options options, error_code& ec);
      |                             ~^~~~~
      |                              )
p1577.cpp:1099:30: error: expected unqualified-id before 'const'
 1099 | recursive_directory_iterator(const path& p, error_code& ec);
      |                              ^~~~~
p1577.cpp:1099:30: error: expected ')' before 'const'
 1099 | recursive_directory_iterator(const path& p, error_code& ec);
      |                             ~^~~~~
      |                              )
p1577.cpp:1105:1: error: 'symlinks' does not name a type
 1105 | symlinks, specify options as directory_options::follow_directory_symlink. —end note]
      | ^~~~~~~~
p1577.cpp:1110:58: error: expected ')' before '&&' token
 1110 | recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
      |                             ~                            ^~
      |                                                          )
p1577.cpp:1112:31: error: 'std::filesystem::recursive_directory_iterator& operator=(const std::filesystem::recursive_directory_iterator&)' must be a non-static member function
 1112 | recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
      |                               ^~~~~~~~
p1577.cpp:1118:69: error: expected ',' or '...' before '&&' token
 1118 | recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noexcept;
      |                                                                     ^~
p1577.cpp:1118:77: error: expected initializer before 'noexcept'
 1118 | recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noexcept;
      |                                                                             ^~~~~~~~
p1577.cpp:1121:1: error: 'directory_options' does not name a type
 1121 | directory_options options() const;
      | ^~~~~~~~~~~~~~~~~
p1577.cpp:1124:13: error: non-member function 'int depth()' cannot have cv-qualifier
 1124 | int depth() const;
      |             ^~~~~
p1577.cpp:1128:26: error: non-member function 'bool recursion_pending()' cannot have cv-qualifier
 1128 | bool recursion_pending() const;
      |                          ^~~~~
p1577.cpp:1131:31: error: 'std::filesystem::recursive_directory_iterator& operator++()' must have an argument of class or enumerated type
 1131 | recursive_directory_iterator& operator++();
      |                               ^~~~~~~~
p1577.cpp:1133:64: error: expected initializer before 'noexcept'
 1133 | recursive_directory_iterator end(recursive_directory_iterator) noexcept;
      |                                                                ^~~~~~~~
p1577.cpp:1139:37: error: conflicting declaration 'std::filesystem::recursive_directory_iterator& increment'
 1139 |       recursive_directory_iterator& increment(error_code& ec);
      |                                     ^~~~~~~~~
p1577.cpp:1053:21: note: previous declaration as 'std::filesystem::directory_iterator& increment'
 1053 | directory_iterator& increment(error_code& ec);
      |                     ^~~~~~~~~
p1577.cpp:1139:47: error: 'error_code' was not declared in this scope
 1139 |       recursive_directory_iterator& increment(error_code& ec);
      |                                               ^~~~~~~~~~
p1577.cpp:1139:59: error: 'ec' was not declared in this scope
 1139 |       recursive_directory_iterator& increment(error_code& ec);
      |                                                           ^~
p1577.cpp:1143:31: error: expected constructor, destructor, or type conversion before 'is_directory'
 1143 |        recursion_pending() && is_directory((*this)->status()) &&
      |                               ^~~~~~~~~~~~
p1577.cpp:1152:6: error: variable or field 'pop' declared void
 1152 | void pop(error_code& ec);
      |      ^~~
p1577.cpp:1152:10: error: 'error_code' was not declared in this scope
 1152 | void pop(error_code& ec);
      |          ^~~~~~~~~~
p1577.cpp:1152:22: error: 'ec' was not declared in this scope
 1152 | void pop(error_code& ec);
      |                      ^~
p1577.cpp:1167:43: error: 'std::filesystem::path std::filesystem::absolute(const path&)' should have been declared inside 'std::filesystem'
 1167 |    path filesystem::absolute(const path& p);
      |                                           ^
p1577.cpp:1168:45: error: 'error_code' has not been declared
 1168 |    path filesystem::absolute(const path& p, error_code& ec);
      |                                             ^~~~~~~~~~
p1577.cpp:1168:59: error: 'std::filesystem::path std::filesystem::absolute(const path&, int&)' should have been declared inside 'std::filesystem'
 1168 |    path filesystem::absolute(const path& p, error_code& ec);
      |                                                           ^
p1577.cpp:1172:41: error: 'std::filesystem::path std::filesystem::canonical(const path&)' should have been declared inside 'std::filesystem'
 1172 | path filesystem::canonical(const path& p);
      |                                         ^
p1577.cpp:1173:43: error: 'error_code' has not been declared
 1173 | path filesystem::canonical(const path& p, error_code& ec);
      |                                           ^~~~~~~~~~
p1577.cpp:1173:57: error: 'std::filesystem::path std::filesystem::canonical(const path&, int&)' should have been declared inside 'std::filesystem'
 1173 | path filesystem::canonical(const path& p, error_code& ec);
      |                                                         ^
p1577.cpp:1178:55: error: 'void std::filesystem::copy(const path&, const path&)' should have been declared inside 'std::filesystem'
 1178 | void filesystem::copy(const path& from, const path& to);
      |                                                       ^
p1577.cpp:1180:57: error: 'error_code' has not been declared
 1180 | void filesystem::copy(const path& from, const path& to, error_code& ec);
      |                                                         ^~~~~~~~~~
p1577.cpp:1180:71: error: 'void std::filesystem::copy(const path&, const path&, int&)' should have been declared inside 'std::filesystem'
 1180 | void filesystem::copy(const path& from, const path& to, error_code& ec);
      |                                                                       ^
p1577.cpp:1182:57: error: 'copy_options' has not been declared
 1182 | void filesystem::copy(const path& from, const path& to, copy_options options);
      |                                                         ^~~~~~~~~~~~
p1577.cpp:1182:77: error: 'void std::filesystem::copy(const path&, const path&, int)' should have been declared inside 'std::filesystem'
 1182 | void filesystem::copy(const path& from, const path& to, copy_options options);
      |                                                                             ^
p1577.cpp:1183:57: error: 'copy_options' has not been declared
 1183 | void filesystem::copy(const path& from, const path& to, copy_options options, error_code& ec);
      |                                                         ^~~~~~~~~~~~
p1577.cpp:1183:79: error: 'error_code' has not been declared
 1183 | void filesystem::copy(const path& from, const path& to, copy_options options, error_code& ec);
      |                                                                               ^~~~~~~~~~
p1577.cpp:1183:93: error: 'void std::filesystem::copy(const path&, const path&, int, int&)' should have been declared inside 'std::filesystem'
 1183 | void filesystem::copy(const path& from, const path& to, copy_options options, error_code& ec);
      |                                                                                             ^
p1577.cpp:1187:16: error: expected ')' before '&' token
 1187 |        (options & copy_options::copy_symlinks) != copy_options::none
      |        ~       ^~
      |                )
p1577.cpp:1230:62: error: 'copy_options' has not been declared
 1230 | bool filesystem::copy_file(const path& from, const path& to, copy_options options);
      |                                                              ^~~~~~~~~~~~
p1577.cpp:1230:82: error: 'bool std::filesystem::copy_file(const path&, const path&, int)' should have been declared inside 'std::filesystem'
 1230 | bool filesystem::copy_file(const path& from, const path& to, copy_options options);
      |                                                                                  ^
p1577.cpp:1231:62: error: 'copy_options' has not been declared
 1231 | bool filesystem::copy_file(const path& from, const path& to, copy_options options,error_code& ec);
      |                                                              ^~~~~~~~~~~~
p1577.cpp:1231:83: error: 'error_code' has not been declared
 1231 | bool filesystem::copy_file(const path& from, const path& to, copy_options options,error_code& ec);
      |                                                                                   ^~~~~~~~~~
p1577.cpp:1231:97: error: 'bool std::filesystem::copy_file(const path&, const path&, int, int&)' should have been declared inside 'std::filesystem'
 1231 | bool filesystem::copy_file(const path& from, const path& to, copy_options options,error_code& ec);
      |                                                                                                 ^
p1577.cpp:1234:60: error: 'bool std::filesystem::copy_file(const path&, const path&)' should have been declared inside 'std::filesystem'
 1234 | bool filesystem::copy_file(const path& from, const path& to);
      |                                                            ^
p1577.cpp:1235:62: error: 'error_code' has not been declared
 1235 | bool filesystem::copy_file(const path& from, const path& to, error_code& ec);
      |                                                              ^~~~~~~~~~
p1577.cpp:1235:76: error: 'bool std::filesystem::copy_file(const path&, const path&, int&)' should have been declared inside 'std::filesystem'
 1235 | bool filesystem::copy_file(const path& from, const path& to, error_code& ec);
      |                                                                            ^
p1577.cpp:1242:20: error: expected ')' before '&' token
 1242 |            (options & (copy_options::skip_existing |
      |            ~       ^~
      |                    )
p1577.cpp:1256:14: error: 'error_code' has not been declared
 1256 |              error_code& ec) noexcept;
      |              ^~~~~~~~~~
p1577.cpp:1256:30: error: expected initializer before 'noexcept'
 1256 |              error_code& ec) noexcept;
      |                              ^~~~~~~~
p1577.cpp:1260:50: error: 'bool std::filesystem::create_directories(const path&)' should have been declared inside 'std::filesystem'
 1260 | bool filesystem::create_directories(const path& p);
      |                                                  ^
p1577.cpp:1261:52: error: 'error_code' has not been declared
 1261 | bool filesystem::create_directories(const path& p, error_code& ec);
      |                                                    ^~~~~~~~~~
p1577.cpp:1261:66: error: 'bool std::filesystem::create_directories(const path&, int&)' should have been declared inside 'std::filesystem'
 1261 | bool filesystem::create_directories(const path& p, error_code& ec);
      |                                                                  ^
p1577.cpp:1266:48: error: 'bool std::filesystem::create_directory(const path&)' should have been declared inside 'std::filesystem'
 1266 | bool filesystem::create_directory(const path& p);
      |                                                ^
p1577.cpp:1267:50: error: 'error_code' has not been declared
 1267 | bool filesystem::create_directory(const path& p, error_code& ec) noexcept;
      |                                                  ^~~~~~~~~~
p1577.cpp:1267:66: error: expected initializer before 'noexcept'
 1267 | bool filesystem::create_directory(const path& p, error_code& ec) noexcept;
      |                                                                  ^~~~~~~~
p1577.cpp:1270:72: error: 'bool std::filesystem::create_directory(const path&, const path&)' should have been declared inside 'std::filesystem'
 1270 | bool filesystem::create_directory(const path& p, const path& existing_p);
      |                                                                        ^
p1577.cpp:1271:74: error: 'error_code' has not been declared
 1271 | bool filesystem::create_directory(const path& p, const path& existing_p, error_code& ec) noexcept;
      |                                                                          ^~~~~~~~~~
p1577.cpp:1271:90: error: expected initializer before 'noexcept'
 1271 | bool filesystem::create_directory(const path& p, const path& existing_p, error_code& ec) noexcept;
      |                                                                                          ^~~~~~~~
p1577.cpp:1277:82: error: 'void std::filesystem::create_directory_symlink(const path&, const path&)' should have been declared inside 'std::filesystem'
 1277 | void filesystem::create_directory_symlink(const path& to, const path& new_symlink);
      |                                                                                  ^
p1577.cpp:1279:27: error: 'error_code' has not been declared
 1279 |                           error_code& ec) noexcept;
      |                           ^~~~~~~~~~
p1577.cpp:1279:43: error: expected initializer before 'noexcept'
 1279 |                           error_code& ec) noexcept;
      |                                           ^~~~~~~~
p1577.cpp:1286:76: error: 'void std::filesystem::create_hard_link(const path&, const path&)' should have been declared inside 'std::filesystem'
 1286 | void filesystem::create_hard_link(const path& to, const path& new_hard_link);
      |                                                                            ^
p1577.cpp:1288:34: error: 'error_code' has not been declared
 1288 |                                  error_code& ec) noexcept;
      |                                  ^~~~~~~~~~
p1577.cpp:1288:50: error: expected initializer before 'noexcept'
 1288 |                                  error_code& ec) noexcept;
      |                                                  ^~~~~~~~
p1577.cpp:1299:72: error: 'void std::filesystem::create_symlink(const path&, const path&)' should have been declared inside 'std::filesystem'
 1299 | void filesystem::create_symlink(const path& to, const path& new_symlink);
      |                                                                        ^
p1577.cpp:1300:74: error: 'error_code' has not been declared
 1300 | void filesystem::create_symlink(const path& to, const path& new_symlink, error_code& ec) noexcept;
      |                                                                          ^~~~~~~~~~
p1577.cpp:1300:90: error: expected initializer before 'noexcept'
 1300 | void filesystem::create_symlink(const path& to, const path& new_symlink, error_code& ec) noexcept;
      |                                                                                          ^~~~~~~~
p1577.cpp:1302:31: error: 'std::filesystem::path std::filesystem::current_path()' should have been declared inside 'std::filesystem'
 1302 | path filesystem::current_path();
      |                               ^
p1577.cpp:1303:31: error: 'std::filesystem::path std::filesystem::current_path' redeclared as different kind of entity
 1303 | path filesystem::current_path(error_code& ec);
      |                               ^~~~~~~~~~
p1577.cpp:1302:6: note: previous declaration 'std::filesystem::path std::filesystem::current_path()'
 1302 | path filesystem::current_path();
      |      ^~~~~~~~~~
p1577.cpp:1303:31: error: 'error_code' was not declared in this scope
 1303 | path filesystem::current_path(error_code& ec);
      |                               ^~~~~~~~~~
p1577.cpp:1303:43: error: 'ec' was not declared in this scope
 1303 | path filesystem::current_path(error_code& ec);
      |                                           ^~
p1577.cpp:1309:44: error: 'void std::filesystem::current_path(const path&)' should have been declared inside 'std::filesystem'
 1309 | void filesystem::current_path(const path& p);
      |                                            ^
p1577.cpp:1310:46: error: 'error_code' has not been declared
 1310 | void filesystem::current_path(const path& p, error_code& ec) noexcept;
      |                                              ^~~~~~~~~~
p1577.cpp:1310:62: error: expected initializer before 'noexcept'
 1310 | void filesystem::current_path(const path& p, error_code& ec) noexcept;
      |                                                              ^~~~~~~~
p1577.cpp:1316:59: error: 'bool std::filesystem::equivalent(const path&, const path&)' should have been declared inside 'std::filesystem'
 1316 | bool filesystem::equivalent(const path& p1, const path& p2);
      |                                                           ^
p1577.cpp:1317:61: error: 'error_code' has not been declared
 1317 | bool filesystem::equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                                                             ^~~~~~~~~~
p1577.cpp:1317:77: error: expected initializer before 'noexcept'
 1317 | bool filesystem::equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                                                                             ^~~~~~~~
p1577.cpp:1324:40: error: expected initializer before 'noexcept'
 1324 | bool filesystem::exists(file_status s) noexcept;
      |                                        ^~~~~~~~
p1577.cpp:1326:38: error: 'bool std::filesystem::exists(const path&)' should have been declared inside 'std::filesystem'
 1326 | bool filesystem::exists(const path& p);
      |                                      ^
p1577.cpp:1327:40: error: 'error_code' has not been declared
 1327 | bool filesystem::exists(const path& p, error_code& ec) noexcept;
      |                                        ^~~~~~~~~~
p1577.cpp:1327:56: error: expected initializer before 'noexcept'
 1327 | bool filesystem::exists(const path& p, error_code& ec) noexcept;
      |                                                        ^~~~~~~~
p1577.cpp:1332:1: error: 'uintmax_t' does not name a type
 1332 | uintmax_t filesystem::file_size(const path& p);
      | ^~~~~~~~~
p1577.cpp:1333:1: error: 'uintmax_t' does not name a type
 1333 | uintmax_t filesystem::file_size(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~
p1577.cpp:1338:1: error: 'uintmax_t' does not name a type
 1338 | uintmax_t filesystem::hard_link_count(const path& p);
      | ^~~~~~~~~
p1577.cpp:1339:1: error: 'uintmax_t' does not name a type
 1339 | uintmax_t filesystem::hard_link_count(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~
p1577.cpp:1343:47: error: expected initializer before 'noexcept'
 1343 | bool filesystem::is_block_file(file_status s) noexcept;
      |                                               ^~~~~~~~
p1577.cpp:1345:45: error: 'bool std::filesystem::is_block_file(const path&)' should have been declared inside 'std::filesystem'
 1345 | bool filesystem::is_block_file(const path& p);
      |                                             ^
p1577.cpp:1346:47: error: 'error_code' has not been declared
 1346 | bool filesystem::is_block_file(const path& p, error_code& ec) noexcept;
      |                                               ^~~~~~~~~~
p1577.cpp:1346:63: error: expected initializer before 'noexcept'
 1346 | bool filesystem::is_block_file(const path& p, error_code& ec) noexcept;
      |                                                               ^~~~~~~~
p1577.cpp:1350:51: error: expected initializer before 'noexcept'
 1350 | bool filesystem::is_character_file(file_status s) noexcept;
      |                                                   ^~~~~~~~
p1577.cpp:1352:49: error: 'bool std::filesystem::is_character_file(const path&)' should have been declared inside 'std::filesystem'
 1352 | bool filesystem::is_character_file(const path& p);
      |                                                 ^
p1577.cpp:1353:51: error: 'error_code' has not been declared
 1353 | bool filesystem::is_character_file(const path& p, error_code& ec) noexcept;
      |                                                   ^~~~~~~~~~
p1577.cpp:1353:67: error: expected initializer before 'noexcept'
 1353 | bool filesystem::is_character_file(const path& p, error_code& ec) noexcept;
      |                                                                   ^~~~~~~~
p1577.cpp:1357:46: error: expected initializer before 'noexcept'
 1357 | bool filesystem::is_directory(file_status s) noexcept;
      |                                              ^~~~~~~~
p1577.cpp:1359:46: error: 'error_code' has not been declared
 1359 | bool filesystem::is_directory(const path& p, error_code& ec) noexcept;
      |                                              ^~~~~~~~~~
p1577.cpp:1359:62: error: expected initializer before 'noexcept'
 1359 | bool filesystem::is_directory(const path& p, error_code& ec) noexcept;
      |                                                              ^~~~~~~~
p1577.cpp:1372:41: error: expected initializer before 'noexcept'
 1372 | bool filesystem::is_fifo(file_status s) noexcept;
      |                                         ^~~~~~~~
p1577.cpp:1374:39: error: 'bool std::filesystem::is_fifo(const path&)' should have been declared inside 'std::filesystem'
 1374 | bool filesystem::is_fifo(const path& p);
      |                                       ^
p1577.cpp:1375:41: error: 'error_code' has not been declared
 1375 | bool filesystem::is_fifo(const path& p, error_code& ec) noexcept;
      |                                         ^~~~~~~~~~
p1577.cpp:1375:57: error: expected initializer before 'noexcept'
 1375 | bool filesystem::is_fifo(const path& p, error_code& ec) noexcept;
      |                                                         ^~~~~~~~
p1577.cpp:1377:40: error: 'bool std::filesystem::is_empty(const path&)' should have been declared inside 'std::filesystem'
 1377 | bool filesystem::is_empty(const path& p);
      |                                        ^
p1577.cpp:1378:42: error: 'error_code' has not been declared
 1378 | bool filesystem::is_empty(const path& p, error_code& ec);
      |                                          ^~~~~~~~~~
p1577.cpp:1378:56: error: 'bool std::filesystem::is_empty(const path&, int&)' should have been declared inside 'std::filesystem'
 1378 | bool filesystem::is_empty(const path& p, error_code& ec);
      |                                                        ^
p1577.cpp:1382:42: error: expected initializer before 'noexcept'
 1382 | bool filesystem::is_other(file_status s) noexcept;
      |                                          ^~~~~~~~
p1577.cpp:1384:40: error: 'bool std::filesystem::is_other(const path&)' should have been declared inside 'std::filesystem'
 1384 | bool filesystem::is_other(const path& p);
      |                                        ^
p1577.cpp:1385:42: error: 'error_code' has not been declared
 1385 | bool filesystem::is_other(const path& p, error_code& ec) noexcept;
      |                                          ^~~~~~~~~~
p1577.cpp:1385:58: error: expected initializer before 'noexcept'
 1385 | bool filesystem::is_other(const path& p, error_code& ec) noexcept;
      |                                                          ^~~~~~~~
p1577.cpp:1389:49: error: expected initializer before 'noexcept'
 1389 | bool filesystem::is_regular_file(file_status s) noexcept;
      |                                                 ^~~~~~~~
p1577.cpp:1391:47: error: 'bool std::filesystem::is_regular_file(const path&)' should have been declared inside 'std::filesystem'
 1391 | bool filesystem::is_regular_file(const path& p);
      |                                               ^
p1577.cpp:1394:49: error: 'error_code' has not been declared
 1394 | bool filesystem::is_regular_file(const path& p, error_code& ec) noexcept;
      |                                                 ^~~~~~~~~~
p1577.cpp:1394:65: error: expected initializer before 'noexcept'
 1394 | bool filesystem::is_regular_file(const path& p, error_code& ec) noexcept;
      |                                                                 ^~~~~~~~
p1577.cpp:1401:43: error: expected initializer before 'noexcept'
 1401 | bool filesystem::is_socket(file_status s) noexcept;
      |                                           ^~~~~~~~
p1577.cpp:1403:41: error: 'bool std::filesystem::is_socket(const path&)' should have been declared inside 'std::filesystem'
 1403 | bool filesystem::is_socket(const path& p);
      |                                         ^
p1577.cpp:1404:43: error: 'error_code' has not been declared
 1404 | bool filesystem::is_socket(const path& p, error_code& ec) noexcept;
      |                                           ^~~~~~~~~~
p1577.cpp:1404:59: error: expected initializer before 'noexcept'
 1404 | bool filesystem::is_socket(const path& p, error_code& ec) noexcept;
      |                                                           ^~~~~~~~
p1577.cpp:1406:44: error: expected initializer before 'noexcept'
 1406 | bool filesystem::is_symlink(file_status s) noexcept;
      |                                            ^~~~~~~~
p1577.cpp:1408:42: error: 'bool std::filesystem::is_symlink(const path&)' should have been declared inside 'std::filesystem'
 1408 | bool filesystem::is_symlink(const path& p);
      |                                          ^
p1577.cpp:1409:44: error: 'error_code' has not been declared
 1409 | bool filesystem::is_symlink(const path& p, error_code& ec) noexcept;
      |                                            ^~~~~~~~~~
p1577.cpp:1409:60: error: expected initializer before 'noexcept'
 1409 | bool filesystem::is_symlink(const path& p, error_code& ec) noexcept;
      |                                                            ^~~~~~~~
p1577.cpp:1413:1: error: 'file_time_type' does not name a type
 1413 | file_time_type filesystem::last_write_time(const path& p);
      | ^~~~~~~~~~~~~~
p1577.cpp:1414:1: error: 'file_time_type' does not name a type
 1414 | file_time_type filesystem::last_write_time(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~~~~~~
p1577.cpp:1417:49: error: 'file_time_type' has not been declared
 1417 | void filesystem::last_write_time(const path& p, file_time_type new_time);
      |                                                 ^~~~~~~~~~~~~~
p1577.cpp:1417:72: error: 'void std::filesystem::last_write_time(const path&, int)' should have been declared inside 'std::filesystem'
 1417 | void filesystem::last_write_time(const path& p, file_time_type new_time);
      |                                                                        ^
p1577.cpp:1418:49: error: 'file_time_type' has not been declared
 1418 | void filesystem::last_write_time(const path& p, file_time_type new_time,
      |                                                 ^~~~~~~~~~~~~~
p1577.cpp:1419:17: error: 'error_code' has not been declared
 1419 |                 error_code& ec) noexcept;
      |                 ^~~~~~~~~~
p1577.cpp:1419:33: error: expected initializer before 'noexcept'
 1419 |                 error_code& ec) noexcept;
      |                                 ^~~~~~~~
p1577.cpp:1424:45: error: 'perms' has not been declared
 1424 | void filesystem::permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                             ^~~~~
p1577.cpp:1424:57: error: 'perm_options' has not been declared
 1424 | void filesystem::permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                                         ^~~~~~~~~~~~
p1577.cpp:1424:75: error: 'perm_options' has not been declared
 1424 | void filesystem::permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                                                           ^~~~~~~~~~~~
p1577.cpp:1424:96: error: 'void std::filesystem::permissions(const path&, int, int)' should have been declared inside 'std::filesystem'
 1424 | void filesystem::permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                                                                                ^
p1577.cpp:1425:45: error: 'perms' has not been declared
 1425 | void filesystem::permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                                             ^~~~~
p1577.cpp:1425:57: error: 'error_code' has not been declared
 1425 | void filesystem::permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                                                         ^~~~~~~~~~
p1577.cpp:1425:73: error: expected initializer before 'noexcept'
 1425 | void filesystem::permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                                                                         ^~~~~~~~
p1577.cpp:1426:45: error: 'perms' has not been declared
 1426 | void filesystem::permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                                             ^~~~~
p1577.cpp:1426:57: error: 'perm_options' has not been declared
 1426 | void filesystem::permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                                                         ^~~~~~~~~~~~
p1577.cpp:1426:76: error: 'error_code' has not been declared
 1426 | void filesystem::permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                                                                            ^~~~~~~~~~
p1577.cpp:1426:90: error: 'void std::filesystem::permissions(const path&, int, int, int&)' should have been declared inside 'std::filesystem'
 1426 | void filesystem::permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                                                                                          ^
p1577.cpp:1431:43: error: 'error_code' has not been declared
 1431 | path filesystem::proximate(const path& p, error_code& ec);
      |                                           ^~~~~~~~~~
p1577.cpp:1431:57: error: 'std::filesystem::path std::filesystem::proximate(const path&, int&)' should have been declared inside 'std::filesystem'
 1431 | path filesystem::proximate(const path& p, error_code& ec);
      |                                                         ^
p1577.cpp:1434:76: error: 'std::filesystem::path std::filesystem::proximate(const path&, const path&)' should have been declared inside 'std::filesystem'
 1434 | path filesystem::proximate(const path& p, const path& base = current_path());
      |                                                                            ^
p1577.cpp:1435:61: error: 'error_code' has not been declared
 1435 | path filesystem::proximate(const path& p, const path& base, error_code& ec);
      |                                                             ^~~~~~~~~~
p1577.cpp:1435:75: error: 'std::filesystem::path std::filesystem::proximate(const path&, const path&, int&)' should have been declared inside 'std::filesystem'
 1435 | path filesystem::proximate(const path& p, const path& base, error_code& ec);
      |                                                                           ^
p1577.cpp:1438:19: error: expected constructor, destructor, or type conversion before '(' token
 1438 |   weakly_canonical(p, ec).lexically_proximate(weakly_canonical(base, ec));
      |                   ^
p1577.cpp:1441:44: error: 'std::filesystem::path std::filesystem::read_symlink(const path&)' should have been declared inside 'std::filesystem'
 1441 | path filesystem::read_symlink(const path& p);
      |                                            ^
p1577.cpp:1442:46: error: 'error_code' has not been declared
 1442 | path filesystem::read_symlink(const path& p, error_code& ec);
      |                                              ^~~~~~~~~~
p1577.cpp:1442:60: error: 'std::filesystem::path std::filesystem::read_symlink(const path&, int&)' should have been declared inside 'std::filesystem'
 1442 | path filesystem::read_symlink(const path& p, error_code& ec);
      |                                                            ^
p1577.cpp:1447:42: error: 'error_code' has not been declared
 1447 | path filesystem::relative(const path& p, error_code& ec);
      |                                          ^~~~~~~~~~
p1577.cpp:1447:56: error: 'std::filesystem::path std::filesystem::relative(const path&, int&)' should have been declared inside 'std::filesystem'
 1447 | path filesystem::relative(const path& p, error_code& ec);
      |                                                        ^
p1577.cpp:1449:75: error: 'std::filesystem::path std::filesystem::relative(const path&, const path&)' should have been declared inside 'std::filesystem'
 1449 | path filesystem::relative(const path& p, const path& base = current_path());
      |                                                                           ^
p1577.cpp:1450:60: error: 'error_code' has not been declared
 1450 | path filesystem::relative(const path& p, const path& base, error_code& ec);
      |                                                            ^~~~~~~~~~
p1577.cpp:1450:74: error: 'std::filesystem::path std::filesystem::relative(const path&, const path&, int&)' should have been declared inside 'std::filesystem'
 1450 | path filesystem::relative(const path& p, const path& base, error_code& ec);
      |                                                                          ^
p1577.cpp:1453:24: error: expected constructor, destructor, or type conversion before '(' token
 1453 |        weakly_canonical(p, ec).lexically_relative(weakly_canonical(base, ec));
      |                        ^
p1577.cpp:1456:38: error: 'bool std::filesystem::remove(const path&)' should have been declared inside 'std::filesystem'
 1456 | bool filesystem::remove(const path& p);
      |                                      ^
p1577.cpp:1457:40: error: 'error_code' has not been declared
 1457 | bool filesystem::remove(const path& p, error_code& ec) noexcept;
      |                                        ^~~~~~~~~~
p1577.cpp:1457:56: error: expected initializer before 'noexcept'
 1457 | bool filesystem::remove(const path& p, error_code& ec) noexcept;
      |                                                        ^~~~~~~~
p1577.cpp:1464:1: error: 'uintmax_t' does not name a type
 1464 | uintmax_t filesystem::remove_all(const path& p);
      | ^~~~~~~~~
p1577.cpp:1465:1: error: 'uintmax_t' does not name a type
 1465 | uintmax_t filesystem::remove_all(const path& p, error_code& ec);
      | ^~~~~~~~~
p1577.cpp:1472:61: error: 'void std::filesystem::rename(const path&, const path&)' should have been declared inside 'std::filesystem'
 1472 | void filesystem::rename(const path& old_p, const path& new_p);
      |                                                             ^
p1577.cpp:1473:63: error: 'error_code' has not been declared
 1473 | void filesystem::rename(const path& old_p, const path& new_p, error_code& ec) noexcept;
      |                                                               ^~~~~~~~~~
p1577.cpp:1473:79: error: expected initializer before 'noexcept'
 1473 | void filesystem::rename(const path& old_p, const path& new_p, error_code& ec) noexcept;
      |                                                                               ^~~~~~~~
p1577.cpp:1479:45: error: 'uintmax_t' has not been declared
 1479 | void filesystem::resize_file(const path& p, uintmax_t new_size);
      |                                             ^~~~~~~~~
p1577.cpp:1479:63: error: 'void std::filesystem::resize_file(const path&, int)' should have been declared inside 'std::filesystem'
 1479 | void filesystem::resize_file(const path& p, uintmax_t new_size);
      |                                                               ^
p1577.cpp:1480:45: error: 'uintmax_t' has not been declared
 1480 | void filesystem::resize_file(const path& p, uintmax_t new_size, error_code& ec) noexcept;
      |                                             ^~~~~~~~~
p1577.cpp:1480:65: error: 'error_code' has not been declared
 1480 | void filesystem::resize_file(const path& p, uintmax_t new_size, error_code& ec) noexcept;
      |                                                                 ^~~~~~~~~~
p1577.cpp:1480:81: error: expected initializer before 'noexcept'
 1480 | void filesystem::resize_file(const path& p, uintmax_t new_size, error_code& ec) noexcept;
      |                                                                                 ^~~~~~~~
p1577.cpp:1484:43: error: 'std::filesystem::space_info std::filesystem::space(const path&)' should have been declared inside 'std::filesystem'
 1484 | space_info filesystem::space(const path& p);
      |                                           ^
p1577.cpp:1485:45: error: 'error_code' has not been declared
 1485 | space_info filesystem::space(const path& p, error_code& ec) noexcept;
      |                                             ^~~~~~~~~~
p1577.cpp:1485:61: error: expected initializer before 'noexcept'
 1485 | space_info filesystem::space(const path& p, error_code& ec) noexcept;
      |                                                             ^~~~~~~~
p1577.cpp:1490:1: error: reference to 'file_status' is ambiguous
 1490 | file_status filesystem::status(const path& p);
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1492:3: error: 'error_code' does not name a type
 1492 |   error_code ec;
      |   ^~~~~~~~~~
p1577.cpp:1493:3: error: reference to 'file_status' is ambiguous
 1493 |   file_status result = status(p, ec);
      |   ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1494:3: error: expected unqualified-id before 'if'
 1494 |   if (result.type() == file_type::none)
      |   ^~
p1577.cpp:1495:65: error: expected unqualified-id before 'return'
 1495 | throw filesystem_error(implementation-supplied-message, p, ec); return result;
      |                                                                 ^~~~~~
p1577.cpp:1499:1: error: reference to 'file_status' is ambiguous
 1499 | file_status filesystem::status(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1520:7: error: expected nested-name-specifier before 'the'
 1520 | using the contents of the symbolic link.
      |       ^~~
p1577.cpp:1525:1: error: reference to 'file_status' is ambiguous
 1525 | file_status filesystem::symlink_status(const path& p);
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1526:4: error: reference to 'file_status' is ambiguous
 1526 |    file_status filesystem::symlink_status(const path& p, error_code& ec) noexcept;
      |    ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1539:38: error: 'std::filesystem::path std::filesystem::temp_directory_path()' should have been declared inside 'std::filesystem'
 1539 | path filesystem::temp_directory_path();
      |                                      ^
p1577.cpp:1540:38: error: 'std::filesystem::temp_directory_path' should have been declared inside 'std::filesystem'
 1540 | path filesystem::temp_directory_path(error_code& ec);
      |                                      ^~~~~~~~~~
p1577.cpp:1540:38: error: 'std::filesystem::path std::filesystem::temp_directory_path' conflicts with a previous declaration
p1577.cpp:1539:6: note: previous declaration 'std::filesystem::path std::filesystem::temp_directory_path()'
 1539 | path filesystem::temp_directory_path();
      |      ^~~~~~~~~~
p1577.cpp:1540:38: error: 'error_code' was not declared in this scope
 1540 | path filesystem::temp_directory_path(error_code& ec);
      |                                      ^~~~~~~~~~
p1577.cpp:1540:50: error: 'ec' was not declared in this scope
 1540 | path filesystem::temp_directory_path(error_code& ec);
      |                                                  ^~
p1577.cpp:1545:48: error: 'std::filesystem::path std::filesystem::weakly_canonical(const path&)' should have been declared inside 'std::filesystem'
 1545 | path filesystem::weakly_canonical(const path& p);
      |                                                ^
p1577.cpp:1546:50: error: 'error_code' has not been declared
 1546 | path filesystem::weakly_canonical(const path& p, error_code& ec);
      |                                                  ^~~~~~~~~~
p1577.cpp:1546:64: error: 'std::filesystem::path std::filesystem::weakly_canonical(const path&, int&)' should have been declared inside 'std::filesystem'
 1546 | path filesystem::weakly_canonical(const path& p, error_code& ec);
      |                                                                ^

$ g++ p1577.cpp -std=2b -o p1577g -I. -Wall
p1577.cpp:932:38: error: too many decimal points in number
  932 | the refresh function as described in 31.12.11.1.
      |                                      ^~~~~~~~~~~
p1577.cpp:1046:15: error: extended character — is not valid in an identifier
 1046 | iterator(""). —end note] directory_iterator(const directory_iterator& rhs);
      |               ^
p1577.cpp:1105:75: error: extended character — is not valid in an identifier
 1105 | symlinks, specify options as directory_options::follow_directory_symlink. —end note]
      |                                                                           ^
p1577.cpp:40:6: error: variable or field 'swap' declared void
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |      ^~~~
p1577.cpp:40:11: error: 'path' was not declared in this scope
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |           ^~~~
p1577.cpp:40:17: error: 'lhs' was not declared in this scope
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                 ^~~
p1577.cpp:40:22: error: 'path' was not declared in this scope
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                      ^~~~
p1577.cpp:40:28: error: 'rhs' was not declared in this scope
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                            ^~~
p1577.cpp:40:67: error: 'path' does not name a type
   40 | void swap(path& lhs, path& rhs) noexcept; size_t hash_value(const path& p) noexcept;
      |                                                                   ^~~~
p1577.cpp:67:24: error: 'chrono' does not name a type
   67 | using file_time_type = chrono::time_point<chrono::file_clock>;
      |                        ^~~~~~
p1577.cpp:69:1: error: 'path' does not name a type
   69 | path absolute(const path& p);
      | ^~~~
p1577.cpp:70:1: error: 'path' does not name a type
   70 | path absolute(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:71:1: error: 'path' does not name a type
   71 | path canonical(const path& p);
      | ^~~~
p1577.cpp:72:1: error: 'path' does not name a type
   72 | path canonical(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:73:17: error: 'path' does not name a type
   73 | void copy(const path& from, const path& to);
      |                 ^~~~
p1577.cpp:73:35: error: 'path' does not name a type
   73 | void copy(const path& from, const path& to);
      |                                   ^~~~
p1577.cpp:74:17: error: 'path' does not name a type
   74 | void copy(const path& from, const path& to, error_code& ec);
      |                 ^~~~
p1577.cpp:74:35: error: 'path' does not name a type
   74 | void copy(const path& from, const path& to, error_code& ec);
      |                                   ^~~~
p1577.cpp:75:17: error: 'path' does not name a type
   75 | void copy(const path& from, const path& to, copy_options options);
      |                 ^~~~
p1577.cpp:75:35: error: 'path' does not name a type
   75 | void copy(const path& from, const path& to, copy_options options);
      |                                   ^~~~
p1577.cpp:76:17: error: 'path' does not name a type
   76 | void copy(const path& from, const path& to, copy_options options,
      |                 ^~~~
p1577.cpp:76:35: error: 'path' does not name a type
   76 | void copy(const path& from, const path& to, copy_options options,
      |                                   ^~~~
p1577.cpp:78:22: error: 'path' does not name a type
   78 | bool copy_file(const path& from, const path& to);
      |                      ^~~~
p1577.cpp:78:40: error: 'path' does not name a type
   78 | bool copy_file(const path& from, const path& to);
      |                                        ^~~~
p1577.cpp:79:22: error: 'path' does not name a type
   79 | bool copy_file(const path& from, const path& to, error_code& ec);
      |                      ^~~~
p1577.cpp:79:40: error: 'path' does not name a type
   79 | bool copy_file(const path& from, const path& to, error_code& ec);
      |                                        ^~~~
p1577.cpp:80:22: error: 'path' does not name a type
   80 | bool copy_file(const path& from, const path& to, copy_options option);
      |                      ^~~~
p1577.cpp:80:40: error: 'path' does not name a type
   80 | bool copy_file(const path& from, const path& to, copy_options option);
      |                                        ^~~~
p1577.cpp:81:22: error: 'path' does not name a type
   81 | bool copy_file(const path& from, const path& to, copy_options option,
      |                      ^~~~
p1577.cpp:81:40: error: 'path' does not name a type
   81 | bool copy_file(const path& from, const path& to, copy_options option,
      |                                        ^~~~
p1577.cpp:83:25: error: 'path' does not name a type
   83 | void copy_symlink(const path& existing_symlink, const path& new_symlink);
      |                         ^~~~
p1577.cpp:83:55: error: 'path' does not name a type
   83 | void copy_symlink(const path& existing_symlink, const path& new_symlink);
      |                                                       ^~~~
p1577.cpp:84:25: error: 'path' does not name a type
   84 | void copy_symlink(const path& existing_symlink, const path& new_symlink,
      |                         ^~~~
p1577.cpp:84:55: error: 'path' does not name a type
   84 | void copy_symlink(const path& existing_symlink, const path& new_symlink,
      |                                                       ^~~~
p1577.cpp:86:31: error: 'path' does not name a type
   86 | bool create_directories(const path& p);
      |                               ^~~~
p1577.cpp:87:31: error: 'path' does not name a type
   87 | bool create_directories(const path& p, error_code& ec);
      |                               ^~~~
p1577.cpp:88:29: error: 'path' does not name a type
   88 | bool create_directory(const path& p);
      |                             ^~~~
p1577.cpp:89:29: error: 'path' does not name a type
   89 | bool create_directory(const path& p, error_code& ec) noexcept;
      |                             ^~~~
p1577.cpp:90:29: error: 'path' does not name a type
   90 | bool create_directory(const path& p, const path& attributes);
      |                             ^~~~
p1577.cpp:90:44: error: 'path' does not name a type
   90 | bool create_directory(const path& p, const path& attributes);
      |                                            ^~~~
p1577.cpp:91:29: error: 'path' does not name a type
   91 | bool create_directory(const path& p, const path& attributes,
      |                             ^~~~
p1577.cpp:91:44: error: 'path' does not name a type
   91 | bool create_directory(const path& p, const path& attributes,
      |                                            ^~~~
p1577.cpp:93:37: error: 'path' does not name a type
   93 | void create_directory_symlink(const path& to, const path& new_symlink);
      |                                     ^~~~
p1577.cpp:93:53: error: 'path' does not name a type
   93 | void create_directory_symlink(const path& to, const path& new_symlink);
      |                                                     ^~~~
p1577.cpp:94:37: error: 'path' does not name a type
   94 | void create_directory_symlink(const path& to, const path& new_symlink,
      |                                     ^~~~
p1577.cpp:94:53: error: 'path' does not name a type
   94 | void create_directory_symlink(const path& to, const path& new_symlink,
      |                                                     ^~~~
p1577.cpp:96:29: error: 'path' does not name a type
   96 | void create_hard_link(const path& to, const path& new_hard_link);
      |                             ^~~~
p1577.cpp:96:45: error: 'path' does not name a type
   96 | void create_hard_link(const path& to, const path& new_hard_link);
      |                                             ^~~~
p1577.cpp:97:29: error: 'path' does not name a type
   97 | void create_hard_link(const path& to, const path& new_hard_link,
      |                             ^~~~
p1577.cpp:97:45: error: 'path' does not name a type
   97 | void create_hard_link(const path& to, const path& new_hard_link,
      |                                             ^~~~
p1577.cpp:99:27: error: 'path' does not name a type
   99 | void create_symlink(const path& to, const path& new_symlink);
      |                           ^~~~
p1577.cpp:99:43: error: 'path' does not name a type
   99 | void create_symlink(const path& to, const path& new_symlink);
      |                                           ^~~~
p1577.cpp:100:27: error: 'path' does not name a type
  100 | void create_symlink(const path& to, const path& new_symlink,
      |                           ^~~~
p1577.cpp:100:43: error: 'path' does not name a type
  100 | void create_symlink(const path& to, const path& new_symlink,
      |                                           ^~~~
p1577.cpp:102:1: error: 'path' does not name a type
  102 | path current_path();
      | ^~~~
p1577.cpp:103:1: error: 'path' does not name a type
  103 | path current_path(error_code& ec);
      | ^~~~
p1577.cpp:104:25: error: 'path' does not name a type
  104 | void current_path(const path& p);
      |                         ^~~~
p1577.cpp:105:25: error: 'path' does not name a type
  105 | void current_path(const path& p, error_code& ec) noexcept;
      |                         ^~~~
p1577.cpp:106:23: error: 'path' does not name a type
  106 | bool equivalent(const path& p1, const path& p2);
      |                       ^~~~
p1577.cpp:106:39: error: 'path' does not name a type
  106 | bool equivalent(const path& p1, const path& p2);
      |                                       ^~~~
p1577.cpp:107:23: error: 'path' does not name a type
  107 | bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                       ^~~~
p1577.cpp:107:39: error: 'path' does not name a type
  107 | bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                                       ^~~~
p1577.cpp:109:19: error: 'path' does not name a type
  109 | bool exists(const path& p);
      |                   ^~~~
p1577.cpp:110:19: error: 'path' does not name a type
  110 | bool exists(const path& p, error_code& ec) noexcept;
      |                   ^~~~
p1577.cpp:111:27: error: 'path' does not name a type
  111 | uintmax_t file_size(const path& p);
      |                           ^~~~
p1577.cpp:112:27: error: 'path' does not name a type
  112 | uintmax_t file_size(const path& p, error_code& ec) noexcept;
      |                           ^~~~
p1577.cpp:113:33: error: 'path' does not name a type
  113 | uintmax_t hard_link_count(const path& p);
      |                                 ^~~~
p1577.cpp:114:33: error: 'path' does not name a type
  114 | uintmax_t hard_link_count(const path& p, error_code& ec) noexcept;
      |                                 ^~~~
p1577.cpp:116:26: error: 'path' does not name a type
  116 | bool is_block_file(const path& p);
      |                          ^~~~
p1577.cpp:117:26: error: 'path' does not name a type
  117 | bool is_block_file(const path& p, error_code& ec) noexcept;
      |                          ^~~~
p1577.cpp:119:30: error: 'path' does not name a type
  119 | bool is_character_file(const path& p);
      |                              ^~~~
p1577.cpp:120:30: error: 'path' does not name a type
  120 | bool is_character_file(const path& p, error_code& ec) noexcept;
      |                              ^~~~
p1577.cpp:122:25: error: 'path' does not name a type
  122 | bool is_directory(const path& p);
      |                         ^~~~
p1577.cpp:123:25: error: 'path' does not name a type
  123 | bool is_directory(const path& p, error_code& ec) noexcept;
      |                         ^~~~
p1577.cpp:124:21: error: 'path' does not name a type
  124 | bool is_empty(const path& p);
      |                     ^~~~
p1577.cpp:125:21: error: 'path' does not name a type
  125 | bool is_empty(const path& p, error_code& ec);
      |                     ^~~~
p1577.cpp:127:20: error: 'path' does not name a type
  127 | bool is_fifo(const path& p);
      |                    ^~~~
p1577.cpp:128:20: error: 'path' does not name a type
  128 | bool is_fifo(const path& p, error_code& ec) noexcept;
      |                    ^~~~
p1577.cpp:130:21: error: 'path' does not name a type
  130 | bool is_other(const path& p);
      |                     ^~~~
p1577.cpp:131:21: error: 'path' does not name a type
  131 | bool is_other(const path& p, error_code& ec) noexcept;
      |                     ^~~~
p1577.cpp:133:28: error: 'path' does not name a type
  133 | bool is_regular_file(const path& p);
      |                            ^~~~
p1577.cpp:134:28: error: 'path' does not name a type
  134 | bool is_regular_file(const path& p, error_code& ec) noexcept;
      |                            ^~~~
p1577.cpp:136:22: error: 'path' does not name a type
  136 | bool is_socket(const path& p);
      |                      ^~~~
p1577.cpp:137:22: error: 'path' does not name a type
  137 | bool is_socket(const path& p, error_code& ec) noexcept;
      |                      ^~~~
p1577.cpp:139:23: error: 'path' does not name a type
  139 | bool is_symlink(const path& p);
      |                       ^~~~
p1577.cpp:140:23: error: 'path' does not name a type
  140 | bool is_symlink(const path& p, error_code& ec) noexcept;
      |                       ^~~~
p1577.cpp:141:1: error: 'file_time_type' does not name a type; did you mean 'file_type'?
  141 | file_time_type last_write_time(const path& p);
      | ^~~~~~~~~~~~~~
      | file_type
p1577.cpp:142:1: error: 'file_time_type' does not name a type; did you mean 'file_type'?
  142 | file_time_type last_write_time(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~~~~~~
      | file_type
p1577.cpp:143:28: error: 'path' does not name a type
  143 | void last_write_time(const path& p, file_time_type new_time);
      |                            ^~~~
p1577.cpp:143:37: error: 'file_time_type' has not been declared
  143 | void last_write_time(const path& p, file_time_type new_time);
      |                                     ^~~~~~~~~~~~~~
p1577.cpp:144:30: error: 'path' does not name a type
  144 |   void last_write_time(const path& p, file_time_type new_time,
      |                              ^~~~
p1577.cpp:144:39: error: 'file_time_type' has not been declared
  144 |   void last_write_time(const path& p, file_time_type new_time,
      |                                       ^~~~~~~~~~~~~~
p1577.cpp:146:26: error: 'path' does not name a type
  146 |   void permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                          ^~~~
p1577.cpp:146:79: error: 'replace' is not a member of 'std::filesystem::perm_options'
  146 |   void permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                                                               ^~~~~~~
p1577.cpp:147:26: error: 'path' does not name a type
  147 |   void permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                          ^~~~
p1577.cpp:148:26: error: 'path' does not name a type
  148 |   void permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                          ^~~~
p1577.cpp:149:3: error: 'path' does not name a type
  149 |   path proximate(const path& p, error_code& ec);
      |   ^~~~
p1577.cpp:150:3: error: 'path' does not name a type
  150 |   path proximate(const path& p, const path& base = current_path());
      |   ^~~~
p1577.cpp:151:3: error: 'path' does not name a type
  151 |   path proximate(const path& p, const path& base, error_code& ec);
      |   ^~~~
p1577.cpp:152:3: error: 'path' does not name a type
  152 |   path read_symlink(const path& p);
      |   ^~~~
p1577.cpp:153:3: error: 'path' does not name a type
  153 |   path read_symlink(const path& p, error_code& ec);
      |   ^~~~
p1577.cpp:154:3: error: 'path' does not name a type
  154 |   path relative(const path& p, error_code& ec);
      |   ^~~~
p1577.cpp:155:3: error: 'path' does not name a type
  155 |   path relative(const path& p, const path& base = current_path());
      |   ^~~~
p1577.cpp:156:3: error: 'path' does not name a type
  156 |   path relative(const path& p, const path& base, error_code& ec);
      |   ^~~~
p1577.cpp:157:21: error: 'path' does not name a type
  157 |   bool remove(const path& p);
      |                     ^~~~
p1577.cpp:158:21: error: 'path' does not name a type
  158 |   bool remove(const path& p, error_code& ec) noexcept;
      |                     ^~~~
p1577.cpp:159:30: error: 'path' does not name a type
  159 |   uintmax_t remove_all(const path& p);
      |                              ^~~~
p1577.cpp:160:30: error: 'path' does not name a type
  160 |   uintmax_t remove_all(const path& p, error_code& ec);
      |                              ^~~~
p1577.cpp:161:21: error: 'path' does not name a type
  161 |   void rename(const path& from, const path& to);
      |                     ^~~~
p1577.cpp:161:39: error: 'path' does not name a type
  161 |   void rename(const path& from, const path& to);
      |                                       ^~~~
p1577.cpp:162:21: error: 'path' does not name a type
  162 |   void rename(const path& from, const path& to, error_code& ec) noexcept;
      |                     ^~~~
p1577.cpp:162:39: error: 'path' does not name a type
  162 |   void rename(const path& from, const path& to, error_code& ec) noexcept;
      |                                       ^~~~
p1577.cpp:163:26: error: 'path' does not name a type
  163 |   void resize_file(const path& p, uintmax_t size);
      |                          ^~~~
p1577.cpp:164:26: error: 'path' does not name a type
  164 |   void resize_file(const path& p, uintmax_t size, error_code& ec) noexcept;
      |                          ^~~~
p1577.cpp:165:26: error: 'path' does not name a type
  165 |   space_info space(const path& p);
      |                          ^~~~
p1577.cpp:166:26: error: 'path' does not name a type
  166 |   space_info space(const path& p, error_code& ec) noexcept;
      |                          ^~~~
p1577.cpp:167:28: error: 'path' does not name a type
  167 |   file_status status(const path& p);
      |                            ^~~~
p1577.cpp:168:28: error: 'path' does not name a type
  168 |   file_status status(const path& p, error_code& ec) noexcept;
      |                            ^~~~
p1577.cpp:170:36: error: 'path' does not name a type
  170 |   file_status symlink_status(const path& p);
      |                                    ^~~~
p1577.cpp:171:36: error: 'path' does not name a type
  171 |   file_status symlink_status(const path& p, error_code& ec) noexcept;
      |                                    ^~~~
p1577.cpp:172:3: error: 'path' does not name a type
  172 |   path temp_directory_path();
      |   ^~~~
p1577.cpp:173:3: error: 'path' does not name a type
  173 |   path temp_directory_path(error_code& ec);
      |   ^~~~
p1577.cpp:174:3: error: 'path' does not name a type
  174 |   path weakly_canonical(const path& p);
      |   ^~~~
p1577.cpp:175:3: error: 'path' does not name a type
  175 |   path weakly_canonical(const path& p, error_code& ec);
      |   ^~~~
p1577.cpp:180:38: error: 'path' is not a member of 'std::filesystem'
  180 |   template<> struct hash<filesystem::path>;
      |                                      ^~~~
p1577.cpp:180:42: error: template argument 1 is invalid
  180 |   template<> struct hash<filesystem::path>;
      |                                          ^
p1577.cpp:218:20: error: 'see' does not name a type
  218 | using value_type = see below ;
      |                    ^~~
p1577.cpp:219:34: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  219 | using string_type = basic_string<value_type>;
      |                                  ^~~~~~~~~~
      |                                  false_type
p1577.cpp:219:44: error: template argument 1 is invalid
  219 | using string_type = basic_string<value_type>;
      |                                            ^
p1577.cpp:219:44: error: template argument 2 is invalid
p1577.cpp:219:44: error: template argument 3 is invalid
p1577.cpp:220:18: error: 'value_type' does not name a type; did you mean 'false_type'?
  220 | static constexpr value_type preferred_separator = see below;
      |                  ^~~~~~~~~~
      |                  false_type
p1577.cpp:226:17: error: expected ')' before '&&' token
  226 | path(string_type&& source, format fmt = auto_format); template<class Source>
      |     ~           ^~
      |                 )
p1577.cpp:227:36: error: 'format' has not been declared
  227 |         path(const Source& source, format fmt = auto_format);
      |                                    ^~~~~~
p1577.cpp:229:55: error: 'format' has not been declared
  229 |         path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                       ^~~~~~
p1577.cpp:231:55: error: 'format' has not been declared
  231 |         path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                       ^~~~~~
p1577.cpp:233:66: error: 'format' has not been declared
  233 | path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format); ~path();
      |                                                                  ^~~~~~
p1577.cpp:236:53: error: 'string_type' has not been declared
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                                                     ^~~~~~~~~~~
p1577.cpp:236:89: error: 'string_type' has not been declared
  236 | path& operator=(path&& p) noexcept; path& operator=(string_type&& source); path& assign(string_type&& source); template<class Source>
      |                                                                                         ^~~~~~~~~~~
p1577.cpp:251:24: error: 'string_type' does not name a type; did you mean 'true_type'?
  251 | path& operator+=(const string_type& x);
      |                        ^~~~~~~~~~~
      |                        true_type
p1577.cpp:252:36: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  252 | path& operator+=(basic_string_view<value_type> x); path& operator+=(const value_type* x);
      |                                    ^~~~~~~~~~
      |                                    false_type
p1577.cpp:252:46: error: template argument 1 is invalid
  252 | path& operator+=(basic_string_view<value_type> x); path& operator+=(const value_type* x);
      |                                              ^
p1577.cpp:252:46: error: template argument 2 is invalid
p1577.cpp:252:75: error: 'value_type' does not name a type; did you mean 'false_type'?
  252 | path& operator+=(basic_string_view<value_type> x); path& operator+=(const value_type* x);
      |                                                                           ^~~~~~~~~~
      |                                                                           false_type
p1577.cpp:253:18: error: 'value_type' has not been declared
  253 | path& operator+=(value_type x);
      |                  ^~~~~~~~~~
p1577.cpp:253:7: error: 'std::filesystem::path& std::filesystem::path::operator+=(int)' cannot be overloaded with 'std::filesystem::path& std::filesystem::path::operator+=(int)'
  253 | path& operator+=(value_type x);
      |       ^~~~~~~~
p1577.cpp:252:7: note: previous declaration 'std::filesystem::path& std::filesystem::path::operator+=(int)'
  252 | path& operator+=(basic_string_view<value_type> x); path& operator+=(const value_type* x);
      |       ^~~~~~~~
p1577.cpp:273:7: error: 'string_type' does not name a type; did you mean 'true_type'?
  273 | const string_type& native() const noexcept; const value_type* c_str() const noexcept; operator string_type() const;
      |       ^~~~~~~~~~~
      |       true_type
p1577.cpp:273:51: error: 'value_type' does not name a type; did you mean 'false_type'?
  273 | const string_type& native() const noexcept; const value_type* c_str() const noexcept; operator string_type() const;
      |                                                   ^~~~~~~~~~
      |                                                   false_type
p1577.cpp:273:96: error: expected type-specifier before 'string_type'
  273 | const string_type& native() const noexcept; const value_type* c_str() const noexcept; operator string_type() const;
      |                                                                                                ^~~~~~~~~~~
p1577.cpp:295:19: error: 'string_type' does not name a type; did you mean 'true_type'?
  295 | int compare(const string_type& s) const;
      |                   ^~~~~~~~~~~
      |                   true_type
p1577.cpp:296:31: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  296 | int compare(basic_string_view<value_type> s) const; int compare(const value_type* s) const;
      |                               ^~~~~~~~~~
      |                               false_type
p1577.cpp:296:41: error: template argument 1 is invalid
  296 | int compare(basic_string_view<value_type> s) const; int compare(const value_type* s) const;
      |                                         ^
p1577.cpp:296:41: error: template argument 2 is invalid
p1577.cpp:296:71: error: 'value_type' does not name a type; did you mean 'false_type'?
  296 | int compare(basic_string_view<value_type> s) const; int compare(const value_type* s) const;
      |                                                                       ^~~~~~~~~~
      |                                                                       false_type
p1577.cpp:324:33: error: 'charT' was not declared in this scope; did you mean 'char'?
  324 |            friend basic_ostream<charT, traits>&
      |                                 ^~~~~
      |                                 char
p1577.cpp:324:40: error: 'traits' was not declared in this scope
  324 |            friend basic_ostream<charT, traits>&
      |                                        ^~~~~~
p1577.cpp:324:46: error: template argument 1 is invalid
  324 |            friend basic_ostream<charT, traits>&
      |                                              ^
p1577.cpp:324:46: error: template argument 2 is invalid
p1577.cpp:325:39: error: 'charT' was not declared in this scope; did you mean 'char'?
  325 |              operator<<(basic_ostream<charT, traits>& os, const path& p);
      |                                       ^~~~~
      |                                       char
p1577.cpp:325:46: error: 'traits' was not declared in this scope
  325 |              operator<<(basic_ostream<charT, traits>& os, const path& p);
      |                                              ^~~~~~
p1577.cpp:325:52: error: template argument 1 is invalid
  325 |              operator<<(basic_ostream<charT, traits>& os, const path& p);
      |                                                    ^
p1577.cpp:325:52: error: template argument 2 is invalid
p1577.cpp:227:49: error: 'auto_format' was not declared in this scope
  227 |         path(const Source& source, format fmt = auto_format);
      |                                                 ^~~~~~~~~~~
p1577.cpp:229:68: error: 'auto_format' was not declared in this scope
  229 |         path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                                    ^~~~~~~~~~~
p1577.cpp:231:68: error: 'auto_format' was not declared in this scope
  231 |         path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                                    ^~~~~~~~~~~
p1577.cpp:233:79: error: 'auto_format' was not declared in this scope
  233 | path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format); ~path();
      |                                                                               ^~~~~~~~~~~
p1577.cpp:400:19: error: expected constructor, destructor, or type conversion before ';' token
  400 |    path() noexcept;
      |                   ^
p1577.cpp:402:12: error: 'path' does not name a type
  402 | path(const path& p);
      |            ^~~~
p1577.cpp:402:20: error: expected constructor, destructor, or type conversion before ';' token
  402 | path(const path& p);
      |                    ^
p1577.cpp:403:8: error: expected constructor, destructor, or type conversion before '(' token
  403 |    path(path&& p) noexcept;
      |        ^
p1577.cpp:404:5: error: expected constructor, destructor, or type conversion before '(' token
  404 | path(string_type&& source, format fmt = auto_format);
      |     ^
p1577.cpp:407:30: error: 'format' has not been declared
  407 |   path(const Source& source, format fmt = auto_format);
      |                              ^~~~~~
p1577.cpp:407:43: error: 'auto_format' was not declared in this scope
  407 |   path(const Source& source, format fmt = auto_format);
      |                                           ^~~~~~~~~~~
p1577.cpp:407:55: error: expected constructor, destructor, or type conversion before ';' token
  407 |   path(const Source& source, format fmt = auto_format);
      |                                                       ^
p1577.cpp:409:49: error: 'format' has not been declared
  409 |   path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                 ^~~~~~
p1577.cpp:409:62: error: 'auto_format' was not declared in this scope
  409 |   path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                              ^~~~~~~~~~~
p1577.cpp:409:74: error: expected constructor, destructor, or type conversion before ';' token
  409 |   path(InputIterator first, InputIterator last, format fmt = auto_format);
      |                                                                          ^
p1577.cpp:412:49: error: 'format' has not been declared
  412 |   path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                 ^~~~~~
p1577.cpp:412:62: error: 'auto_format' was not declared in this scope
  412 |   path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                              ^~~~~~~~~~~
p1577.cpp:412:74: error: expected constructor, destructor, or type conversion before ';' token
  412 |   path(const Source& source, const locale& loc, format fmt = auto_format);
      |                                                                          ^
p1577.cpp:414:68: error: 'format' has not been declared
  414 |   path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
      |                                                                    ^~~~~~
p1577.cpp:414:81: error: 'auto_format' was not declared in this scope
  414 |   path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
      |                                                                                 ^~~~~~~~~~~
p1577.cpp:414:93: error: expected constructor, destructor, or type conversion before ';' token
  414 |   path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
      |                                                                                             ^
p1577.cpp:421:31: error: 'read_latin1_data' was not declared in this scope
  421 |   std::string latin1_string = read_latin1_data();
      |                               ^~~~~~~~~~~~~~~~
p1577.cpp:422:3: error: 'codecvt_8859_1' does not name a type
  422 |   codecvt_8859_1<wchar_t> latin1_facet;
      |   ^~~~~~~~~~~~~~
p1577.cpp:423:44: error: 'latin1_facet' was not declared in this scope
  423 |   std::locale latin1_locale(std::locale(), latin1_facet);
      |                                            ^~~~~~~~~~~~
p1577.cpp:424:23: error: expected constructor, destructor, or type conversion before '(' token
  424 |   fs::create_directory(fs::path(latin1_string, latin1_locale));
      |                       ^
p1577.cpp:427:1: error: 'path' does not name a type
  427 | path& operator=(const path& p);
      | ^~~~
p1577.cpp:431:1: error: 'path' does not name a type
  431 | path& operator=(path&& p) noexcept;
      | ^~~~
p1577.cpp:435:1: error: 'path' does not name a type
  435 | path& operator=(string_type&& source);
      | ^~~~
p1577.cpp:436:1: error: 'path' does not name a type
  436 | path& assign(string_type&& source);
      | ^~~~
p1577.cpp:440:3: error: 'path' does not name a type
  440 |   path& operator=(const Source& source);
      |   ^~~~
p1577.cpp:442:3: error: 'path' does not name a type
  442 |   path& assign(const Source& source);
      |   ^~~~
p1577.cpp:444:3: error: 'path' does not name a type
  444 |   path& assign(InputIterator first, InputIterator last);
      |   ^~~~
p1577.cpp:449:3: error: 'path' does not name a type
  449 |   path& operator/=(const Source& source);
      |   ^~~~
p1577.cpp:451:3: error: 'path' does not name a type
  451 |   path& append(const Source& source);
      |   ^~~~
p1577.cpp:456:6: error: 'path' does not name a type
  456 |      path& operator/=(const path& p);
      |      ^~~~
p1577.cpp:462:7: error: expected constructor, destructor, or type conversion before '(' token
  462 |   path("foo") /= path("");
      |       ^
p1577.cpp:463:7: error: expected constructor, destructor, or type conversion before '(' token
  463 |   path("foo") /= path("/bar");
      |       ^
p1577.cpp:465:7: error: expected constructor, destructor, or type conversion before '(' token
  465 |   path("foo") /= path("");
      |       ^
p1577.cpp:466:7: error: expected constructor, destructor, or type conversion before '(' token
  466 |   path("foo") /= path("/bar");
      |       ^
p1577.cpp:467:7: error: expected constructor, destructor, or type conversion before '(' token
  467 |   path("foo") /= path("c:/bar");
      |       ^
p1577.cpp:468:7: error: expected constructor, destructor, or type conversion before '(' token
  468 |   path("foo") /= path("c:");
      |       ^
p1577.cpp:469:7: error: expected constructor, destructor, or type conversion before '(' token
  469 |   path("c:") /= path("");
      |       ^
p1577.cpp:470:7: error: expected constructor, destructor, or type conversion before '(' token
  470 |   path("c:foo") /= path("/bar");
      |       ^
p1577.cpp:471:7: error: expected constructor, destructor, or type conversion before '(' token
  471 |   path("c:foo") /= path("c:bar");
      |       ^
p1577.cpp:478:3: error: 'path' does not name a type
  478 |   path& append(InputIterator first, InputIterator last);
      |   ^~~~
p1577.cpp:480:1: error: expected unqualified-id before 'return'
  480 | return operator/=(path(first, last));
      | ^~~~~~
p1577.cpp:482:1: error: 'path' does not name a type
  482 | path& operator+=(const path& x);
      | ^~~~
p1577.cpp:483:1: error: 'path' does not name a type
  483 | path& operator+=(const string_type& x);
      | ^~~~
p1577.cpp:484:1: error: 'path' does not name a type
  484 | path& operator+=(basic_string_view<value_type> x);
      | ^~~~
p1577.cpp:485:1: error: 'path' does not name a type
  485 | path& operator+=(const value_type* x);
      | ^~~~
p1577.cpp:487:3: error: 'path' does not name a type
  487 |   path& operator+=(const Source& x);
      |   ^~~~
p1577.cpp:489:1: error: 'path' does not name a type
  489 | path& concat(const Source& x);
      | ^~~~
p1577.cpp:490:1: error: 'path' does not name a type
  490 | path& operator+=(value_type x);
      | ^~~~
p1577.cpp:492:3: error: 'path' does not name a type
  492 |   path& operator+=(EcharT x);
      |   ^~~~
p1577.cpp:494:1: error: expected unqualified-id before 'return'
  494 | return *this += basic_string_view(&x, 1);
      | ^~~~~~
p1577.cpp:499:6: error: 'path' does not name a type
  499 |      path& concat(InputIterator first, InputIterator last);
      |      ^~~~
p1577.cpp:501:1: error: expected unqualified-id before 'return'
  501 | return *this += path(first, last);
      | ^~~~~~
p1577.cpp:505:1: error: 'path' does not name a type
  505 | path& make_preferred();
      | ^~~~
p1577.cpp:508:3: error: 'path' does not name a type
  508 |   path p("foo/bar");
      |   ^~~~
p1577.cpp:509:8: error: 'cout' in namespace 'std' does not name a type
  509 |   std::cout << p << '\n';
      |        ^~~~
In file included from N4910.h:2,
                 from p1577.cpp:10:
/usr/local/include/c++/12.1.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
p1577.cpp:510:3: error: 'p' does not name a type
  510 |   p.make_preferred();
      |   ^
p1577.cpp:511:8: error: 'cout' in namespace 'std' does not name a type
  511 |   std::cout << p << '\n';
      |        ^~~~
/usr/local/include/c++/12.1.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
p1577.cpp:514:1: error: 'path' does not name a type
  514 | path& remove_filename();
      | ^~~~
p1577.cpp:515:7: error: expected constructor, destructor, or type conversion before '(' token
  515 |   path("foo/bar").remove_filename();
      |       ^
p1577.cpp:516:7: error: expected constructor, destructor, or type conversion before '(' token
  516 |   path("foo/").remove_filename();
      |       ^
p1577.cpp:517:7: error: expected constructor, destructor, or type conversion before '(' token
  517 |   path("/foo").remove_filename();
      |       ^
p1577.cpp:518:7: error: expected constructor, destructor, or type conversion before '(' token
  518 |   path("/").remove_filename();
      |       ^
p1577.cpp:521:1: error: 'path' does not name a type
  521 | path& replace_filename(const path& replacement);
      | ^~~~
p1577.cpp:523:13: error: expected constructor, destructor, or type conversion before '(' token
  523 |   operator/=(replacement);
      |             ^
p1577.cpp:525:7: error: expected constructor, destructor, or type conversion before '(' token
  525 |   path("/foo").replace_filename("bar");
      |       ^
p1577.cpp:526:7: error: expected constructor, destructor, or type conversion before '(' token
  526 |   path("/").replace_filename("bar");
      |       ^
p1577.cpp:528:1: error: 'path' does not name a type
  528 | path& replace_extension(const path& replacement = path());
      | ^~~~
p1577.cpp:533:14: error: 'EcharT' was not declared in this scope; did you mean 'char'?
  533 | basic_string<EcharT, traits, Allocator>
      |              ^~~~~~
      |              char
p1577.cpp:533:22: error: 'traits' was not declared in this scope
  533 | basic_string<EcharT, traits, Allocator>
      |                      ^~~~~~
p1577.cpp:533:30: error: 'Allocator' was not declared in this scope; did you mean 'alloca'?
  533 | basic_string<EcharT, traits, Allocator>
      |                              ^~~~~~~~~
      |                              alloca
p1577.cpp:533:39: error: template argument 1 is invalid
  533 | basic_string<EcharT, traits, Allocator>
      |                                       ^
p1577.cpp:533:39: error: template argument 2 is invalid
p1577.cpp:533:39: error: template argument 3 is invalid
p1577.cpp:534:24: error: 'Allocator' does not name a type; did you mean 'alloca'?
  534 |   generic_string(const Allocator& a = Allocator()) const;
      |                        ^~~~~~~~~
      |                        alloca
p1577.cpp:534:39: error: 'Allocator' was not declared in this scope; did you mean 'alloca'?
  534 |   generic_string(const Allocator& a = Allocator()) const;
      |                                       ^~~~~~~~~
      |                                       alloca
p1577.cpp:534:52: error: non-member function 'int generic_string(const int&)' cannot have cv-qualifier
  534 |   generic_string(const Allocator& a = Allocator()) const;
      |                                                    ^~~~~
p1577.cpp:538:9: error: variable or field 'swap' declared void
  538 |    void swap(path& rhs) noexcept;
      |         ^~~~
p1577.cpp:538:14: error: 'path' was not declared in this scope; did you mean 'std::filesystem::path'?
  538 |    void swap(path& rhs) noexcept;
      |              ^~~~
      |              std::filesystem::path
p1577.cpp:216:11: note: 'std::filesystem::path' declared here
  216 |     class path {
      |           ^~~~
p1577.cpp:538:20: error: 'rhs' was not declared in this scope
  538 |    void swap(path& rhs) noexcept;
      |                    ^~~
p1577.cpp:542:7: error: 'string_type' does not name a type
  542 | const string_type& native() const noexcept;
      |       ^~~~~~~~~~~
p1577.cpp:548:7: error: 'value_type' does not name a type
  548 | const value_type* c_str() const noexcept;
      |       ^~~~~~~~~~
p1577.cpp:550:1: error: expected unqualified-id before 'return'
  550 | return native().c_str(); operator string_type() const;
      | ^~~~~~
p1577.cpp:550:35: error: expected type-specifier before 'string_type'
  550 | return native().c_str(); operator string_type() const;
      |                                   ^~~~~~~~~~~
p1577.cpp:555:44: error: non-member function 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator> string(const Allocator&)' cannot have cv-qualifier
  555 |   string(const Allocator& a = Allocator()) const;
      |                                            ^~~~~
p1577.cpp:558:22: error: non-member function 'std::string string()' cannot have cv-qualifier
  558 | std::string string() const;
      |                      ^~~~~
p1577.cpp:559:24: error: non-member function 'std::wstring wstring()' cannot have cv-qualifier
  559 | std::wstring wstring() const;
      |                        ^~~~~
p1577.cpp:560:26: error: non-member function 'std::u8string u8string()' cannot have cv-qualifier
  560 | std::u8string u8string() const;
      |                          ^~~~~
p1577.cpp:561:28: error: non-member function 'std::u16string u16string()' cannot have cv-qualifier
  561 | std::u16string u16string() const;
      |                            ^~~~~
p1577.cpp:562:28: error: non-member function 'std::u32string u32string()' cannot have cv-qualifier
  562 | std::u32string u32string() const;
      |                            ^~~~~
p1577.cpp:566:30: error: non-member function 'std::string generic_string()' cannot have cv-qualifier
  566 | std::string generic_string() const;
      |                              ^~~~~
p1577.cpp:567:32: error: non-member function 'std::wstring generic_wstring()' cannot have cv-qualifier
  567 | std::wstring generic_wstring() const;
      |                                ^~~~~
p1577.cpp:568:34: error: non-member function 'std::u8string generic_u8string()' cannot have cv-qualifier
  568 | std::u8string generic_u8string() const;
      |                                  ^~~~~
p1577.cpp:569:36: error: non-member function 'std::u16string generic_u16string()' cannot have cv-qualifier
  569 | std::u16string generic_u16string() const;
      |                                    ^~~~~
p1577.cpp:570:36: error: non-member function 'std::u32string generic_u32string()' cannot have cv-qualifier
  570 | std::u32string generic_u32string() const;
      |                                    ^~~~~
p1577.cpp:580:19: error: 'path' does not name a type
  580 | int compare(const path& p) const noexcept;
      |                   ^~~~
p1577.cpp:580:34: error: non-member function 'int compare(const int&)' cannot have cv-qualifier
  580 | int compare(const path& p) const noexcept;
      |                                  ^~~~~~~~
p1577.cpp:581:19: error: 'string_type' does not name a type
  581 | int compare(const string_type& s) const;
      |                   ^~~~~~~~~~~
p1577.cpp:581:35: error: non-member function 'int compare(const int&)' cannot have cv-qualifier
  581 | int compare(const string_type& s) const;
      |                                   ^~~~~
p1577.cpp:581:5: error: declaration of 'int compare(const int&)' has a different exception specifier
  581 | int compare(const string_type& s) const;
      |     ^~~~~~~
p1577.cpp:580:5: note: from previous declaration 'int compare(const int&) noexcept'
  580 | int compare(const path& p) const noexcept;
      |     ^~~~~~~
p1577.cpp:582:31: error: 'value_type' was not declared in this scope
  582 | int compare(basic_string_view<value_type> s) const;
      |                               ^~~~~~~~~~
p1577.cpp:582:41: error: template argument 1 is invalid
  582 | int compare(basic_string_view<value_type> s) const;
      |                                         ^
p1577.cpp:582:41: error: template argument 2 is invalid
p1577.cpp:582:46: error: non-member function 'int compare(int)' cannot have cv-qualifier
  582 | int compare(basic_string_view<value_type> s) const;
      |                                              ^~~~~
p1577.cpp:583:19: error: 'value_type' does not name a type
  583 | int compare(const value_type* s) const;
      |                   ^~~~~~~~~~
p1577.cpp:583:34: error: non-member function 'int compare(const int*)' cannot have cv-qualifier
  583 | int compare(const value_type* s) const;
      |                                  ^~~~~
p1577.cpp:586:1: error: 'path' does not name a type
  586 | path root_name() const;
      | ^~~~
p1577.cpp:588:1: error: 'path' does not name a type
  588 | path root_directory() const;
      | ^~~~
p1577.cpp:590:1: error: 'path' does not name a type
  590 | path root_path() const;
      | ^~~~
p1577.cpp:592:1: error: 'path' does not name a type
  592 | path relative_path() const;
      | ^~~~
p1577.cpp:594:1: error: 'path' does not name a type
  594 | path parent_path() const;
      | ^~~~
p1577.cpp:596:1: error: 'path' does not name a type
  596 | path filename() const;
      | ^~~~
p1577.cpp:599:5: error: expected constructor, destructor, or type conversion before '(' token
  599 | path("/foo/bar.txt").filename();
      |     ^
p1577.cpp:600:5: error: expected constructor, destructor, or type conversion before '(' token
  600 | path("/foo/bar").filename();
      |     ^
p1577.cpp:601:5: error: expected constructor, destructor, or type conversion before '(' token
  601 | path("/foo/bar/").filename();
      |     ^
p1577.cpp:602:5: error: expected constructor, destructor, or type conversion before '(' token
  602 | path("/").filename();
      |     ^
p1577.cpp:603:5: error: expected constructor, destructor, or type conversion before '(' token
  603 | path("//host").filename();
      |     ^
p1577.cpp:604:5: error: expected constructor, destructor, or type conversion before '(' token
  604 | path(".").filename();
      |     ^
p1577.cpp:605:5: error: expected constructor, destructor, or type conversion before '(' token
  605 | path("..").filename();
      |     ^
p1577.cpp:610:2: error: 'path' does not name a type
  610 |  path stem() const;
      |  ^~~~
p1577.cpp:614:6: error: 'cout' in namespace 'std' does not name a type
  614 | std::cout << path("/foo/bar.txt").stem();
      |      ^~~~
/usr/local/include/c++/12.1.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
p1577.cpp:615:1: error: 'path' does not name a type
  615 | path p = "foo.bar.baz.tar";
      | ^~~~
p1577.cpp:616:1: error: expected unqualified-id before 'for'
  616 | for (; !p.extension().empty(); p = p.stem())
      | ^~~
p1577.cpp:616:8: error: expected unqualified-id before '!' token
  616 | for (; !p.extension().empty(); p = p.stem())
      |        ^
p1577.cpp:616:32: error: 'p' does not name a type
  616 | for (; !p.extension().empty(); p = p.stem())
      |                                ^
p1577.cpp:621:1: error: 'path' does not name a type
  621 | path extension() const;
      | ^~~~
p1577.cpp:623:7: error: expected constructor, destructor, or type conversion before '(' token
  623 |   path("/foo/bar.txt").extension();
      |       ^
p1577.cpp:624:7: error: expected constructor, destructor, or type conversion before '(' token
  624 |   path("/foo/bar").extension();
      |       ^
p1577.cpp:625:7: error: expected constructor, destructor, or type conversion before '(' token
  625 |   path("/foo/.profile").extension();
      |       ^
p1577.cpp:626:7: error: expected constructor, destructor, or type conversion before '(' token
  626 |   path(".bar").extension();
      |       ^
p1577.cpp:627:7: error: expected constructor, destructor, or type conversion before '(' token
  627 |   path("..bar").extension();
      |       ^
p1577.cpp:634:34: error: non-member function 'bool empty()' cannot have cv-qualifier
  634 | [[nodiscard]] bool empty() const noexcept;
      |                                  ^~~~~~~~
p1577.cpp:636:22: error: non-member function 'bool has_root_path()' cannot have cv-qualifier
  636 | bool has_root_path() const;
      |                      ^~~~~
p1577.cpp:638:22: error: non-member function 'bool has_root_name()' cannot have cv-qualifier
  638 | bool has_root_name() const;
      |                      ^~~~~
p1577.cpp:640:27: error: non-member function 'bool has_root_directory()' cannot have cv-qualifier
  640 | bool has_root_directory() const;
      |                           ^~~~~
p1577.cpp:642:26: error: non-member function 'bool has_relative_path()' cannot have cv-qualifier
  642 | bool has_relative_path() const;
      |                          ^~~~~
p1577.cpp:644:24: error: non-member function 'bool has_parent_path()' cannot have cv-qualifier
  644 | bool has_parent_path() const;
      |                        ^~~~~
p1577.cpp:646:21: error: non-member function 'bool has_filename()' cannot have cv-qualifier
  646 | bool has_filename() const;
      |                     ^~~~~
p1577.cpp:648:17: error: non-member function 'bool has_stem()' cannot have cv-qualifier
  648 | bool has_stem() const;
      |                 ^~~~~
p1577.cpp:650:22: error: non-member function 'bool has_extension()' cannot have cv-qualifier
  650 | bool has_extension() const;
      |                      ^~~~~
p1577.cpp:652:26: error: non-member function 'bool is_absolute()' cannot have cv-qualifier
  652 |       bool is_absolute() const;
      |                          ^~~~~
p1577.cpp:655:20: error: non-member function 'bool is_relative()' cannot have cv-qualifier
  655 | bool is_relative() const;
      |                    ^~~~~
p1577.cpp:658:1: error: 'path' does not name a type
  658 | path lexically_normal() const;
      | ^~~~
In file included from /usr/local/include/c++/12.1.0/cassert:44,
                 from N4910.h:6:
p1577.cpp:661:1: error: expected unqualified-id before 'static_cast'
  661 | assert(path("foo/./bar/..").lexically_normal() == "foo/");
      | ^~~~~~
p1577.cpp:661:1: error: expected ')' before 'static_cast'
  661 | assert(path("foo/./bar/..").lexically_normal() == "foo/");
      | ^~~~~~
p1577.cpp:662:3: error: expected unqualified-id before 'static_cast'
  662 |   assert(path("foo/.///bar/../").lexically_normal() == "foo/");
      |   ^~~~~~
p1577.cpp:662:3: error: expected ')' before 'static_cast'
  662 |   assert(path("foo/.///bar/../").lexically_normal() == "foo/");
      |   ^~~~~~
p1577.cpp:664:1: error: 'path' does not name a type
  664 | path lexically_relative(const path& base) const;
      | ^~~~
p1577.cpp:671:31: error: no matching function for call to 'begin()'
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                          ~~~~~^~
In file included from /usr/local/include/c++/12.1.0/bits/range_access.h:36,
                 from /usr/local/include/c++/12.1.0/string:52,
                 from /usr/local/include/c++/12.1.0/bits/locale_classes.h:40,
                 from /usr/local/include/c++/12.1.0/bits/ios_base.h:41,
                 from /usr/local/include/c++/12.1.0/ios:42,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39:
/usr/local/include/c++/12.1.0/initializer_list:90:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)'
   90 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/local/include/c++/12.1.0/initializer_list:90:5: note:   template argument deduction/substitution failed:
p1577.cpp:671:31: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                          ~~~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:52:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:52:5: note:   template argument deduction/substitution failed:
p1577.cpp:671:31: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                          ~~~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:63:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:63:5: note:   template argument deduction/substitution failed:
p1577.cpp:671:31: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                          ~~~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:95:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])'
   95 |     begin(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:95:5: note:   template argument deduction/substitution failed:
p1577.cpp:671:31: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                          ~~~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:113:31: note: candidate: 'template<class _Tp> _Tp* std::begin(valarray<_Tp>&)'
  113 |   template<typename _Tp> _Tp* begin(valarray<_Tp>&) noexcept;
      |                               ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:113:31: note:   template argument deduction/substitution failed:
p1577.cpp:671:31: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                          ~~~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:114:37: note: candidate: 'template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)'
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:114:37: note:   template argument deduction/substitution failed:
p1577.cpp:671:31: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                          ~~~~~^~
p1577.cpp:671:38: error: no matching function for call to 'end()'
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                   ~~~^~
/usr/local/include/c++/12.1.0/initializer_list:101:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/local/include/c++/12.1.0/initializer_list:101:5: note:   template argument deduction/substitution failed:
p1577.cpp:671:38: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                   ~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:74:5: note:   template argument deduction/substitution failed:
p1577.cpp:671:38: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                   ~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:85:5: note:   template argument deduction/substitution failed:
p1577.cpp:671:38: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                   ~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:106:5: note:   template argument deduction/substitution failed:
p1577.cpp:671:38: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                   ~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:115:31: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
  115 |   template<typename _Tp> _Tp* end(valarray<_Tp>&) noexcept;
      |                               ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:115:31: note:   template argument deduction/substitution failed:
p1577.cpp:671:38: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                   ~~~^~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note:   template argument deduction/substitution failed:
p1577.cpp:671:38: note:   candidate expects 1 argument, 0 provided
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                   ~~~^~
p1577.cpp:671:42: error: 'base' was not declared in this scope
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                          ^~~~
p1577.cpp:671:56: error: 'base' was not declared in this scope
  671 |   auto [a, b] = mismatch(begin(), end(), base.begin(), base.end());
      |                                                        ^~~~
p1577.cpp:681:3: error: expected unqualified-id before 'static_cast'
  681 |   assert(path("/a/d").lexically_relative("/a/b/c") == "../../d");
      |   ^~~~~~
p1577.cpp:681:3: error: expected ')' before 'static_cast'
  681 |   assert(path("/a/d").lexically_relative("/a/b/c") == "../../d");
      |   ^~~~~~
p1577.cpp:682:3: error: expected unqualified-id before 'static_cast'
  682 |   assert(path("/a/b/c").lexically_relative("/a/d") == "../b/c");
      |   ^~~~~~
p1577.cpp:682:3: error: expected ')' before 'static_cast'
  682 |   assert(path("/a/b/c").lexically_relative("/a/d") == "../b/c");
      |   ^~~~~~
p1577.cpp:683:3: error: expected unqualified-id before 'static_cast'
  683 |   assert(path("a/b/c").lexically_relative("a") == "b/c");
      |   ^~~~~~
p1577.cpp:683:3: error: expected ')' before 'static_cast'
  683 |   assert(path("a/b/c").lexically_relative("a") == "b/c");
      |   ^~~~~~
p1577.cpp:684:3: error: expected unqualified-id before 'static_cast'
  684 |   assert(path("a/b/c").lexically_relative("a/b/c/x/y") == "../..");
      |   ^~~~~~
p1577.cpp:684:3: error: expected ')' before 'static_cast'
  684 |   assert(path("a/b/c").lexically_relative("a/b/c/x/y") == "../..");
      |   ^~~~~~
p1577.cpp:685:3: error: expected unqualified-id before 'static_cast'
  685 |   assert(path("a/b/c").lexically_relative("a/b/c") == ".");
      |   ^~~~~~
p1577.cpp:685:3: error: expected ')' before 'static_cast'
  685 |   assert(path("a/b/c").lexically_relative("a/b/c") == ".");
      |   ^~~~~~
p1577.cpp:686:3: error: expected unqualified-id before 'static_cast'
  686 |   assert(path("a/b").lexically_relative("c/d") == "../../a/b");
      |   ^~~~~~
p1577.cpp:686:3: error: expected ')' before 'static_cast'
  686 |   assert(path("a/b").lexically_relative("c/d") == "../../a/b");
      |   ^~~~~~
p1577.cpp:699:1: error: 'path' does not name a type
  699 | path lexically_proximate(const path& base) const;
      | ^~~~
p1577.cpp:705:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  705 | iterator end() const;
      | ^~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/stl_construct.h:61,
                 from /usr/local/include/c++/12.1.0/bits/char_traits.h:46,
                 from /usr/local/include/c++/12.1.0/ios:40:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p1577.cpp:705:1: error: deduced class type 'iterator' in function return type
  705 | iterator end() const;
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p1577.cpp:709:3: error: 'friend' used outside of class
  709 |   friend basic_ostream<charT, traits>&
      |   ^~~~~~
      |   ------
p1577.cpp:710:52: error: 'path' does not name a type
  710 | operator<<(basic_ostream<charT, traits>& os, const path& p);
      |                                                    ^~~~
p1577.cpp:715:3: error: 'friend' used outside of class
  715 |   friend basic_istream<charT, traits>&
      |   ^~~~~~
      |   ------
p1577.cpp:716:50: error: 'path' has not been declared
  716 |     operator>>(basic_istream<charT, traits>& is, path& p);
      |                                                  ^~~~
p1577.cpp:718:21: error: 'charT' was not declared in this scope; did you mean 'char'?
  718 |        basic_string<charT, traits> tmp;
      |                     ^~~~~
      |                     char
p1577.cpp:718:28: error: 'traits' was not declared in this scope
  718 |        basic_string<charT, traits> tmp;
      |                            ^~~~~~
p1577.cpp:718:34: error: template argument 1 is invalid
  718 |        basic_string<charT, traits> tmp;
      |                                  ^
p1577.cpp:718:34: error: template argument 2 is invalid
p1577.cpp:718:34: error: template argument 3 is invalid
p1577.cpp:719:8: error: 'is' does not name a type
  719 |        is >> quoted(tmp);
      |        ^~
p1577.cpp:720:8: error: 'p' does not name a type
  720 |        p = tmp;
      |        ^
p1577.cpp:723:6: error: variable or field 'swap' declared void
  723 | void swap(path& lhs, path& rhs) noexcept;
      |      ^~~~
p1577.cpp:723:11: error: 'path' was not declared in this scope; did you mean 'std::filesystem::path'?
  723 | void swap(path& lhs, path& rhs) noexcept;
      |           ^~~~
      |           std::filesystem::path
p1577.cpp:216:11: note: 'std::filesystem::path' declared here
  216 |     class path {
      |           ^~~~
p1577.cpp:723:17: error: 'lhs' was not declared in this scope
  723 | void swap(path& lhs, path& rhs) noexcept;
      |                 ^~~
p1577.cpp:723:22: error: 'path' was not declared in this scope; did you mean 'std::filesystem::path'?
  723 | void swap(path& lhs, path& rhs) noexcept;
      |                      ^~~~
      |                      std::filesystem::path
p1577.cpp:216:11: note: 'std::filesystem::path' declared here
  216 |     class path {
      |           ^~~~
p1577.cpp:723:28: error: 'rhs' was not declared in this scope
  723 | void swap(path& lhs, path& rhs) noexcept;
      |                            ^~~
p1577.cpp:729:30: error: 'path' does not name a type
  729 |      size_t hash_value(const path& p) noexcept;
      |                              ^~~~
p1577.cpp:731:1: error: 'friend' used outside of class
  731 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      | ^~~~~~
      | ------
p1577.cpp:731:30: error: 'path' does not name a type
  731 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      |                              ^~~~
p1577.cpp:731:47: error: 'path' does not name a type
  731 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      |                                               ^~~~
p1577.cpp:731:13: error: 'bool operator==(const int&, const int&)' must have an argument of class or enumerated type
  731 | friend bool operator==(const path& lhs, const path& rhs) noexcept;
      |             ^~~~~~~~
p1577.cpp:738:1: error: 'friend' used outside of class
  738 | friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
      | ^~~~~~
      | ------
p1577.cpp:738:42: error: 'path' does not name a type
  738 | friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
      |                                          ^~~~
p1577.cpp:738:59: error: 'path' does not name a type
  738 | friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
      |                                                           ^~~~
p1577.cpp:738:24: error: 'std::strong_ordering operator<=>(const int&, const int&)' must have an argument of class or enumerated type
  738 | friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
      |                        ^~~~~~~~
p1577.cpp:740:1: error: 'friend' used outside of class
  740 | friend path operator/(const path& lhs, const path& rhs);
      | ^~~~~~
      | ------
p1577.cpp:740:8: error: 'path' does not name a type
  740 | friend path operator/(const path& lhs, const path& rhs);
      |        ^~~~
p1577.cpp:743:19: error: explicit specialization of 'template<class _Tp> struct std::hash' outside its namespace must use a nested-name-specifier [-fpermissive]
  743 | template<> struct hash<filesystem::path>;
      |                   ^~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:763:27: error: reference to 'string' is ambiguous
  763 |    filesystem_error(const string& what_arg, error_code ec);
      |                           ^~~~~~
In file included from /usr/local/include/c++/12.1.0/iosfwd:39,
                 from /usr/local/include/c++/12.1.0/ios:38:
/usr/local/include/c++/12.1.0/bits/stringfwd.h:77:33: note: candidates are: 'typedef class std::__cxx11::basic_string<char> std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
p1577.cpp:558:13: note:                 'std::string string()'
  558 | std::string string() const;
      |             ^~~~~~
p1577.cpp:555:3: note:                 'template<class EcharT, class traits, class Allocator> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> string(const Allocator&)'
  555 |   string(const Allocator& a = Allocator()) const;
      |   ^~~~~~
p1577.cpp:763:59: error: expected constructor, destructor, or type conversion before ';' token
  763 |    filesystem_error(const string& what_arg, error_code ec);
      |                                                           ^
p1577.cpp:764:29: error: reference to 'string' is ambiguous
  764 |      filesystem_error(const string& what_arg, const path& p1, error_code ec);
      |                             ^~~~~~
/usr/local/include/c++/12.1.0/bits/stringfwd.h:77:33: note: candidates are: 'typedef class std::__cxx11::basic_string<char> std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
p1577.cpp:558:13: note:                 'std::string string()'
  558 | std::string string() const;
      |             ^~~~~~
p1577.cpp:555:3: note:                 'template<class EcharT, class traits, class Allocator> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> string(const Allocator&)'
  555 |   string(const Allocator& a = Allocator()) const;
      |   ^~~~~~
p1577.cpp:764:53: error: 'path' does not name a type
  764 |      filesystem_error(const string& what_arg, const path& p1, error_code ec);
      |                                                     ^~~~
p1577.cpp:764:77: error: expected constructor, destructor, or type conversion before ';' token
  764 |      filesystem_error(const string& what_arg, const path& p1, error_code ec);
      |                                                                             ^
p1577.cpp:773:24: error: reference to 'string' is ambiguous
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                        ^~~~~~
/usr/local/include/c++/12.1.0/bits/stringfwd.h:77:33: note: candidates are: 'typedef class std::__cxx11::basic_string<char> std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
p1577.cpp:558:13: note:                 'std::string string()'
  558 | std::string string() const;
      |             ^~~~~~
p1577.cpp:555:3: note:                 'template<class EcharT, class traits, class Allocator> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> string(const Allocator&)'
  555 |   string(const Allocator& a = Allocator()) const;
      |   ^~~~~~
p1577.cpp:773:48: error: 'path' does not name a type
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                                                ^~~~
p1577.cpp:773:64: error: 'path' does not name a type
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                                                                ^~~~
p1577.cpp:773:88: error: expected constructor, destructor, or type conversion before ';' token
  773 | filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec);
      |                                                                                        ^
p1577.cpp:778:7: error: 'path' does not name a type
  778 | const path& path1() const noexcept;
      |       ^~~~
p1577.cpp:801:1: error: 'file_type' does not name a type
  801 | file_type type() const noexcept;
      | ^~~~~~~~~
p1577.cpp:810:48: error: 'unknown' is not a member of 'std::filesystem::perms'
  810 |                            perms prms = perms::unknown) noexcept;
      |                                                ^~~~~~~
p1577.cpp: In constructor 'std::filesystem::file_status::file_status()':
p1577.cpp:809:49: error: 'none' is not a member of 'std::filesystem::file_type'
  809 | file_status() noexcept : file_status(file_type::none) {} explicit file_status(file_type ft,
      |                                                 ^~~~
p1577.cpp: At global scope:
p1577.cpp:827:10: error: ISO C++ forbids declaration of 'file_status' with no type [-fpermissive]
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:827:1: error: 'explicit' outside class declaration
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      | ^~~~~~~~
p1577.cpp:827:22: error: 'file_type' was not declared in this scope; did you mean 'std::filesystem::file_type'?
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |                      ^~~~~~~~~
      |                      std::filesystem::file_type
p1577.cpp:62:12: note: 'std::filesystem::file_type' declared here
   62 | enum class file_type;
      |            ^~~~~~~~~
p1577.cpp:827:36: error: 'perms' was not declared in this scope; did you mean 'std::filesystem::perms'?
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |                                    ^~~~~
      |                                    std::filesystem::perms
p1577.cpp:63:12: note: 'std::filesystem::perms' declared here
   63 | enum class perms;
      |            ^~~~~
p1577.cpp:827:63: error: expression list treated as compound expression in initializer [-fpermissive]
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |                                                               ^
p1577.cpp:829:1: error: 'perms' does not name a type
  829 | perms permissions() const noexcept;
      | ^~~~~
p1577.cpp:832:6: error: variable or field 'type' declared void
  832 | void type(file_type ft) noexcept;
      |      ^~~~
p1577.cpp:832:11: error: 'file_type' was not declared in this scope; did you mean 'std::filesystem::file_type'?
  832 | void type(file_type ft) noexcept;
      |           ^~~~~~~~~
      |           std::filesystem::file_type
p1577.cpp:62:12: note: 'std::filesystem::file_type' declared here
   62 | enum class file_type;
      |            ^~~~~~~~~
p1577.cpp:834:9: error: variable or field 'permissions' declared void
  834 |    void permissions(perms prms) noexcept;
      |         ^~~~~~~~~~~
p1577.cpp:834:21: error: 'perms' was not declared in this scope; did you mean 'std::filesystem::perms'?
  834 |    void permissions(perms prms) noexcept;
      |                     ^~~~~
      |                     std::filesystem::perms
p1577.cpp:63:12: note: 'std::filesystem::perms' declared here
   63 | enum class perms;
      |            ^~~~~
p1577.cpp:877:59: error: 'file_time_type' does not name a type; did you mean 'file_type'?
  877 | uintmax_t hard_link_count(error_code& ec) const noexcept; file_time_type last_write_time() const;
      |                                                           ^~~~~~~~~~~~~~
      |                                                           file_type
p1577.cpp:878:1: error: 'file_time_type' does not name a type; did you mean 'file_type'?
  878 | file_time_type last_write_time(error_code& ec) const noexcept; file_status status() const;
      | ^~~~~~~~~~~~~~
      | file_type
p1577.cpp:899:6: error: expected unqualified-id before 'for'
  899 |      for (auto&& x : directory_iterator("."))
      |      ^~~
p1577.cpp:904:1: error: expected unqualified-id before 'for'
  904 | for (auto&& x : directory_iterator(".")) {
      | ^~~
p1577.cpp:911:10: error: ISO C++ forbids declaration of 'directory_entry' with no type [-fpermissive]
  911 | explicit directory_entry(const filesystem::path& p);
      |          ^~~~~~~~~~~~~~~
p1577.cpp:911:1: error: 'explicit' outside class declaration
  911 | explicit directory_entry(const filesystem::path& p);
      | ^~~~~~~~
p1577.cpp:912:1: error: reference to 'directory_entry' is ambiguous
  912 | directory_entry(const filesystem::path& p, error_code& ec);
      | ^~~~~~~~~~~~~~~
p1577.cpp:839:11: note: candidates are: 'class std::filesystem::directory_entry'
  839 |     class directory_entry {
      |           ^~~~~~~~~~~~~~~
p1577.cpp:911:10: note:                 'int directory_entry(const std::filesystem::path&)'
  911 | explicit directory_entry(const filesystem::path& p);
      |          ^~~~~~~~~~~~~~~
p1577.cpp:912:59: error: expected constructor, destructor, or type conversion before ';' token
  912 | directory_entry(const filesystem::path& p, error_code& ec);
      |                                                           ^
p1577.cpp:922:41: error: non-member function 'const std::filesystem::path& path()' cannot have cv-qualifier
  922 |    const filesystem::path& path() const noexcept;
      |                                         ^~~~~~~~
p1577.cpp:923:53: error: expected constructor, destructor, or type conversion before ';' token
  923 |    operator const filesystem::path&() const noexcept;
      |                                                     ^
p1577.cpp:925:38: error: non-member function 'bool exists(std::error_code&)' cannot have cv-qualifier
  925 |    bool exists(error_code& ec) const noexcept;
      |                                      ^~~~~~~~
p1577.cpp:932:1: error: 'the' does not name a type
  932 | the refresh function as described in 31.12.11.1.
      | ^~~
p1577.cpp:935:42: error: non-member function 'bool is_block_file(std::error_code&)' cannot have cv-qualifier
  935 | bool is_block_file(error_code& ec) const noexcept;
      |                                          ^~~~~~~~
p1577.cpp:937:26: error: non-member function 'bool is_character_file()' cannot have cv-qualifier
  937 | bool is_character_file() const;
      |                          ^~~~~
p1577.cpp:938:46: error: non-member function 'bool is_character_file(std::error_code&)' cannot have cv-qualifier
  938 | bool is_character_file(error_code& ec) const noexcept;
      |                                              ^~~~~~~~
p1577.cpp:941:21: error: non-member function 'bool is_directory()' cannot have cv-qualifier
  941 | bool is_directory() const;
      |                     ^~~~~
p1577.cpp:942:41: error: non-member function 'bool is_directory(std::error_code&)' cannot have cv-qualifier
  942 | bool is_directory(error_code& ec) const noexcept;
      |                                         ^~~~~~~~
p1577.cpp:944:16: error: non-member function 'bool is_fifo()' cannot have cv-qualifier
  944 | bool is_fifo() const;
      |                ^~~~~
p1577.cpp:945:36: error: non-member function 'bool is_fifo(std::error_code&)' cannot have cv-qualifier
  945 | bool is_fifo(error_code& ec) const noexcept;
      |                                    ^~~~~~~~
p1577.cpp:947:17: error: non-member function 'bool is_other()' cannot have cv-qualifier
  947 | bool is_other() const;
      |                 ^~~~~
p1577.cpp:948:37: error: non-member function 'bool is_other(std::error_code&)' cannot have cv-qualifier
  948 | bool is_other(error_code& ec) const noexcept;
      |                                     ^~~~~~~~
p1577.cpp:950:24: error: non-member function 'bool is_regular_file()' cannot have cv-qualifier
  950 | bool is_regular_file() const;
      |                        ^~~~~
p1577.cpp:951:44: error: non-member function 'bool is_regular_file(std::error_code&)' cannot have cv-qualifier
  951 | bool is_regular_file(error_code& ec) const noexcept;
      |                                            ^~~~~~~~
p1577.cpp:954:18: error: non-member function 'bool is_socket()' cannot have cv-qualifier
  954 | bool is_socket() const;
      |                  ^~~~~
p1577.cpp:955:38: error: non-member function 'bool is_socket(std::error_code&)' cannot have cv-qualifier
  955 | bool is_socket(error_code& ec) const noexcept;
      |                                      ^~~~~~~~
p1577.cpp:957:19: error: non-member function 'bool is_symlink()' cannot have cv-qualifier
  957 | bool is_symlink() const;
      |                   ^~~~~
p1577.cpp:958:39: error: non-member function 'bool is_symlink(std::error_code&)' cannot have cv-qualifier
  958 | bool is_symlink(error_code& ec) const noexcept;
      |                                       ^~~~~~~~
p1577.cpp:961:43: error: non-member function 'uintmax_t file_size(std::error_code&)' cannot have cv-qualifier
  961 | uintmax_t file_size(error_code& ec) const noexcept;
      |                                           ^~~~~~~~
p1577.cpp:964:29: error: non-member function 'uintmax_t hard_link_count()' cannot have cv-qualifier
  964 | uintmax_t hard_link_count() const;
      |                             ^~~~~
p1577.cpp:965:49: error: non-member function 'uintmax_t hard_link_count(std::error_code&)' cannot have cv-qualifier
  965 | uintmax_t hard_link_count(error_code& ec) const noexcept;
      |                                                 ^~~~~~~~
p1577.cpp:968:1: error: 'file_time_type' does not name a type
  968 | file_time_type last_write_time() const;
      | ^~~~~~~~~~~~~~
p1577.cpp:969:1: error: 'file_time_type' does not name a type
  969 | file_time_type last_write_time(error_code& ec) const noexcept;
      | ^~~~~~~~~~~~~~
p1577.cpp:972:1: error: reference to 'file_status' is ambiguous
  972 | file_status status() const;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:973:1: error: reference to 'file_status' is ambiguous
  973 | file_status status(error_code& ec) const noexcept;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:976:1: error: reference to 'file_status' is ambiguous
  976 | file_status symlink_status() const;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:977:1: error: reference to 'file_status' is ambiguous
  977 | file_status symlink_status(error_code& ec) const noexcept;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:980:23: error: reference to 'directory_entry' is ambiguous
  980 | bool operator==(const directory_entry& rhs) const noexcept;
      |                       ^~~~~~~~~~~~~~~
p1577.cpp:839:11: note: candidates are: 'class std::filesystem::directory_entry'
  839 |     class directory_entry {
      |           ^~~~~~~~~~~~~~~
p1577.cpp:911:10: note:                 'int directory_entry(const std::filesystem::path&)'
  911 | explicit directory_entry(const filesystem::path& p);
      |          ^~~~~~~~~~~~~~~
p1577.cpp:980:51: error: non-member function 'bool operator==(const int&)' cannot have cv-qualifier
  980 | bool operator==(const directory_entry& rhs) const noexcept;
      |                                                   ^~~~~~~~
p1577.cpp:980:6: error: 'bool operator==(const int&)' must have an argument of class or enumerated type
  980 | bool operator==(const directory_entry& rhs) const noexcept;
      |      ^~~~~~~~
p1577.cpp:982:35: error: reference to 'directory_entry' is ambiguous
  982 | strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
      |                                   ^~~~~~~~~~~~~~~
p1577.cpp:839:11: note: candidates are: 'class std::filesystem::directory_entry'
  839 |     class directory_entry {
      |           ^~~~~~~~~~~~~~~
p1577.cpp:911:10: note:                 'int directory_entry(const std::filesystem::path&)'
  911 | explicit directory_entry(const filesystem::path& p);
      |          ^~~~~~~~~~~~~~~
p1577.cpp:982:63: error: non-member function 'std::strong_ordering operator<=>(const int&)' cannot have cv-qualifier
  982 | strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
      |                                                               ^~~~~~~~
p1577.cpp:982:17: error: 'std::strong_ordering operator<=>(const int&)' must have an argument of class or enumerated type
  982 | strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
      |                 ^~~~~~~~
p1577.cpp:986:3: error: 'friend' used outside of class
  986 |   friend basic_ostream<charT, traits>&
      |   ^~~~~~
      |   ------
p1577.cpp:987:52: error: reference to 'directory_entry' is ambiguous
  987 | operator<<(basic_ostream<charT, traits>& os, const directory_entry& d);
      |                                                    ^~~~~~~~~~~~~~~
p1577.cpp:839:11: note: candidates are: 'class std::filesystem::directory_entry'
  839 |     class directory_entry {
      |           ^~~~~~~~~~~~~~~
p1577.cpp:911:10: note:                 'int directory_entry(const std::filesystem::path&)'
  911 | explicit directory_entry(const filesystem::path& p);
      |          ^~~~~~~~~~~~~~~
p1577.cpp:989:1: error: expected unqualified-id before 'return'
  989 | return os << d.path();
      | ^~~~~~
p1577.cpp:1032:30: error: expected constructor, destructor, or type conversion before ';' token
 1032 | directory_iterator() noexcept;
      |                              ^
p1577.cpp:1037:35: error: reference to 'path' is ambiguous
 1037 | explicit directory_iterator(const path& p);
      |                                   ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1037:10: error: ISO C++ forbids declaration of 'directory_iterator' with no type [-fpermissive]
 1037 | explicit directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~
p1577.cpp:1037:1: error: 'explicit' outside class declaration
 1037 | explicit directory_iterator(const path& p);
      | ^~~~~~~~
p1577.cpp:1038:26: error: reference to 'path' is ambiguous
 1038 | directory_iterator(const path& p, directory_options options);
      |                          ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1038:1: error: reference to 'directory_iterator' is ambiguous
 1038 | directory_iterator(const path& p, directory_options options);
      | ^~~~~~~~~~~~~~~~~~
p1577.cpp:995:14: note: candidates are: 'class std::filesystem::directory_iterator'
  995 |        class directory_iterator {
      |              ^~~~~~~~~~~~~~~~~~
p1577.cpp:1037:10: note:                 'int directory_iterator(const int&)'
 1037 | explicit directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~
p1577.cpp:1038:61: error: expected constructor, destructor, or type conversion before ';' token
 1038 | directory_iterator(const path& p, directory_options options);
      |                                                             ^
p1577.cpp:1039:26: error: reference to 'path' is ambiguous
 1039 | directory_iterator(const path& p, error_code& ec);
      |                          ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1039:1: error: reference to 'directory_iterator' is ambiguous
 1039 | directory_iterator(const path& p, error_code& ec);
      | ^~~~~~~~~~~~~~~~~~
p1577.cpp:995:14: note: candidates are: 'class std::filesystem::directory_iterator'
  995 |        class directory_iterator {
      |              ^~~~~~~~~~~~~~~~~~
p1577.cpp:1037:10: note:                 'int directory_iterator(const int&)'
 1037 | explicit directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~
p1577.cpp:1039:50: error: expected constructor, destructor, or type conversion before ';' token
 1039 | directory_iterator(const path& p, error_code& ec);
      |                                                  ^
p1577.cpp:1040:26: error: reference to 'path' is ambiguous
 1040 | directory_iterator(const path& p, directory_options options, error_code& ec);
      |                          ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1040:1: error: reference to 'directory_iterator' is ambiguous
 1040 | directory_iterator(const path& p, directory_options options, error_code& ec);
      | ^~~~~~~~~~~~~~~~~~
p1577.cpp:995:14: note: candidates are: 'class std::filesystem::directory_iterator'
  995 |        class directory_iterator {
      |              ^~~~~~~~~~~~~~~~~~
p1577.cpp:1037:10: note:                 'int directory_iterator(const int&)'
 1037 | explicit directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~
p1577.cpp:1040:77: error: expected constructor, destructor, or type conversion before ';' token
 1040 | directory_iterator(const path& p, directory_options options, error_code& ec);
      |                                                                             ^
p1577.cpp:1042:11: error: expected ')' before '&' token
 1042 |   (options & directory_options::skip_permission_denied) != directory_options::none
      |   ~       ^~
      |           )
p1577.cpp:1047:19: error: expected constructor, destructor, or type conversion before '(' token
 1047 | directory_iterator(directory_iterator&& rhs) noexcept;
      |                   ^
p1577.cpp:1049:1: error: reference to 'directory_iterator' is ambiguous
 1049 | directory_iterator& operator=(directory_iterator&& rhs) noexcept;
      | ^~~~~~~~~~~~~~~~~~
p1577.cpp:995:14: note: candidates are: 'class std::filesystem::directory_iterator'
  995 |        class directory_iterator {
      |              ^~~~~~~~~~~~~~~~~~
p1577.cpp:1037:10: note:                 'int directory_iterator(const int&)'
 1037 | explicit directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~
p1577.cpp:1052:1: error: reference to 'directory_iterator' is ambiguous
 1052 | directory_iterator& operator++();
      | ^~~~~~~~~~~~~~~~~~
p1577.cpp:995:14: note: candidates are: 'class std::filesystem::directory_iterator'
  995 |        class directory_iterator {
      |              ^~~~~~~~~~~~~~~~~~
p1577.cpp:1037:10: note:                 'int directory_iterator(const int&)'
 1037 | explicit directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~
p1577.cpp:1053:1: error: reference to 'directory_iterator' is ambiguous
 1053 | directory_iterator& increment(error_code& ec);
      | ^~~~~~~~~~~~~~~~~~
p1577.cpp:995:14: note: candidates are: 'class std::filesystem::directory_iterator'
  995 |        class directory_iterator {
      |              ^~~~~~~~~~~~~~~~~~
p1577.cpp:1037:10: note:                 'int directory_iterator(const int&)'
 1037 | explicit directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~
p1577.cpp:1080:12: error: ISO C++ forbids declaration of 'operator=' with no type [-fpermissive]
 1080 |            operator=(const recursive_directory_iterator& rhs);
      |            ^~~~~~~~
p1577.cpp:1095:40: error: expected constructor, destructor, or type conversion before ';' token
 1095 | recursive_directory_iterator() noexcept;
      |                                        ^
p1577.cpp:1096:45: error: reference to 'path' is ambiguous
 1096 | explicit recursive_directory_iterator(const path& p);
      |                                             ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1096:10: error: ISO C++ forbids declaration of 'recursive_directory_iterator' with no type [-fpermissive]
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:1: error: 'explicit' outside class declaration
 1096 | explicit recursive_directory_iterator(const path& p);
      | ^~~~~~~~
p1577.cpp:1097:36: error: reference to 'path' is ambiguous
 1097 | recursive_directory_iterator(const path& p, directory_options options);
      |                                    ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1097:1: error: reference to 'recursive_directory_iterator' is ambiguous
 1097 | recursive_directory_iterator(const path& p, directory_options options);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1060:9: note: candidates are: 'class std::filesystem::recursive_directory_iterator'
 1060 |   class recursive_directory_iterator {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:10: note:                 'int recursive_directory_iterator(const int&)'
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1097:71: error: expected constructor, destructor, or type conversion before ';' token
 1097 | recursive_directory_iterator(const path& p, directory_options options);
      |                                                                       ^
p1577.cpp:1098:36: error: reference to 'path' is ambiguous
 1098 | recursive_directory_iterator(const path& p, directory_options options, error_code& ec);
      |                                    ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1098:1: error: reference to 'recursive_directory_iterator' is ambiguous
 1098 | recursive_directory_iterator(const path& p, directory_options options, error_code& ec);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1060:9: note: candidates are: 'class std::filesystem::recursive_directory_iterator'
 1060 |   class recursive_directory_iterator {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:10: note:                 'int recursive_directory_iterator(const int&)'
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1098:87: error: expected constructor, destructor, or type conversion before ';' token
 1098 | recursive_directory_iterator(const path& p, directory_options options, error_code& ec);
      |                                                                                       ^
p1577.cpp:1099:36: error: reference to 'path' is ambiguous
 1099 | recursive_directory_iterator(const path& p, error_code& ec);
      |                                    ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1099:1: error: reference to 'recursive_directory_iterator' is ambiguous
 1099 | recursive_directory_iterator(const path& p, error_code& ec);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1060:9: note: candidates are: 'class std::filesystem::recursive_directory_iterator'
 1060 |   class recursive_directory_iterator {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:10: note:                 'int recursive_directory_iterator(const int&)'
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1099:60: error: expected constructor, destructor, or type conversion before ';' token
 1099 | recursive_directory_iterator(const path& p, error_code& ec);
      |                                                            ^
p1577.cpp:1105:1: error: 'symlinks' does not name a type
 1105 | symlinks, specify options as directory_options::follow_directory_symlink. —end note]
      | ^~~~~~~~
p1577.cpp:1110:29: error: expected constructor, destructor, or type conversion before '(' token
 1110 | recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
      |                             ^
p1577.cpp:1112:1: error: reference to 'recursive_directory_iterator' is ambiguous
 1112 | recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1060:9: note: candidates are: 'class std::filesystem::recursive_directory_iterator'
 1060 |   class recursive_directory_iterator {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:10: note:                 'int recursive_directory_iterator(const int&)'
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1118:1: error: reference to 'recursive_directory_iterator' is ambiguous
 1118 | recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1060:9: note: candidates are: 'class std::filesystem::recursive_directory_iterator'
 1060 |   class recursive_directory_iterator {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:10: note:                 'int recursive_directory_iterator(const int&)'
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1121:29: error: non-member function 'std::filesystem::directory_options options()' cannot have cv-qualifier
 1121 | directory_options options() const;
      |                             ^~~~~
p1577.cpp:1124:13: error: non-member function 'int depth()' cannot have cv-qualifier
 1124 | int depth() const;
      |             ^~~~~
p1577.cpp:1128:26: error: non-member function 'bool recursion_pending()' cannot have cv-qualifier
 1128 | bool recursion_pending() const;
      |                          ^~~~~
p1577.cpp:1131:1: error: reference to 'recursive_directory_iterator' is ambiguous
 1131 | recursive_directory_iterator& operator++();
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1060:9: note: candidates are: 'class std::filesystem::recursive_directory_iterator'
 1060 |   class recursive_directory_iterator {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:10: note:                 'int recursive_directory_iterator(const int&)'
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1133:1: error: reference to 'recursive_directory_iterator' is ambiguous
 1133 | recursive_directory_iterator end(recursive_directory_iterator) noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1060:9: note: candidates are: 'class std::filesystem::recursive_directory_iterator'
 1060 |   class recursive_directory_iterator {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:10: note:                 'int recursive_directory_iterator(const int&)'
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1139:7: error: reference to 'recursive_directory_iterator' is ambiguous
 1139 |       recursive_directory_iterator& increment(error_code& ec);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1060:9: note: candidates are: 'class std::filesystem::recursive_directory_iterator'
 1060 |   class recursive_directory_iterator {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1096:10: note:                 'int recursive_directory_iterator(const int&)'
 1096 | explicit recursive_directory_iterator(const path& p);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1577.cpp:1143:31: error: expected constructor, destructor, or type conversion before 'is_directory'
 1143 |        recursion_pending() && is_directory((*this)->status()) &&
      |                               ^~~~~~~~~~~~
p1577.cpp:1167:4: error: reference to 'path' is ambiguous
 1167 |    path filesystem::absolute(const path& p);
      |    ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1168:4: error: reference to 'path' is ambiguous
 1168 |    path filesystem::absolute(const path& p, error_code& ec);
      |    ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1172:1: error: reference to 'path' is ambiguous
 1172 | path filesystem::canonical(const path& p);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1173:1: error: reference to 'path' is ambiguous
 1173 | path filesystem::canonical(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1178:55: error: 'void std::filesystem::copy(const path&, const path&)' should have been declared inside 'std::filesystem'
 1178 | void filesystem::copy(const path& from, const path& to);
      |                                                       ^
p1577.cpp:1180:71: error: 'void std::filesystem::copy(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1180 | void filesystem::copy(const path& from, const path& to, error_code& ec);
      |                                                                       ^
p1577.cpp:1182:77: error: 'void std::filesystem::copy(const path&, const path&, copy_options)' should have been declared inside 'std::filesystem'
 1182 | void filesystem::copy(const path& from, const path& to, copy_options options);
      |                                                                             ^
p1577.cpp:1183:93: error: 'void std::filesystem::copy(const path&, const path&, copy_options, std::error_code&)' should have been declared inside 'std::filesystem'
 1183 | void filesystem::copy(const path& from, const path& to, copy_options options, error_code& ec);
      |                                                                                             ^
p1577.cpp:1187:16: error: expected ')' before '&' token
 1187 |        (options & copy_options::copy_symlinks) != copy_options::none
      |        ~       ^~
      |                )
p1577.cpp:1230:82: error: 'bool std::filesystem::copy_file(const path&, const path&, copy_options)' should have been declared inside 'std::filesystem'
 1230 | bool filesystem::copy_file(const path& from, const path& to, copy_options options);
      |                                                                                  ^
p1577.cpp:1231:97: error: 'bool std::filesystem::copy_file(const path&, const path&, copy_options, std::error_code&)' should have been declared inside 'std::filesystem'
 1231 | bool filesystem::copy_file(const path& from, const path& to, copy_options options,error_code& ec);
      |                                                                                                 ^
p1577.cpp:1234:60: error: 'bool std::filesystem::copy_file(const path&, const path&)' should have been declared inside 'std::filesystem'
 1234 | bool filesystem::copy_file(const path& from, const path& to);
      |                                                            ^
p1577.cpp:1235:76: error: 'bool std::filesystem::copy_file(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1235 | bool filesystem::copy_file(const path& from, const path& to, error_code& ec);
      |                                                                            ^
p1577.cpp:1242:20: error: expected ')' before '&' token
 1242 |            (options & (copy_options::skip_existing |
      |            ~       ^~
      |                    )
p1577.cpp:1256:30: error: 'void std::filesystem::copy_symlink(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1256 |              error_code& ec) noexcept;
      |                              ^~~~~~~~
p1577.cpp:1260:50: error: 'bool std::filesystem::create_directories(const path&)' should have been declared inside 'std::filesystem'
 1260 | bool filesystem::create_directories(const path& p);
      |                                                  ^
p1577.cpp:1261:66: error: 'bool std::filesystem::create_directories(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1261 | bool filesystem::create_directories(const path& p, error_code& ec);
      |                                                                  ^
p1577.cpp:1266:48: error: 'bool std::filesystem::create_directory(const path&)' should have been declared inside 'std::filesystem'
 1266 | bool filesystem::create_directory(const path& p);
      |                                                ^
p1577.cpp:1267:66: error: 'bool std::filesystem::create_directory(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1267 | bool filesystem::create_directory(const path& p, error_code& ec) noexcept;
      |                                                                  ^~~~~~~~
p1577.cpp:1270:72: error: 'bool std::filesystem::create_directory(const path&, const path&)' should have been declared inside 'std::filesystem'
 1270 | bool filesystem::create_directory(const path& p, const path& existing_p);
      |                                                                        ^
p1577.cpp:1271:90: error: 'bool std::filesystem::create_directory(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1271 | bool filesystem::create_directory(const path& p, const path& existing_p, error_code& ec) noexcept;
      |                                                                                          ^~~~~~~~
p1577.cpp:1277:82: error: 'void std::filesystem::create_directory_symlink(const path&, const path&)' should have been declared inside 'std::filesystem'
 1277 | void filesystem::create_directory_symlink(const path& to, const path& new_symlink);
      |                                                                                  ^
p1577.cpp:1279:43: error: 'void std::filesystem::create_directory_symlink(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1279 |                           error_code& ec) noexcept;
      |                                           ^~~~~~~~
p1577.cpp:1286:76: error: 'void std::filesystem::create_hard_link(const path&, const path&)' should have been declared inside 'std::filesystem'
 1286 | void filesystem::create_hard_link(const path& to, const path& new_hard_link);
      |                                                                            ^
p1577.cpp:1288:50: error: 'void std::filesystem::create_hard_link(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1288 |                                  error_code& ec) noexcept;
      |                                                  ^~~~~~~~
p1577.cpp:1299:72: error: 'void std::filesystem::create_symlink(const path&, const path&)' should have been declared inside 'std::filesystem'
 1299 | void filesystem::create_symlink(const path& to, const path& new_symlink);
      |                                                                        ^
p1577.cpp:1300:90: error: 'void std::filesystem::create_symlink(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1300 | void filesystem::create_symlink(const path& to, const path& new_symlink, error_code& ec) noexcept;
      |                                                                                          ^~~~~~~~
p1577.cpp:1302:1: error: reference to 'path' is ambiguous
 1302 | path filesystem::current_path();
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1303:1: error: reference to 'path' is ambiguous
 1303 | path filesystem::current_path(error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1309:44: error: 'void std::filesystem::current_path(const path&)' should have been declared inside 'std::filesystem'
 1309 | void filesystem::current_path(const path& p);
      |                                            ^
p1577.cpp:1310:62: error: 'void std::filesystem::current_path(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1310 | void filesystem::current_path(const path& p, error_code& ec) noexcept;
      |                                                              ^~~~~~~~
p1577.cpp:1316:59: error: 'bool std::filesystem::equivalent(const path&, const path&)' should have been declared inside 'std::filesystem'
 1316 | bool filesystem::equivalent(const path& p1, const path& p2);
      |                                                           ^
p1577.cpp:1317:77: error: 'bool std::filesystem::equivalent(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1317 | bool filesystem::equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
      |                                                                             ^~~~~~~~
p1577.cpp:1326:38: error: 'bool std::filesystem::exists(const path&)' should have been declared inside 'std::filesystem'
 1326 | bool filesystem::exists(const path& p);
      |                                      ^
p1577.cpp:1327:56: error: 'bool std::filesystem::exists(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1327 | bool filesystem::exists(const path& p, error_code& ec) noexcept;
      |                                                        ^~~~~~~~
p1577.cpp:1332:46: error: 'uintmax_t std::filesystem::file_size(const path&)' should have been declared inside 'std::filesystem'
 1332 | uintmax_t filesystem::file_size(const path& p);
      |                                              ^
p1577.cpp:1333:64: error: 'uintmax_t std::filesystem::file_size(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1333 | uintmax_t filesystem::file_size(const path& p, error_code& ec) noexcept;
      |                                                                ^~~~~~~~
p1577.cpp:1338:52: error: 'uintmax_t std::filesystem::hard_link_count(const path&)' should have been declared inside 'std::filesystem'
 1338 | uintmax_t filesystem::hard_link_count(const path& p);
      |                                                    ^
p1577.cpp:1339:70: error: 'uintmax_t std::filesystem::hard_link_count(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1339 | uintmax_t filesystem::hard_link_count(const path& p, error_code& ec) noexcept;
      |                                                                      ^~~~~~~~
p1577.cpp:1345:45: error: 'bool std::filesystem::is_block_file(const path&)' should have been declared inside 'std::filesystem'
 1345 | bool filesystem::is_block_file(const path& p);
      |                                             ^
p1577.cpp:1346:63: error: 'bool std::filesystem::is_block_file(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1346 | bool filesystem::is_block_file(const path& p, error_code& ec) noexcept;
      |                                                               ^~~~~~~~
p1577.cpp:1352:49: error: 'bool std::filesystem::is_character_file(const path&)' should have been declared inside 'std::filesystem'
 1352 | bool filesystem::is_character_file(const path& p);
      |                                                 ^
p1577.cpp:1353:67: error: 'bool std::filesystem::is_character_file(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1353 | bool filesystem::is_character_file(const path& p, error_code& ec) noexcept;
      |                                                                   ^~~~~~~~
p1577.cpp:1359:62: error: 'bool std::filesystem::is_directory(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1359 | bool filesystem::is_directory(const path& p, error_code& ec) noexcept;
      |                                                              ^~~~~~~~
p1577.cpp:1374:39: error: 'bool std::filesystem::is_fifo(const path&)' should have been declared inside 'std::filesystem'
 1374 | bool filesystem::is_fifo(const path& p);
      |                                       ^
p1577.cpp:1375:57: error: 'bool std::filesystem::is_fifo(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1375 | bool filesystem::is_fifo(const path& p, error_code& ec) noexcept;
      |                                                         ^~~~~~~~
p1577.cpp:1377:40: error: 'bool std::filesystem::is_empty(const path&)' should have been declared inside 'std::filesystem'
 1377 | bool filesystem::is_empty(const path& p);
      |                                        ^
p1577.cpp:1378:56: error: 'bool std::filesystem::is_empty(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1378 | bool filesystem::is_empty(const path& p, error_code& ec);
      |                                                        ^
p1577.cpp:1384:40: error: 'bool std::filesystem::is_other(const path&)' should have been declared inside 'std::filesystem'
 1384 | bool filesystem::is_other(const path& p);
      |                                        ^
p1577.cpp:1385:58: error: 'bool std::filesystem::is_other(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1385 | bool filesystem::is_other(const path& p, error_code& ec) noexcept;
      |                                                          ^~~~~~~~
p1577.cpp:1391:47: error: 'bool std::filesystem::is_regular_file(const path&)' should have been declared inside 'std::filesystem'
 1391 | bool filesystem::is_regular_file(const path& p);
      |                                               ^
p1577.cpp:1394:65: error: 'bool std::filesystem::is_regular_file(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1394 | bool filesystem::is_regular_file(const path& p, error_code& ec) noexcept;
      |                                                                 ^~~~~~~~
p1577.cpp:1403:41: error: 'bool std::filesystem::is_socket(const path&)' should have been declared inside 'std::filesystem'
 1403 | bool filesystem::is_socket(const path& p);
      |                                         ^
p1577.cpp:1404:59: error: 'bool std::filesystem::is_socket(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1404 | bool filesystem::is_socket(const path& p, error_code& ec) noexcept;
      |                                                           ^~~~~~~~
p1577.cpp:1408:42: error: 'bool std::filesystem::is_symlink(const path&)' should have been declared inside 'std::filesystem'
 1408 | bool filesystem::is_symlink(const path& p);
      |                                          ^
p1577.cpp:1409:60: error: 'bool std::filesystem::is_symlink(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1409 | bool filesystem::is_symlink(const path& p, error_code& ec) noexcept;
      |                                                            ^~~~~~~~
p1577.cpp:1413:1: error: 'file_time_type' does not name a type
 1413 | file_time_type filesystem::last_write_time(const path& p);
      | ^~~~~~~~~~~~~~
p1577.cpp:1414:1: error: 'file_time_type' does not name a type
 1414 | file_time_type filesystem::last_write_time(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~~~~~~
p1577.cpp:1417:49: error: 'file_time_type' has not been declared
 1417 | void filesystem::last_write_time(const path& p, file_time_type new_time);
      |                                                 ^~~~~~~~~~~~~~
p1577.cpp:1417:72: error: 'void std::filesystem::last_write_time(const path&, int)' should have been declared inside 'std::filesystem'
 1417 | void filesystem::last_write_time(const path& p, file_time_type new_time);
      |                                                                        ^
p1577.cpp:1418:49: error: 'file_time_type' has not been declared
 1418 | void filesystem::last_write_time(const path& p, file_time_type new_time,
      |                                                 ^~~~~~~~~~~~~~
p1577.cpp:1419:33: error: 'void std::filesystem::last_write_time(const path&, int, std::error_code&)' should have been declared inside 'std::filesystem'
 1419 |                 error_code& ec) noexcept;
      |                                 ^~~~~~~~
p1577.cpp:1424:89: error: 'replace' is not a member of 'std::filesystem::perm_options'
 1424 | void filesystem::permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                                                                         ^~~~~~~
p1577.cpp:1424:96: error: 'void std::filesystem::permissions(const path&, perms, perm_options)' should have been declared inside 'std::filesystem'
 1424 | void filesystem::permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
      |                                                                                                ^
p1577.cpp:1425:73: error: 'void std::filesystem::permissions(const path&, perms, std::error_code&)' should have been declared inside 'std::filesystem'
 1425 | void filesystem::permissions(const path& p, perms prms, error_code& ec) noexcept;
      |                                                                         ^~~~~~~~
p1577.cpp:1426:90: error: 'void std::filesystem::permissions(const path&, perms, perm_options, std::error_code&)' should have been declared inside 'std::filesystem'
 1426 | void filesystem::permissions(const path& p, perms prms, perm_options opts, error_code& ec);
      |                                                                                          ^
p1577.cpp:1431:1: error: reference to 'path' is ambiguous
 1431 | path filesystem::proximate(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1434:1: error: reference to 'path' is ambiguous
 1434 | path filesystem::proximate(const path& p, const path& base = current_path());
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1435:1: error: reference to 'path' is ambiguous
 1435 | path filesystem::proximate(const path& p, const path& base, error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1438:19: error: expected constructor, destructor, or type conversion before '(' token
 1438 |   weakly_canonical(p, ec).lexically_proximate(weakly_canonical(base, ec));
      |                   ^
p1577.cpp:1441:1: error: reference to 'path' is ambiguous
 1441 | path filesystem::read_symlink(const path& p);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1442:1: error: reference to 'path' is ambiguous
 1442 | path filesystem::read_symlink(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1447:1: error: reference to 'path' is ambiguous
 1447 | path filesystem::relative(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1449:1: error: reference to 'path' is ambiguous
 1449 | path filesystem::relative(const path& p, const path& base = current_path());
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1450:1: error: reference to 'path' is ambiguous
 1450 | path filesystem::relative(const path& p, const path& base, error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1453:24: error: expected constructor, destructor, or type conversion before '(' token
 1453 |        weakly_canonical(p, ec).lexically_relative(weakly_canonical(base, ec));
      |                        ^
p1577.cpp:1456:38: error: 'bool std::filesystem::remove(const path&)' should have been declared inside 'std::filesystem'
 1456 | bool filesystem::remove(const path& p);
      |                                      ^
p1577.cpp:1457:56: error: 'bool std::filesystem::remove(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1457 | bool filesystem::remove(const path& p, error_code& ec) noexcept;
      |                                                        ^~~~~~~~
p1577.cpp:1464:47: error: 'uintmax_t std::filesystem::remove_all(const path&)' should have been declared inside 'std::filesystem'
 1464 | uintmax_t filesystem::remove_all(const path& p);
      |                                               ^
p1577.cpp:1465:63: error: 'uintmax_t std::filesystem::remove_all(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1465 | uintmax_t filesystem::remove_all(const path& p, error_code& ec);
      |                                                               ^
p1577.cpp:1472:61: error: 'void std::filesystem::rename(const path&, const path&)' should have been declared inside 'std::filesystem'
 1472 | void filesystem::rename(const path& old_p, const path& new_p);
      |                                                             ^
p1577.cpp:1473:79: error: 'void std::filesystem::rename(const path&, const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1473 | void filesystem::rename(const path& old_p, const path& new_p, error_code& ec) noexcept;
      |                                                                               ^~~~~~~~
p1577.cpp:1479:63: error: 'void std::filesystem::resize_file(const path&, uintmax_t)' should have been declared inside 'std::filesystem'
 1479 | void filesystem::resize_file(const path& p, uintmax_t new_size);
      |                                                               ^
p1577.cpp:1480:81: error: 'void std::filesystem::resize_file(const path&, uintmax_t, std::error_code&)' should have been declared inside 'std::filesystem'
 1480 | void filesystem::resize_file(const path& p, uintmax_t new_size, error_code& ec) noexcept;
      |                                                                                 ^~~~~~~~
p1577.cpp:1484:43: error: 'std::filesystem::space_info std::filesystem::space(const path&)' should have been declared inside 'std::filesystem'
 1484 | space_info filesystem::space(const path& p);
      |                                           ^
p1577.cpp:1485:61: error: 'std::filesystem::space_info std::filesystem::space(const path&, std::error_code&)' should have been declared inside 'std::filesystem'
 1485 | space_info filesystem::space(const path& p, error_code& ec) noexcept;
      |                                                             ^~~~~~~~
p1577.cpp:1490:1: error: reference to 'file_status' is ambiguous
 1490 | file_status filesystem::status(const path& p);
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1493:3: error: reference to 'file_status' is ambiguous
 1493 |   file_status result = status(p, ec);
      |   ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1494:3: error: expected unqualified-id before 'if'
 1494 |   if (result.type() == file_type::none)
      |   ^~
p1577.cpp:1495:65: error: expected unqualified-id before 'return'
 1495 | throw filesystem_error(implementation-supplied-message, p, ec); return result;
      |                                                                 ^~~~~~
p1577.cpp:1499:1: error: reference to 'file_status' is ambiguous
 1499 | file_status filesystem::status(const path& p, error_code& ec) noexcept;
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1520:7: error: expected nested-name-specifier before 'the'
 1520 | using the contents of the symbolic link.
      |       ^~~
p1577.cpp:1525:1: error: reference to 'file_status' is ambiguous
 1525 | file_status filesystem::symlink_status(const path& p);
      | ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1526:4: error: reference to 'file_status' is ambiguous
 1526 |    file_status filesystem::symlink_status(const path& p, error_code& ec) noexcept;
      |    ^~~~~~~~~~~
p1577.cpp:806:11: note: candidates are: 'class std::filesystem::file_status'
  806 |     class file_status {
      |           ^~~~~~~~~~~
p1577.cpp:827:10: note:                 'int file_status'
  827 | explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
      |          ^~~~~~~~~~~
p1577.cpp:1539:1: error: reference to 'path' is ambiguous
 1539 | path filesystem::temp_directory_path();
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1540:1: error: reference to 'path' is ambiguous
 1540 | path filesystem::temp_directory_path(error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1545:1: error: reference to 'path' is ambiguous
 1545 | path filesystem::weakly_canonical(const path& p);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~
p1577.cpp:1546:1: error: reference to 'path' is ambiguous
 1546 | path filesystem::weakly_canonical(const path& p, error_code& ec);
      | ^~~~
p1577.cpp:216:11: note: candidates are: 'class std::filesystem::path'
  216 |     class path {
      |           ^~~~
p1577.cpp:922:28: note:                 'const std::filesystem::path& path()'
  922 |    const filesystem::path& path() const noexcept;
      |                            ^~~~

検討事項(agenda)

コンパイルエラーを取るか、コンパイルエラーの理由を解説する。

応用例1 AUTOSAR C++

AUTOSARでC++のコーディング標準を作っている。 
MISRA-C++コーディング標準の改訂をまたずに、C++14に対応したかったためかもしれない。 

Autosar Guidelines C++14 example code compile list

MISRA C++, AUTOSAR C++について

応用例2 MISRA C/C++

MISRA C まとめ #include

MISRA C++ 5-0-16

応用例3 CERT C/C++

SEI CERT C++ Coding Standard AA. Bibliography 確認中。

MISRA C/C++, AUTOSAR C++, CERT C/C++とC/C++工業標準をコンパイルする

応用例4 箱庭 

箱庭もくもく会 #10 日時:2022/09/14(水) 17:30-19:30

箱庭ではUnityをはじめC++を使っているらしい。 

ここでコンパイルしたコードと同じようなコードを使っているか、
ここで出たコンパイルエラーと同じようなエラーがでたかを
いろいろな版のコンパイラでコンパイルして確認していく。

この項目は、箱庭プロジェクトを市場分析の対象として、原則的には、箱庭プロジェクトの外部から分析し、外部から箱庭の広告宣伝のための戦略会議を仮想した結果、仮想「箱庭もくもく会」を開催してみることを企画するものである。 
一切の内容は、箱庭プロジェクト、Athrill, TOPPERSとは無関係である。 
一(いち)参加データアナリストの、個人的なつぶやきです。

仮想戦略会議「箱庭」

お盆には「箱庭」記事を書きましょう「もくもく会」の題材になる(1)

お盆には「箱庭」記事を書きましょう「もくもく会」の題材になる(2)

自己参考資料(self reference)

関連する自己参照以外は、こちらの先頭に移転。

C言語(C++)に対する誤解、曲解、無理解、爽快。

#include "N4910.h"

C++N4910資料の改善点

dockerにclang

docker gnu(gcc/g++) and llvm(clang/clang++)

コンパイル用shell script C版(clangとgcc)とC++版(clang++とg++)

C++N4910:2022 tag follower 300人超えました。ありがとうございます。

astyle 使ってみた

<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>

文書履歴(document history)

ver. 0.01 初稿  20220903

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?