File indexing completed on 2025-01-18 09:51:18
0001 #ifndef BOOST_RATIO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
0002 #define BOOST_RATIO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
0003
0004
0005
0006
0007
0008 #include <type_traits>
0009 #include <cstdint>
0010
0011 namespace boost
0012 {
0013 namespace ratio_detail
0014 {
0015
0016 template<std::intmax_t A, std::intmax_t B> struct is_evenly_divisible_by_: std::integral_constant<bool, A % B == 0>
0017 {
0018 };
0019
0020 template<std::intmax_t A> struct is_evenly_divisible_by_<A, 0>: std::false_type
0021 {
0022 };
0023
0024 template<class R1, class R2> struct is_evenly_divisible_by: std::integral_constant<bool,
0025 is_evenly_divisible_by_<R1::num, R2::num>::value && is_evenly_divisible_by_<R2::den, R1::den>::value>
0026 {
0027 };
0028
0029 }
0030 }
0031
0032 #endif