@@ -87,80 +87,88 @@ class directory_entry {
8787
8888 _LIBCPP_HIDE_FROM_ABI void refresh (error_code& __ec) noexcept { __refresh (&__ec); }
8989
90- _LIBCPP_HIDE_FROM_ABI _Path const & path () const noexcept { return __p_; }
90+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _Path const & path () const noexcept { return __p_; }
9191
9292 _LIBCPP_HIDE_FROM_ABI operator const _Path&() const noexcept { return __p_; }
9393
94- _LIBCPP_HIDE_FROM_ABI bool exists () const { return filesystem::exists (file_status{__get_ft ()}); }
94+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool exists () const { return filesystem::exists (file_status{__get_ft ()}); }
9595
96- _LIBCPP_HIDE_FROM_ABI bool exists (error_code& __ec) const noexcept {
96+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool exists (error_code& __ec) const noexcept {
9797 return filesystem::exists (file_status{__get_ft (&__ec)});
9898 }
9999
100- _LIBCPP_HIDE_FROM_ABI bool is_block_file () const { return __get_ft () == file_type::block; }
100+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_block_file () const { return __get_ft () == file_type::block; }
101101
102- _LIBCPP_HIDE_FROM_ABI bool is_block_file (error_code& __ec) const noexcept {
102+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_block_file (error_code& __ec) const noexcept {
103103 return __get_ft (&__ec) == file_type::block;
104104 }
105105
106- _LIBCPP_HIDE_FROM_ABI bool is_character_file () const { return __get_ft () == file_type::character; }
106+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_character_file () const { return __get_ft () == file_type::character; }
107107
108- _LIBCPP_HIDE_FROM_ABI bool is_character_file (error_code& __ec) const noexcept {
108+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_character_file (error_code& __ec) const noexcept {
109109 return __get_ft (&__ec) == file_type::character;
110110 }
111111
112- _LIBCPP_HIDE_FROM_ABI bool is_directory () const { return __get_ft () == file_type::directory; }
112+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_directory () const { return __get_ft () == file_type::directory; }
113113
114- _LIBCPP_HIDE_FROM_ABI bool is_directory (error_code& __ec) const noexcept {
114+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_directory (error_code& __ec) const noexcept {
115115 return __get_ft (&__ec) == file_type::directory;
116116 }
117117
118- _LIBCPP_HIDE_FROM_ABI bool is_fifo () const { return __get_ft () == file_type::fifo; }
118+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_fifo () const { return __get_ft () == file_type::fifo; }
119119
120- _LIBCPP_HIDE_FROM_ABI bool is_fifo (error_code& __ec) const noexcept { return __get_ft (&__ec) == file_type::fifo; }
120+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_fifo (error_code& __ec) const noexcept {
121+ return __get_ft (&__ec) == file_type::fifo;
122+ }
121123
122- _LIBCPP_HIDE_FROM_ABI bool is_other () const { return filesystem::is_other (file_status{__get_ft ()}); }
124+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_other () const { return filesystem::is_other (file_status{__get_ft ()}); }
123125
124- _LIBCPP_HIDE_FROM_ABI bool is_other (error_code& __ec) const noexcept {
126+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_other (error_code& __ec) const noexcept {
125127 return filesystem::is_other (file_status{__get_ft (&__ec)});
126128 }
127129
128- _LIBCPP_HIDE_FROM_ABI bool is_regular_file () const { return __get_ft () == file_type::regular; }
130+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_regular_file () const { return __get_ft () == file_type::regular; }
129131
130- _LIBCPP_HIDE_FROM_ABI bool is_regular_file (error_code& __ec) const noexcept {
132+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_regular_file (error_code& __ec) const noexcept {
131133 return __get_ft (&__ec) == file_type::regular;
132134 }
133135
134- _LIBCPP_HIDE_FROM_ABI bool is_socket () const { return __get_ft () == file_type::socket; }
136+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_socket () const { return __get_ft () == file_type::socket; }
135137
136- _LIBCPP_HIDE_FROM_ABI bool is_socket (error_code& __ec) const noexcept { return __get_ft (&__ec) == file_type::socket; }
138+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_socket (error_code& __ec) const noexcept {
139+ return __get_ft (&__ec) == file_type::socket;
140+ }
137141
138- _LIBCPP_HIDE_FROM_ABI bool is_symlink () const { return __get_sym_ft () == file_type::symlink; }
142+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_symlink () const { return __get_sym_ft () == file_type::symlink; }
139143
140- _LIBCPP_HIDE_FROM_ABI bool is_symlink (error_code& __ec) const noexcept {
144+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool is_symlink (error_code& __ec) const noexcept {
141145 return __get_sym_ft (&__ec) == file_type::symlink;
142146 }
143- _LIBCPP_HIDE_FROM_ABI uintmax_t file_size () const { return __get_size (); }
147+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI uintmax_t file_size () const { return __get_size (); }
144148
145- _LIBCPP_HIDE_FROM_ABI uintmax_t file_size (error_code& __ec) const noexcept { return __get_size (&__ec); }
149+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI uintmax_t file_size (error_code& __ec) const noexcept { return __get_size (&__ec); }
146150
147- _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count () const { return __get_nlink (); }
151+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count () const { return __get_nlink (); }
148152
149- _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count (error_code& __ec) const noexcept { return __get_nlink (&__ec); }
153+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count (error_code& __ec) const noexcept {
154+ return __get_nlink (&__ec);
155+ }
150156
151- _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time () const { return __get_write_time (); }
157+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time () const { return __get_write_time (); }
152158
153- _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time (error_code& __ec) const noexcept {
159+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time (error_code& __ec) const noexcept {
154160 return __get_write_time (&__ec);
155161 }
156162
157- _LIBCPP_HIDE_FROM_ABI file_status status () const { return __get_status (); }
163+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI file_status status () const { return __get_status (); }
158164
159- _LIBCPP_HIDE_FROM_ABI file_status status (error_code& __ec) const noexcept { return __get_status (&__ec); }
165+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI file_status status (error_code& __ec) const noexcept {
166+ return __get_status (&__ec);
167+ }
160168
161- _LIBCPP_HIDE_FROM_ABI file_status symlink_status () const { return __get_symlink_status (); }
169+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI file_status symlink_status () const { return __get_symlink_status (); }
162170
163- _LIBCPP_HIDE_FROM_ABI file_status symlink_status (error_code& __ec) const noexcept {
171+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI file_status symlink_status (error_code& __ec) const noexcept {
164172 return __get_symlink_status (&__ec);
165173 }
166174
0 commit comments