Skip to content

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;

Description

Returns true if the specified clock_type equals CLOCK_NAN.

Parameters

(Mandatory)

  • clock

Return value

If clock equals CLOCK_NAN, then returns true, else returns false. Moreover, if clock equals CLOCK_NAN, then -clock equals CLOCK_NAN too.

Exceptions

Never throws exception.

Examples

#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

See also

Clone this wiki locally