Re: G++ bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux