From Jason Turner

[time.point.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp0toi5iqo/{from.md → to.md} +43 -0
tmp/tmp0toi5iqo/{from.md → to.md} RENAMED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### General <a id="time.point.general">[[time.point.general]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::chrono {
5
+ template<class Clock, class Duration = typename Clock::duration>
6
+ class time_point {
7
+ public:
8
+ using clock = Clock;
9
+ using duration = Duration;
10
+ using rep = typename duration::rep;
11
+ using period = typename duration::period;
12
+
13
+ private:
14
+ duration d_; // exposition only
15
+
16
+ public:
17
+ // [time.point.cons], construct
18
+ constexpr time_point(); // has value epoch
19
+ constexpr explicit time_point(const duration& d); // same as time_point() + d
20
+ template<class Duration2>
21
+ constexpr time_point(const time_point<clock, Duration2>& t);
22
+
23
+ // [time.point.observer], observer
24
+ constexpr duration time_since_epoch() const;
25
+
26
+ // [time.point.arithmetic], arithmetic
27
+ constexpr time_point& operator++();
28
+ constexpr time_point operator++(int);
29
+ constexpr time_point& operator--();
30
+ constexpr time_point operator--(int);
31
+ constexpr time_point& operator+=(const duration& d);
32
+ constexpr time_point& operator-=(const duration& d);
33
+
34
+ // [time.point.special], special values
35
+ static constexpr time_point min() noexcept;
36
+ static constexpr time_point max() noexcept;
37
+ };
38
+ }
39
+ ```
40
+
41
+ If `Duration` is not a specialization of `duration`, the program is
42
+ ill-formed.
43
+