[Python-Dev] PEP 285: Adding a bool type
Erik Max Francis
max at alcyone.com
Sat Mar 30 17:30:13 EST 2002
David Abrahams wrote:
> Well, I try not to play favorites <0.002 wink>, but the implicit
> conversion rules in C++ are admittedly and unfortunately liberal.
> However, bool is detectably NOT derived from int in C++:
>
> void f(int const&);
> f(false); // error!
> assert(boost::is_base_and_derived<int,bool>::value); // fails!
Of course it does; in C++, int and bool aren't even classes, much less
that they have some subclass relationship.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Nationalism is an infantile sickness.
\__/ Albert Einstein
Alcyone Systems' Daily Planet / http://www.alcyone.com/planet.html
A new, virtual planet, every day.
More information about the Python-list
mailing list