How does C++ implicitly cast arguments to a comparator such as <?
问题 I had thought that this would be an easy question resolve via Google, but I can't seem to find a definitive (or even speculative) answer: When using a comparator statement, in which order does implicit casting occur? int i = -1; size_t t = 1; bool result = i < t; Is this equivalent to: bool result = i < int(t); // equals true or: bool result = size_t(i) < t; // equals false That is the easy part of the question - the second part is "what is the general rule", as it could be: The 'simpler'