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

List:       kde-core-devel
Subject:    Re: Success: kde 3.1 cvs running on sgi IRIX!
From:       Dominique Devriese <fritmebufstek () pandora ! be>
Date:       2002-08-13 20:48:50
[Download RAW message or body]

Marc Mutz <Marc.Mutz@uni-bielefeld.de> writes:

> On Monday 12 August 2002 12:03, Dominique Devriese wrote:
> <snip>
> > you can achieve the same effect by doing
> > namespace std {
> > extern "C" {
> > #include "math.h"
> > }
> > }
> <snip>
> 
> Sorry to come back again to this subject, but no, it's not the same
> as  
> #include <cmath>. The latter provides overloaded mathematical
> functions  
> for double, float and long double, where with math.h, you'll need to
> either define them on your own or use foo, foof, fool.
> 
> Example: abs is overloaded to span fabs, fabsf, and fabsl.

oops, you're right, forgot about that... you're prolly going to have
to work with the C functions like that... what i meant with "the same
effect" was that you get the benefits of namespaces in your program,
but due to the C linkage, std::fabs still looks like fabs to the
linker... 

cheers
domi

-- 
I've got an IDEA!!  Why don't I STARE at you so HARD you forget your SOCIAL SECURITY NUMBER!!
[prev in list] [next in list] [prev in thread] [next in thread] 

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