std::chrono::nonexistent_local_time
提供: cppreference.com
<tbody>
</tbody>

| ヘッダ <chrono> で定義
|
||
class nonexistent_local_time; |
(C++20以上) | |
std::chrono::choose (choose::earliest または choose::latest) を指定せずに存在しない std::chrono::local_time を std::chrono::sys_time に変換しようとしたことを報告するために例外として投げられるオブジェクトの型を定義します。
この例外は std::chrono::time_zone::to_sys およびそれを呼ぶ関数 (std::chrono::local_time を取る std::chrono::zoned_time のコンストラクタなど) によって投げられます。
継承図
目次
メンバ関数
| 例外オブジェクトを構築します (パブリックメンバ関数) |
std::chrono::nonexistent_local_time::nonexistent_local_time
<tbody> </tbody> template< class Duration > nonexistent_local_time(const std::chrono::local_time<Duration>& tp, const std::chrono::local_info& i); |
||
例外オブジェクトを構築します。 what() によって返される説明文字列は以下のコードの後 os.str() によって生成されるものと同等になります。
std::ostringstream os;
os << tp << " is in a gap between\n"
<< std::chrono::local_seconds(i.first.end.time_since_epoch()) + i.first.offset
<< ' ' << i.first.abbrev << " and\n"
<< std::chrono::local_seconds(i.second.begin.time_since_epoch()) + i.second.offset
<< ' ' << i.second.abbrev
<< " which are both equivalent to\n"
<< i.first.end << " UTC";
std::exception から派生する標準ライブラリのクラスがコピーされる際に例外を投げることは許されないため、このメッセージは一般的には別に確保された参照カウント管理の文字列として内部的に格納されます。
i.result != std::chrono::local_info::nonexistent の場合、動作は未定義です。
引数
| tp | - | 変換が試みられた時点 |
| i | - | 変換の試みの結果を記述する std::chrono::local_info |
例外
std::bad_alloc を投げる可能性があります。
std::exception から継承
メンバ関数
[仮想] |
例外オブジェクトを破棄します ( std::exceptionの仮想パブリックメンバ関数)
|
[仮想] |
説明文字列を返します ( std::exceptionの仮想パブリックメンバ関数)
|