[EMAIL PROTECTED] writes: > I would like to understand what g++ is doing in the following case a
Following the C++ Language specification ... > My main question has to be why 0 is treated as void* but any other > number won't be. Because the standard says that's what is supposed to happen. > Is this because 0 is NULL No, '0' is definitely not the same thing as 'NULL'. > and a pointer is basically an unsigned int? And a pointer is certainly not an unsigned int (on 64-bit machines they even have different size). > The second would be why the cast causes an ambiguity but not a.foo(x). Again, because the standard says so. The relevant portion of the standard -- 13.3 Overload resolution -- takes about 20 pages, which I am not about to repeat here. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. _______________________________________________ Help-gplusplus mailing list Help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus