std::chrono::month_day_last:: ok
From cppreference.net
<
cpp
|
chrono
|
month day last
C++
Date and time library
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::chrono::month_day_last
| Member functions | ||||
|
month_day_last::ok
|
||||
| Nonmember functions | ||||
| Helper classes | ||||
|
constexpr
bool
ok
(
)
const
noexcept
;
|
(desde C++20) | |
Comprueba si el objeto
month
almacenado en
*
this
es válido.
Valor de retorno
month ( ) . ok ( )
Ejemplo
Ejecutar este código
#include <cassert> #include <chrono> int main() { auto mdl{std::chrono::February/std::chrono::last}; assert(mdl.ok()); mdl = {std::chrono::month(42)/std::chrono::last}; assert(!mdl.ok()); }