Static functions

Richard Smith kde at metafoo.co.uk
Mon Feb 16 14:33:32 GMT 2004


On Monday 16 February 2004 1:55 pm, Dirk Mueller wrote:
> 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.
>
> As a proof, try to compile your example. It  does not compile (nor work).

Maybe your compiler is broken. Works fine here.

> > 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 ?

There's no this pointer in a static member of a class.

Richard




More information about the kde-core-devel mailing list