From Jason Turner

[time.traits.is.fp]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpveb0miah/{from.md → to.md} +20 -0
tmp/tmpveb0miah/{from.md → to.md} RENAMED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### `treat_as_floating_point` <a id="time.traits.is.fp">[[time.traits.is.fp]]</a>
2
+
3
+ ``` cpp
4
+ template<class Rep> struct treat_as_floating_point : is_floating_point<Rep> { };
5
+ ```
6
+
7
+ The `duration` template uses the `treat_as_floating_point` trait to help
8
+ determine if a `duration` object can be converted to another `duration`
9
+ with a different tick `period`. If `treat_as_floating_point_v<Rep>` is
10
+ `true`, then implicit conversions are allowed among `duration`s.
11
+ Otherwise, the implicit convertibility depends on the tick `period`s of
12
+ the `duration`s.
13
+
14
+ [*Note 1*: The intention of this trait is to indicate whether a given
15
+ class behaves like a floating-point type, and thus allows division of
16
+ one value by another with acceptable loss of precision. If
17
+ `treat_as_floating_point_v<Rep>` is `false`, `Rep` will be treated as if
18
+ it behaved like an integral type for the purpose of these
19
+ conversions. — *end note*]
20
+