std::chrono::operator==(std::chrono::weekday_indexed)
De cppreference.com
| Definido en el archivo de encabezado <chrono>
|
||
constexpr bool operator==( const std::chrono::weekday_indexed& x,
const std::chrono::weekday_indexed& y ) noexcept;
|
(desde C++20) | |
Compara los dos objetos weekday_indexed x e y.
El operador != se sintetiza a partir de operator==.
Valor de retorno
x.weekday() == y.weekday() && x.index() == y.index()
Ejemplo
Ejecuta este código
#include <chrono>
int main()
{
constexpr std::chrono::weekday_indexed wdi1 {std::chrono::Wednesday[2]};
constexpr std::chrono::weekday_indexed wdi2 {std::chrono::weekday(3), 2};
static_assert(wdi1 == wdi2);
}