tmp/tmptsm078fm/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Function template `clock_cast` <a id="time.clock.cast.fn">[[time.clock.cast.fn]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class DestClock, class SourceClock, class Duration>
|
| 5 |
+
auto clock_cast(const time_point<SourceClock, Duration>& t);
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
*Constraints:* At least one of the following clock time conversion
|
| 9 |
+
expressions is well-formed:
|
| 10 |
+
|
| 11 |
+
- ``` cpp
|
| 12 |
+
clock_time_conversion<DestClock, SourceClock>{}(t)
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
- ``` cpp
|
| 16 |
+
clock_time_conversion<DestClock, system_clock>{}(
|
| 17 |
+
clock_time_conversion<system_clock, SourceClock>{}(t))
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
- ``` cpp
|
| 21 |
+
clock_time_conversion<DestClock, utc_clock>{}(
|
| 22 |
+
clock_time_conversion<utc_clock, SourceClock>{}(t))
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
- ``` cpp
|
| 26 |
+
clock_time_conversion<DestClock, utc_clock>{}(
|
| 27 |
+
clock_time_conversion<utc_clock, system_clock>{}(
|
| 28 |
+
clock_time_conversion<system_clock, SourceClock>{}(t)))
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
- ``` cpp
|
| 32 |
+
clock_time_conversion<DestClock, system_clock>{}(
|
| 33 |
+
clock_time_conversion<system_clock, utc_clock>{}(
|
| 34 |
+
clock_time_conversion<utc_clock, SourceClock>{}(t)))
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
A clock time conversion expression is considered better than another
|
| 38 |
+
clock time conversion expression if it involves fewer `operator()` calls
|
| 39 |
+
on `clock_time_conversion` specializations.
|
| 40 |
+
|
| 41 |
+
*Mandates:* Among the well-formed clock time conversion expressions from
|
| 42 |
+
the above list, there is a unique best expression.
|
| 43 |
+
|
| 44 |
+
*Returns:* The best well-formed clock time conversion expression in the
|
| 45 |
+
above list.
|
| 46 |
+
|