зеркало из https://github.com/microsoft/STL.git
remove `directory_entry::clear_cache` (#2854)
This commit is contained in:
Родитель
96831daa8a
Коммит
5d0006573d
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче