[time.traits.is.fp]

# 30 Time library [[time]](./#time)

## 30.4 Time-related traits [[time.traits]](time.traits#is.fp)

### 30.4.1 treat_as_floating_point [time.traits.is.fp]

[ð](#lib:treat_as_floating_point)

`template<class Rep> struct treat_as_floating_point : is_floating_point<Rep> { };
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L1071)

The duration template uses the treat_as_floating_point trait to
help determine if a duration object can be converted to anotherduration with a different tick period[.](#1.sentence-1)

Iftreat_as_floating_point_v<Rep> is true, then implicit conversions
are allowed among durations[.](#1.sentence-2)

Otherwise, the implicit convertibility
depends on the tick periods of the durations[.](#1.sentence-3)

[*Note [1](#note-1)*:

The intention of this trait is to indicate whether a given class behaves like a floating-point
type, and thus allows division of one value by another with acceptable loss of precision[.](#1.sentence-4)

Iftreat_as_floating_point_v<Rep> is false, Rep will be treated as
if it behaved like an integral type for the purpose of these conversions[.](#1.sentence-5)

â *end note*]
