std::ratio_not_equal টেমপ্লেট <ratio> হেডারে সংজ্ঞায়িত। দুটি কমপাইল-টাইম রেশিও (compile-time rational numbers) অসমান কিনা চেক করে।
সিনট্যাক্স
template <class R1, class R2> struct ratio_not_equal : integral_constant<bool, !ratio_equal<R1,R2>::value> {}; উদাহরণ
#include <iostream>
#include <ratio>
using namespace std;
int main() {
typedef ratio<2,5> R1;
typedef ratio<1,3> R2;
typedef ratio<2,5> R3;
cout << boolalpha;
cout << "R1 != R2: " << ratio_not_equal<R1,R2>::value << endl; // true
cout << "R1 != R3: " << ratio_not_equal<R1,R3>::value << endl; // false
}
আউটপুট
R1 != R2: true R1 != R3: false