tmp/tmp5vwl139i/{from.md → to.md}
RENAMED
|
@@ -66,11 +66,11 @@ The value returned shall compare greater than `zero()`.
|
|
| 66 |
#### Specializations of `common_type` <a id="time.traits.specializations">[[time.traits.specializations]]</a>
|
| 67 |
|
| 68 |
``` cpp
|
| 69 |
template <class Rep1, class Period1, class Rep2, class Period2>
|
| 70 |
struct common_type<chrono::duration<Rep1, Period1>, chrono::duration<Rep2, Period2>> {
|
| 71 |
-
typedef chrono::duration<
|
| 72 |
};
|
| 73 |
```
|
| 74 |
|
| 75 |
The `period` of the `duration` indicated by this specialization of
|
| 76 |
`common_type` shall be the greatest common divisor of `Period1` and
|
|
@@ -86,11 +86,11 @@ this conversion with no truncation error, although floating-point
|
|
| 86 |
durations may have round-off errors.
|
| 87 |
|
| 88 |
``` cpp
|
| 89 |
template <class Clock, class Duration1, class Duration2>
|
| 90 |
struct common_type<chrono::time_point<Clock, Duration1>, chrono::time_point<Clock, Duration2>> {
|
| 91 |
-
typedef chrono::time_point<Clock,
|
| 92 |
};
|
| 93 |
```
|
| 94 |
|
| 95 |
The common type of two `time_point` types is a `time_point` with the
|
| 96 |
same clock as the two types and the common type of their two
|
|
|
|
| 66 |
#### Specializations of `common_type` <a id="time.traits.specializations">[[time.traits.specializations]]</a>
|
| 67 |
|
| 68 |
``` cpp
|
| 69 |
template <class Rep1, class Period1, class Rep2, class Period2>
|
| 70 |
struct common_type<chrono::duration<Rep1, Period1>, chrono::duration<Rep2, Period2>> {
|
| 71 |
+
typedef chrono::duration<common_type_t<Rep1, Rep2>, see below> type;
|
| 72 |
};
|
| 73 |
```
|
| 74 |
|
| 75 |
The `period` of the `duration` indicated by this specialization of
|
| 76 |
`common_type` shall be the greatest common divisor of `Period1` and
|
|
|
|
| 86 |
durations may have round-off errors.
|
| 87 |
|
| 88 |
``` cpp
|
| 89 |
template <class Clock, class Duration1, class Duration2>
|
| 90 |
struct common_type<chrono::time_point<Clock, Duration1>, chrono::time_point<Clock, Duration2>> {
|
| 91 |
+
typedef chrono::time_point<Clock, common_type_t<Duration1, Duration2>> type;
|
| 92 |
};
|
| 93 |
```
|
| 94 |
|
| 95 |
The common type of two `time_point` types is a `time_point` with the
|
| 96 |
same clock as the two types and the common type of their two
|