3 ms·
In C++, you cannot compare unrelated types unless there's an implicit conversion or explicit equality operator (or something like that). In Rust, you cannot com
by nyanpasu64 6y ago
In C++, you cannot compare unrelated types unless there's an implicit conversion or explicit equality operator (or something like that). In Rust, you cannot compare same or different types unless you implement PartialEq, and you can't compare an int with a bool. In Java, you can't use == to compare an int and a bool (both primitives).