std::ratio_equal
Min standard notice:
Header: <ratio>
If the ratios R1 and R2 are equal, provides the member constant value equal true. Otherwise, value is false.
# Declarations
template< class R1, class R2 >
struct ratio_equal : std::integral_constant<bool, /* see below */> { };
(since C++11)
# Example
#include <iostream>
#include <ratio>
int main()
{
constexpr bool equ = std::ratio_equal_v<std::ratio<2,3>,
std::ratio<6,9>>;
static_assert(equ);
std::cout << "2/3 " << (equ ? "==" : "!=") << " 6/9\n";
}