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

List:       kde-core-devel
Subject:    Re: Static functions
From:       Dirk Mueller <mueller () kde ! org>
Date:       2004-02-16 13:55:43
Message-ID: 200402161455.43520.mueller () kde ! org
[Download RAW message or body]

On Monday 16 February 2004 14:21, Thiago Macieira wrote:

> However, if you add  "static" to the namespace above, the symbol won't
> be exported, which is impossible with a class. 

You're aware that this use of "static" is entirely independent of whether or 
not there is a namespace { } around it, right?

So if you like to put the static functions into a namespace because you like 
it complicated, then do it. But it doesn't make a difference. 

As a proof, try to compile your example. It  does not compile (nor work). 

> PS: if anyone is wondering, the symbol mangling is different for the two 
> functions above, at least with g++.

hardly a surprise, or where should the this-pointer come from in a namespace ?


Dirk

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

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