tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
treat_as_floating_point.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4#ifndef TETL_CHRONO_TREAT_AS_FLOATING_POINT_HPP
5#define TETL_CHRONO_TREAT_AS_FLOATING_POINT_HPP
6
7#include <etl/_type_traits/is_floating_point.hpp>
8
9namespace etl::chrono {
10
11/// \brief The etl::chrono::treat_as_floating_point trait helps determine if a
12/// duration can be converted to another duration with a different tick period.
13/// \details Implicit conversions between two durations normally depends on the
14/// tick period of the durations. However, implicit conversions can happen
15/// regardless of tick period if
16/// etl::chrono::treat_as_floating_point<Rep>::value == true.
17/// \note etl::chrono::treat_as_floating_point may be specialized for
18/// program-defined types.
19/// \ingroup chrono
20template <typename Rep>
21struct treat_as_floating_point : etl::is_floating_point<Rep> { };
22
23/// \ingroup chrono
24template <typename Rep>
26
27} // namespace etl::chrono
28
29#endif // TETL_CHRONO_TREAT_AS_FLOATING_POINT_HPP
constexpr bool treat_as_floating_point_v
Definition treat_as_floating_point.hpp:25
Definition abs.hpp:12
Definition adjacent_find.hpp:9
The etl::chrono::treat_as_floating_point trait helps determine if a duration can be converted to anot...
Definition treat_as_floating_point.hpp:21