weekday_indexed() = default; // (1) C++20
constexpr weekday_indexed(const chrono::weekday& wd,
unsigned int index) noexcept; // (2) C++20
weekday_indexed(const weekday_indexed&) = default; // (3) C++20
weekday_indexed(weekday_indexed&&) = default; // (4) C++20
概要
- (1) : デフォルトコンストラクタ
- (2) : 曜日とインデックスを指定して
weekday_indexed
オブジェクトを構築する - (3) : コピーコンストラクタ
- (4) : ムーブコンストラクタ
効果
- (1) :
- (2) :
例外
投げない
例
#include <cassert>
#include <chrono>
namespace chrono = std::chrono;
int main() {
chrono::weekday_indexed wi{chrono::Sunday, 1};
assert(wi.weekday() == chrono::Sunday);
assert(wi.index() == 1);
}
出力
バージョン
言語
- C++20
処理系
- Clang: 8.0 ✅
- GCC: 9.2 ❌
- Visual C++: 2019 Update 3 ❌