Skip to content

Commit 1c7218e

Browse files
committed
remove directory_entry::clear_cache (microsoft#2854)
1 parent aecb8f5 commit 1c7218e

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

stl/inc/filesystem

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,12 +2175,6 @@ namespace filesystem {
21752175
}
21762176
}
21772177

2178-
#if _HAS_CXX20
2179-
void clear_cache() noexcept {
2180-
_Cached_data._Available = __std_fs_stats_flags::_None;
2181-
}
2182-
#endif // _HAS_CXX20
2183-
21842178
private:
21852179
_NODISCARD bool _Has_cached_attribute(const __std_fs_file_attr _Attrs) const noexcept {
21862180
return _Bitmask_includes(_Cached_data._Attributes, _Attrs);

stl/inc/yvals_core.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@
273273
// P2415R2 What Is A view?
274274
// P2418R2 Add Support For std::generator-like Types To std::format
275275
// P2432R1 Fix istream_view
276-
// P????R? directory_entry::clear_cache()
277276

278277
// _HAS_CXX20 indirectly controls:
279278
// P0619R4 Removing C++17-Deprecated Features

tests/std/tests/P0218R1_filesystem/test.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,18 +1200,6 @@ void test_directory_entry() {
12001200
EXPECT(good(ec));
12011201
EXPECT(cachingEntry.is_regular_file(ec));
12021202
EXPECT(good(ec));
1203-
#if _HAS_CXX20
1204-
// break caching again, and assert that things aren't cached
1205-
cachingEntry.clear_cache();
1206-
EXPECT(cachingEntry.file_size(ec) == static_cast<uintmax_t>(-1));
1207-
EXPECT(bad(ec));
1208-
EXPECT(cachingEntry.last_write_time(ec) == file_time_type::min());
1209-
EXPECT(bad(ec));
1210-
EXPECT(cachingEntry.hard_link_count(ec) == static_cast<uintmax_t>(-1));
1211-
EXPECT(bad(ec));
1212-
EXPECT(!cachingEntry.is_regular_file(ec));
1213-
EXPECT(bad(ec));
1214-
#endif // _HAS_CXX20
12151203

12161204
// assert that mutating the path doesn't fail even though the target doesn't exist
12171205
for (auto&& nonexistent : nonexistentPaths) {

0 commit comments

Comments
 (0)