Is there a way to know if std::chrono::monotonic_clock is defined?
Posted
by Vicente Botet Escriba
on Stack Overflow
See other posts from Stack Overflow
or by Vicente Botet Escriba
Published on 2010-05-30T23:44:33Z
Indexed on
2010/05/30
23:52 UTC
Read the original article
Hit count: 205
C++0X N3092 states that monotonic_clock is optional.
20.10.5.2 Class monotonic_clock [time.clock.monotonic]
1 Objects of class monotonic_clock represent clocks for which values of time_point never decrease as physical time advances. monotonic_clock may be a synonym for system_clock if system_clock::is_monotonic is true.
** 2 The class monotonic_clock is conditionally supported.**
Is there a way using SFINAE or another technique to define a traits class that states if monotonic_clock is defined?
struct is_monotonic_clock_defined;
If yes, how? If not, shouldn't the standard define macro that gives this information at preprocessing time?
© Stack Overflow or respective owner