Static functions
Dirk Mueller
mueller at kde.org
Mon Feb 16 13:55:43 GMT 2004
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
More information about the kde-core-devel
mailing list