From Jason Turner

[time.clock.conv]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpm4a1c7bu/{from.md → to.md} +28 -0
tmp/tmpm4a1c7bu/{from.md → to.md} RENAMED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Class template `clock_time_conversion` <a id="time.clock.conv">[[time.clock.conv]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::chrono {
5
+ template<class DestClock, class SourceClock>
6
+ struct clock_time_conversion {};
7
+ }
8
+ ```
9
+
10
+ `clock_time_conversion` serves as a trait which can be used to specify
11
+ how to convert a source `time_point` of type
12
+ `time_point<SourceClock, Duration>` to a destination `time_point` of
13
+ type `time_point<DestClock, Duration>` via a specialization:
14
+ `clock_time_conversion<DestClock, SourceClock>`. A specialization of
15
+ `clock_time_conversion<DestClock, SourceClock>` shall provide a
16
+ const-qualified `operator()` that takes a parameter of type
17
+ `time_point<SourceClock, Duration>` and returns a
18
+ `time_point<DestClock, OtherDuration>` representing an equivalent point
19
+ in time. `OtherDuration` is a `chrono::duration` whose specialization is
20
+ computed from the input `Duration` in a manner which can vary for each
21
+ `clock_time_conversion` specialization. A program may specialize
22
+ `clock_time_conversion` if at least one of the template parameters is a
23
+ user-defined clock type.
24
+
25
+ Several specializations are provided by the implementation, as described
26
+ in [[time.clock.cast.id]], [[time.clock.cast.sys.utc]],
27
+ [[time.clock.cast.sys]], and [[time.clock.cast.utc]].
28
+