G++ bug?
John Love-Jensen
eljay@adobe.com
Wed Apr 11 11:27:00 GMT 2007
Hi Leon,
I believe you've run into C++ (ISO 14882) convenient implicit conversion to
bool from pointers, integrals and floating points. Your enum is an
integral.
q.v.: Stroustrup C++PL C.6.2.5 Boolean Conversions
As far as I am aware, there is no mechanism to disable the implicit
conversion in your situation (other than change your code to avoid using
bool as a parameter).
HTH,
--Eljay
More information about the Gcc-help
mailing list