-
Notifications
You must be signed in to change notification settings - Fork 0
calendar.h ~ calendar ~ is_nan
Baptiste Thémine edited this page Aug 6, 2020
·
2 revisions
constexpr bool is_nan(const clock_type &clock) noexcept;
Returns true if the specified clock_type equals CLOCK_NAN
.
(Mandatory)
clock
If clock
equals CLOCK_NAN
, then returns true, else returns false. Moreover, if clock
equals CLOCK_NAN
, then -clock
equals CLOCK_NAN
too.
Never throws exception.
#include <iostream>
#include <JLC/JLC.h>
using namespace JLC;
int main(){
std::cout << std::boolalpha;
std::cout << calendar::is_nan(0) << std::endl;
std::cout << calendar::is_nan(1) << std::endl;
std::cout << calendar::is_nan(CLOCK_MAX) << std::endl;
std::cout << calendar::is_nan(CLOCK_MIN) << std::endl;
std::cout << calendar::is_nan(CLOCK_NAN) << std::endl;
}
false
false
false
false
true