From 7ffdc2450a06e5dc5de5080c5a624fa30ab48fa5 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 17 Jun 2017 10:28:00 -0400 Subject: [PATCH] Reword is_clock and add is_clock_v --- d0355r3.html | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/d0355r3.html b/d0355r3.html index 1a836a8..a738c99 100644 --- a/d0355r3.html +++ b/d0355r3.html @@ -37,7 +37,7 @@ Document number: D0355R3

Howard E. Hinnant
-2017-06-16
+2017-06-17

Extending <chrono> to Calendars and Time Zones

@@ -805,6 +805,7 @@ namespace chrono { // ... template <class T> struct is_clock; +template <class T> inline constexpr bool is_clock_v = is_clock<T>::value; // duration I/O template <class charT, class traits, class Rep, class Period> @@ -1571,22 +1572,29 @@ template <class T> struct is_clock;

-is_clock is a type property query trait that publicly derives from -true_type if T meets the Clock requirements ([time.clock.req]), -else it derives from false_type. For the purposes of the specification of -this trait, T meets the clock requirements if it has all of the following -properties: +is_clock is a UnaryTypeTrait ([meta.rqmts]) with a base +characteristic of true_type if T meets the Clock +requirements ([time.clock.req]), otherwise false_type. For the purposes of +the specification of this trait, the extent to which an implementation determines that a +type cannot meet the clock requirements is unspecified, except that as a minimum a type +T shall not qualify as a clock unless it satisfies all of the following +conditions:

+

+The behavior of a program that adds specializations for is_clock is undefined. +

+

@@ -10273,7 +10281,7 @@ requirements. If a template parameter is named Predicate, operator() applied to the template argument shall return a value that is convertible to bool. A program that instantiates a template with a template parameter named Clock with a type for which -chrono::is_clock<Clock>::value is false, is ill-formed. +chrono::is_clock_v<Clock> is false, is ill-formed.