Static stuff..
Malte Starostik
malte at kde.org
Tue Dec 31 13:32:04 GMT 2002
On Tuesday 31 December 2002 12:26, Christophe Prud'homme wrote:
> On Tuesday 31 December 2002 06:09 am, Dirk Mueller wrote:
> > > Shouldn't all that stuff be in the anonymous namespace instead?
> >
> > Nope. Those are still exported and the long symbol makes the symbol
> > lookup far worse.
>
> then what about unnamed namespace
>
> namespace {
> blah blah blah
> }
>
> behaves like static !
That's what I meant.
There's one difference to static though: while static has internal linkage,
namespace {} has external linkage. This is a problem as Dirk noted wrt
relocation time, OTOH the advantage is that such symbols can be used as
template arguments while static ones can't.
As this apparently wasn't a real problem in kdelibs by now, it's probably the
best thing to stick with static in the libs until the linker issues are
resolved, didn't think about those.
-Malte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021231/0fa740e9/attachment.sig>
More information about the kde-core-devel
mailing list