std::filesystem::directory_iterator::operator++, std::filesystem::directory_iterator::increment
來自 cppreference.com
directory_iterator& operator++(); |
(1) | (C++17 起) |
directory_iterator& increment( std::error_code& ec ); |
(2) | (C++17 起) |
將迭代器推進到下一個條目。使 *this 先前值的所有副本失效。
本節不完整 |
目錄 |
[編輯] 引數
ec | - | 用於儲存錯誤狀態的錯誤程式碼 |
[編輯] 返回值
*this
[編輯] 異常
任何未標記為 noexcept
的過載都可能在記憶體分配失敗時丟擲 std::bad_alloc。
1) 在底層作業系統 API 錯誤時丟擲 std::filesystem::filesystem_error,並以作業系統錯誤碼作為錯誤碼引數進行構造。
[編輯] 示例
本節不完整 原因:無示例 |
[編輯] 缺陷報告
下列更改行為的缺陷報告追溯地應用於以前出版的 C++ 標準。
缺陷報告 | 應用於 | 釋出時的行為 | 正確的行為 |
---|---|---|---|
LWG 3013 | C++17 | error_code 過載被標記為 noexcept 但可以分配記憶體 |
noexcept 已移除 |