[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    stupid C++ question / operator overloading / Qt
From:       Dirk Mueller <mueller () kde ! org>
Date:       2001-02-27 19:06:13
[Download RAW message or body]

Hi, 

I noticed that Qt uses "int operator==(foo, bar)" while my C++ book 
(Stroustrup) says something about "bool operator==(foo, bar)". Is it just 
sad that gcc doesn`t warn about this, or is it really useful/legal 
to do something like that ? 

Are there compilers out there needing this specific return type ?

I'm just wondering.. it seems to have a dramatic effect on code generation 
for g++/gcc when changing the return type to "bool". strange world. 


Dirk

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic