std::filesystem::directory_iterator::operator++, std::filesystem::directory_iterator::increment
提供: cppreference.com
< cpp | filesystem | directory iterator
directory_iterator& operator++(); directory_iterator& increment(std::error_code& ec ); | (C++17以上) | |
イテレータを次のエントリに進めます。 *this の以前の値のコピーをすべて無効化します。
This section is incomplete |
目次 |
[編集]引数
ec | - | エラーを報告するための出力引数 |
[編集]戻り値
*this。
[編集]例外
std::error_code& 引数を取らないオーバーロードは、ベースとなる OS の API でエラーが発生した場合、エラーコード引数に OS のエラーコードを指定して構築された filesystem_error を投げます。 std::error_code& 引数を取るオーバーロードは、 OS の API 呼び出しが失敗した場合、その引数を OS の API のエラーコードに設定し、エラーが発生しない場合は ec.clear() を実行します。 noexcept
指定のないあらゆるオーバーロードは、メモリ確保に失敗した場合 std::bad_alloc を投げる可能性があります。
[編集]欠陥報告
以下の動作変更欠陥報告は以前に発行された C++ 標準に遡って適用されました。
DR | 適用先 | 発行時の動作 | 正しい動作 |
---|---|---|---|
LWG 3013 | C++17 | error_code overload marked noexcept but can allocate memory | noexcept removed |