Re: zero and pointer conversions in g++

2005-12-27 Thread Jack Lloyd
I believe the problem is that false (and bool()) have value 0, which is also a pointer value in C (and in C++). C++ is attempting to do the least surprising conversion, and in this case getting that 'wrong'. That is why test1 works and test2 does not. I haven't bothered to check with the standard

zero and pointer conversions in g++

2005-12-26 Thread Thomas Braxton
I have this test code that I think g++ is selecting the wrong function when the second argument is a zero. If compiled with HAVE_ASCII_DEFAULT 1 it selects read(const char*, const char*) instead of read(const char*, const Variant&), for test2a/test3a. If compiled with HAVE_ASCII_DEFAULT 0 compi