Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions stl/inc/filesystem
Original file line number Diff line number Diff line change
Expand Up @@ -2175,12 +2175,6 @@ namespace filesystem {
}
}

#if _HAS_CXX20
void clear_cache() noexcept {
_Cached_data._Available = __std_fs_stats_flags::_None;
}
#endif // _HAS_CXX20

private:
_NODISCARD bool _Has_cached_attribute(const __std_fs_file_attr _Attrs) const noexcept {
return _Bitmask_includes(_Cached_data._Attributes, _Attrs);
Expand Down
1 change: 0 additions & 1 deletion stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@
// P2415R2 What Is A view?
// P2418R2 Add Support For std::generator-like Types To std::format
// P2432R1 Fix istream_view
// P????R? directory_entry::clear_cache()

// _HAS_CXX20 indirectly controls:
// P0619R4 Removing C++17-Deprecated Features
Expand Down
12 changes: 0 additions & 12 deletions tests/std/tests/P0218R1_filesystem/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1200,18 +1200,6 @@ void test_directory_entry() {
EXPECT(good(ec));
EXPECT(cachingEntry.is_regular_file(ec));
EXPECT(good(ec));
#if _HAS_CXX20
// break caching again, and assert that things aren't cached
cachingEntry.clear_cache();
EXPECT(cachingEntry.file_size(ec) == static_cast<uintmax_t>(-1));
EXPECT(bad(ec));
EXPECT(cachingEntry.last_write_time(ec) == file_time_type::min());
EXPECT(bad(ec));
EXPECT(cachingEntry.hard_link_count(ec) == static_cast<uintmax_t>(-1));
EXPECT(bad(ec));
EXPECT(!cachingEntry.is_regular_file(ec));
EXPECT(bad(ec));
#endif // _HAS_CXX20

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