- chrono[meta header]
- std::chrono[meta namespace]
- function[meta id-type]
- cpp20[meta cpp]
namespace std::chrono {
constexpr bool operator==(const weekday_indexed& x, const weekday_indexed& y) noexcept; // (1) C++20
}weekday_indexed同士の等値比較を行う。
- (1) :
return x.weekday() == y.weekday() && x.index() == y.index();- weekday()[link weekday.md]
- index()[link index.md]
投げない
- この演算子により、
operator!=が使用可能になる
#include <cassert>
#include <chrono>
namespace chrono = std::chrono;
int main()
{
assert(chrono::Sunday[1] == chrono::Sunday[1]);
assert(chrono::Sunday[1] != chrono::Sunday[2]);
assert(chrono::Sunday[1] != chrono::Monday[1]);
}- chrono::Sunday[link /reference/chrono/weekday_constants.md]
- chrono::Monday[link /reference/chrono/weekday_constants.md]
- C++20
- Clang: 8.0
- GCC: (9.2時点で実装なし)
- Visual C++: (2019 Update 3時点で実装なし)