std::filesystem::filesystem_error:: filesystem_error
|
filesystem_error
(
const
std::
string
&
what_arg,
std:: error_code ec ) ; |
(1) | (C++17以降) |
|
filesystem_error
(
const
std::
string
&
what_arg,
const
std::
filesystem
::
path
&
p1,
|
(2) | (C++17以降) |
|
filesystem_error
(
const
std::
string
&
what_arg,
const
std::
filesystem
::
path
&
p1,
|
(3) | (C++17以降) |
|
filesystem_error
(
const
filesystem_error
&
other
)
noexcept
;
|
(4) | (C++17以降) |
filesystem_error
オブジェクトを新しく構築します。
what()
は構築後に、
what_arg
を含む文字列を返す(埋め込まれたnull文字を含まないと仮定した場合)。
path
引数のいずれか、または両方が提供されない場合、代わりにnullの
path
が使用される。
other
の内容で初期化する。
*
this
と
other
の両方が動的型
std::filesystem_error::filesystem_error
を持つ場合、
std::
strcmp
(
what
(
)
, other.
what
(
)
)
==
0
となる。
パラメータ
| what_arg | - | 説明文字列 |
| ec | - | 特定のオペレーティングシステム依存エラーのエラーコード |
| p1, p2 | - | システムエラーを発生させた操作に関連するパス |
| other | - |
コピーする別の
filesystem_error
オブジェクト
|
注記
std::filesystem::filesystem_error
のコピーは例外をスローすることが許可されていないため、説明文字列は通常、内部で別途確保された参照カウント方式のストレージに格納されます。これがまた、
std::string&&
を受け取るコンストラクタが存在しない理由でもあります:いずれにせよ内容をコピーする必要があるためです。
一般的な実装では、参照カウントされたストレージに
path
オブジェクトも格納されます。これは
path1()
および
path2()
によって参照されます。
例
|
このセクションは不完全です
理由: 例がありません |