tmp/tmps849zt0l/{from.md → to.md}
RENAMED
|
@@ -1,54 +1,46 @@
|
|
| 1 |
-
###
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class ToDuration, class Clock, class Duration>
|
| 5 |
-
constexpr time_point<Clock, ToDuration>
|
| 6 |
-
time_point_cast(const time_point<Clock, Duration>& t);
|
| 7 |
```
|
| 8 |
|
| 9 |
-
*
|
| 10 |
-
unless `ToDuration` is a specialization of `duration`.
|
| 11 |
|
| 12 |
*Returns:*
|
| 13 |
|
| 14 |
``` cpp
|
| 15 |
time_point<Clock, ToDuration>(duration_cast<ToDuration>(t.time_since_epoch()))
|
| 16 |
```
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
template<class ToDuration, class Clock, class Duration>
|
| 20 |
-
constexpr time_point<Clock, ToDuration>
|
| 21 |
-
floor(const time_point<Clock, Duration>& tp);
|
| 22 |
```
|
| 23 |
|
| 24 |
-
*
|
| 25 |
-
unless `ToDuration` is a specialization of `duration`.
|
| 26 |
|
| 27 |
*Returns:*
|
| 28 |
`time_point<Clock, ToDuration>(floor<ToDuration>(tp.time_since_epoch()))`.
|
| 29 |
|
| 30 |
``` cpp
|
| 31 |
template<class ToDuration, class Clock, class Duration>
|
| 32 |
-
constexpr time_point<Clock, ToDuration>
|
| 33 |
-
ceil(const time_point<Clock, Duration>& tp);
|
| 34 |
```
|
| 35 |
|
| 36 |
-
*
|
| 37 |
-
unless `ToDuration` is a specialization of `duration`.
|
| 38 |
|
| 39 |
*Returns:*
|
| 40 |
`time_point<Clock, ToDuration>(ceil<ToDuration>(tp.time_since_epoch()))`.
|
| 41 |
|
| 42 |
``` cpp
|
| 43 |
template<class ToDuration, class Clock, class Duration>
|
| 44 |
-
constexpr time_point<Clock, ToDuration>
|
| 45 |
-
round(const time_point<Clock, Duration>& tp);
|
| 46 |
```
|
| 47 |
|
| 48 |
-
*
|
| 49 |
-
unless `ToDuration` is a specialization of `duration`, and
|
| 50 |
`treat_as_floating_point_v<typename ToDuration::rep>` is `false`.
|
| 51 |
|
| 52 |
*Returns:*
|
| 53 |
`time_point<Clock, ToDuration>(round<ToDuration>(tp.time_since_epoch()))`.
|
| 54 |
|
|
|
|
| 1 |
+
### Conversions <a id="time.point.cast">[[time.point.cast]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class ToDuration, class Clock, class Duration>
|
| 5 |
+
constexpr time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
|
|
|
|
| 6 |
```
|
| 7 |
|
| 8 |
+
*Constraints:* `ToDuration` is a specialization of `duration`.
|
|
|
|
| 9 |
|
| 10 |
*Returns:*
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
time_point<Clock, ToDuration>(duration_cast<ToDuration>(t.time_since_epoch()))
|
| 14 |
```
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
template<class ToDuration, class Clock, class Duration>
|
| 18 |
+
constexpr time_point<Clock, ToDuration> floor(const time_point<Clock, Duration>& tp);
|
|
|
|
| 19 |
```
|
| 20 |
|
| 21 |
+
*Constraints:* `ToDuration` is a specialization of `duration`.
|
|
|
|
| 22 |
|
| 23 |
*Returns:*
|
| 24 |
`time_point<Clock, ToDuration>(floor<ToDuration>(tp.time_since_epoch()))`.
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
template<class ToDuration, class Clock, class Duration>
|
| 28 |
+
constexpr time_point<Clock, ToDuration> ceil(const time_point<Clock, Duration>& tp);
|
|
|
|
| 29 |
```
|
| 30 |
|
| 31 |
+
*Constraints:* `ToDuration` is a specialization of `duration`.
|
|
|
|
| 32 |
|
| 33 |
*Returns:*
|
| 34 |
`time_point<Clock, ToDuration>(ceil<ToDuration>(tp.time_since_epoch()))`.
|
| 35 |
|
| 36 |
``` cpp
|
| 37 |
template<class ToDuration, class Clock, class Duration>
|
| 38 |
+
constexpr time_point<Clock, ToDuration> round(const time_point<Clock, Duration>& tp);
|
|
|
|
| 39 |
```
|
| 40 |
|
| 41 |
+
*Constraints:* `ToDuration` is a specialization of `duration`, and
|
|
|
|
| 42 |
`treat_as_floating_point_v<typename ToDuration::rep>` is `false`.
|
| 43 |
|
| 44 |
*Returns:*
|
| 45 |
`time_point<Clock, ToDuration>(round<ToDuration>(tp.time_since_epoch()))`.
|
| 46 |
|