tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
ratio_less.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_RATIO_LESS_HPP
4#define TETL_RATIO_LESS_HPP
5
8
9namespace etl {
10
15template <typename R1, typename R2>
16struct ratio_less : bool_constant<(R1::num * R2::den < R2::num * R1::den)> { };
17
19template <typename R1, typename R2>
20inline constexpr bool ratio_less_v = ratio_less<R1, R2>::value;
21
22} // namespace etl
23
24#endif // TETL_RATIO_LESS_HPP
Definition adjacent_find.hpp:8
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
Compares two ratio objects for equality at compile-time. If the ratio R1 is less than the ratio R2,...
Definition ratio_less.hpp:16