diff --git a/d0355r5.html b/d0355r5.html index be87312..2628873 100644 --- a/d0355r5.html +++ b/d0355r5.html @@ -37,7 +37,7 @@ Document number: D0355R5

Howard E. Hinnant
-2017-10-24
+2017-10-28

Extending <chrono> to Calendars and Time Zones

@@ -59,6 +59,7 @@ Document number: D0355R5

Changes since R4

@@ -9828,9 +9829,12 @@ public: zoned_time(TimeZonePtr z, const local_time<Duration>& tp, choose c); zoned_time(string_view name, const local_time<Duration>& tp, choose c); - zoned_time(TimeZonePtr z, const zoned_time<Duration>& zt); + template <class Duration2, class TimeZonePtr2> + zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& zt); + template <class Duration2, class TimeZonePtr2> + zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& zt, choose); + zoned_time(string_view name, const zoned_time<Duration>& zt); - zoned_time(TimeZonePtr z, const zoned_time<Duration>& zt, choose); zoned_time(string_view name, const zoned_time<Duration>& zt, choose); zoned_time& operator=(const sys_time<Duration>& st); @@ -9894,6 +9898,14 @@ zoned_time(string_view, sys_time<Duration>) template <class Duration> zoned_time(string_view, local_time<Duration>, choose = choose::earliest) -> zoned_time<common_type_t<Duration, seconds>>; + +template <class Duration, class TimeZonePtr, class TimeZonePtr2> +zoned_time(TimeZonePtr, zoned_time<Duration, TimeZonePtr2>) + -> zoned_time<Duration, TimeZonePtr>; + +template <class Duration, class TimeZonePtr, class TimeZonePtr2> +zoned_time(TimeZonePtr, zoned_time<Duration, TimeZonePtr2>, choose) + -> zoned_time<Duration, TimeZonePtr>;

@@ -10086,11 +10098,17 @@ zoned_time<Duration, TimeZonePtr>::zoned_time(string_view name, const loca

-zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const zoned_time<Duration>& y);
+template <class Duration2, TimeZonePtr>
+    zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& y);
 

-Requires: z refers to a valid time_zone. +Remarks: Does not participate in overload resolution unless +sys_time<Duration2> is implicitly convertible to +sys_time<Duration>. +

+

+Requires: z refers to a valid time zone.

Effects: Constructs a zoned_time by initializing zone_ @@ -10098,6 +10116,28 @@ with std::move(z) and tp_ with z.tp_.

+
+template <class Duration2, TimeZonePtr>
+    zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& y,
+                                                  choose);
+
+
+

+Remarks: Does not participate in overload resolution unless +sys_time<Duration2> is implicitly convertible to +sys_time<Duration>. +

+

+Requires: z refers to a valid time zone. +

+

+Effects: Equivalent to construction with {z, y}. +

+

+Note: The choose parameter is allowed here, but has no impact. +

+
+
 zoned_time<Duration, TimeZonePtr>::zoned_time(string_view name, const zoned_time<Duration>& y);
 
@@ -10114,21 +10154,6 @@ and zoned_time.

-
-zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const zoned_time<Duration>& y, choose);
-
-
-

-Requires: z refers to a valid time_zone. -

-

-Effects: Equivalent to construction with {z, y}. -

-

-Note: The choose parameter is allowed here, but has no impact. -

-
-
 zoned_time<Duration, TimeZonePtr>::zoned_time(string_view name, const zoned_time<Duration>& y, choose c);
 
diff --git a/tz.html b/tz.html index 33d0d41..bae3af4 100644 --- a/tz.html +++ b/tz.html @@ -26,7 +26,7 @@

Howard E. Hinnant
-2017-10-24
+2017-10-28

Time Zone Database Parser

@@ -2046,9 +2046,12 @@ public: zoned_time(TimeZonePtr z, const local_time<Duration>& tp, choose c); zoned_time(string_view name, const local_time<Duration>& tp, choose c); - zoned_time(TimeZonePtr z, const zoned_time<Duration>& zt); + template <class Duration2, class TimeZonePtr2> + zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& zt); + template <class Duration2, class TimeZonePtr2> + zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& zt, choose); + zoned_time(string_view name, const zoned_time<Duration>& zt); - zoned_time(TimeZonePtr z, const zoned_time<Duration>& zt, choose); zoned_time(string_view name, const zoned_time<Duration>& zt, choose); zoned_time& operator=(const sys_time<Duration>& st); @@ -2084,6 +2087,44 @@ template <class charT, class traits, class Duration, class TimeZonePtr> basic_ostream<charT, traits>& to_stream(basic_ostream<charT, traits>& os, const charT* fmt, const zoned_time<Duration, TimeZonePtr>& tp); + +zoned_time() + -> zoned_time<seconds>; + +template <class Duration> + zoned_time(sys_time<Duration>) + -> zoned_time<common_type_t<Duration, seconds>>; + +template <class TimeZonePtr, class Duration> + zoned_time(TimeZonePtr, sys_time<Duration>) + -> zoned_time<common_type_t<Duration, seconds>, TimeZonePtr>; + +template <class TimeZonePtr, class Duration> + zoned_time(TimeZonePtr, local_time<Duration>, choose = choose::earliest) + -> zoned_time<common_type_t<Duration, seconds>, TimeZonePtr>; + +template <class TimeZonePtr, class Duration> + zoned_time(TimeZonePtr, zoned_time<Duration>, choose = choose::earliest) + -> zoned_time<common_type_t<Duration, seconds>, TimeZonePtr>; + +zoned_time(string_view) + -> zoned_time<seconds>; + +template <class Duration> +zoned_time(string_view, sys_time<Duration>) + -> zoned_time<common_type_t<Duration, seconds>>; + +template <class Duration> +zoned_time(string_view, local_time<Duration>, choose = choose::earliest) + -> zoned_time<common_type_t<Duration, seconds>>; + +template <class Duration, class TimeZonePtr, class TimeZonePtr2> +zoned_time(TimeZonePtr, zoned_time<Duration, TimeZonePtr2>) + -> zoned_time<Duration, TimeZonePtr>; + +template <class Duration, class TimeZonePtr, class TimeZonePtr2> +zoned_time(TimeZonePtr, zoned_time<Duration, TimeZonePtr2>, choose) + -> zoned_time<Duration, TimeZonePtr>;

@@ -2276,11 +2317,17 @@ zoned_time<Duration, TimeZonePtr>::zoned_time(string_view name, const loca

-zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const zoned_time<Duration>& y);
+template <class Duration2, TimeZonePtr>
+    zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& y);
 

-Requires: z refers to a valid time_zone. +Remarks: Does not participate in overload resolution unless +sys_time<Duration2> is implicitly convertible to +sys_time<Duration>. +

+

+Requires: z refers to a valid time zone.

Effects: Constructs a zoned_time by initializing zone_ @@ -2288,6 +2335,28 @@ with std::move(z) and tp_ with z.tp_.

+
+template <class Duration2, TimeZonePtr>
+    zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& y,
+                                                  choose);
+
+
+

+Remarks: Does not participate in overload resolution unless +sys_time<Duration2> is implicitly convertible to +sys_time<Duration>. +

+

+Requires: z refers to a valid time zone. +

+

+Effects: Equivalent to construction with {z, y}. +

+

+Note: The choose parameter is allowed here, but has no impact. +

+
+
 zoned_time<Duration, TimeZonePtr>::zoned_time(string_view name, const zoned_time<Duration>& y);
 
@@ -2304,21 +2373,6 @@ and zoned_time.

-
-zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const zoned_time<Duration>& y, choose);
-
-
-

-Requires: z refers to a valid time_zone. -

-

-Effects: Equivalent to construction with {z, y}. -

-

-Note: The choose parameter is allowed here, but has no impact. -

-
-
 zoned_time<Duration, TimeZonePtr>::zoned_time(string_view name, const zoned_time<Duration>& y, choose c);