Title
Add a feature-detect macro for monotonic_clock
Status
resolved
Section
[time.clock.monotonic]
Submitter
BSI

Created on 2010-08-25.00:00:00 last changed 170 months ago

Messages

Date: 2011-05-21.21:15:19

Proposed resolution:

This is resolved by n3191.

Date: 2010-11-01.00:00:00

[ 2010-11-01 Daniel comments: ]

Paper n3128 addresses this issue by replacing monotonic_clock with steady_clock, which is not conditionally supported, so there is no need to detect it.

Date: 2010-10-26.11:52:55

[ Resolution proposed in ballot comment: ]

Provide feature test macro for determining the presence of std::chrono::monotonic_clock. Add _STDCPP_HAS_MONOTONIC_CLOCK to the <chrono> header, which is defined if monotonic_clock is present, and not defined if it is not present.

Date: 2010-11-07.14:07:22

Addresses GB-107, DE-20

[intro.compliance] p.9 states that which conditionally supported constructs are available should be provided in the documentation for the implementation. This doesn't help programmers trying to write portable code, as they must then rely on implementation-specific means to determine the availability of such constructs. In particular, the presence or absence of std::chrono::monotonic_clock may require different code paths to be selected. This is the only conditionally-supported library facility, and differs from the conditionally-supported language facilities in that it has standard-defined semantics rather than implementation-defined semantics.

History
Date User Action Args
2010-11-18 12:46:23adminsetstatus: nad editorial -> resolved
2010-11-13 13:11:26adminsetstatus: open -> nad editorial
2010-11-01 19:22:54adminsetmessages: + msg5227
2010-11-01 19:22:54adminsetmessages: + msg5226
2010-10-26 11:52:55adminsetmessages: + msg5140
2010-10-24 03:04:13adminsetmessages: + msg4909
2010-08-25 00:00:00admincreate