KDE/kdelibs/kjs
Peter Kümmel
syntheticpp at gmx.net
Thu Feb 16 21:20:46 CET 2006
Darin Adler wrote:
> On Feb 15, 2006, at 2:02 PM, Peter Kümmel wrote:
>
>> You mean, compiling
>> ::cacheGlobalObject<ClassProto>(exec, *name());
>> but not
>> cacheGlobalObject<ClassProto>(exec, *name());
>> is standard conform?
>
> Yes.
>
>> What's the reason for this?
>
> Hard to say in just a few words, but basically the latter syntax
> means that this class template has a template function inside the KJS
> namespace as a friend, and the former means that it has a template
> function in the global namespace as a friend. The actual function
> template for cacheGlobalObject is in the global namespace, not the
> KJS namespace.
>
Ah, the macros are used inside the KJS namespace, that makes more sense.
> These rules have changed over time as the C++ language got
> standardized and they worked out the kinks in template syntax. After
> our research I'm pretty sure that GCC does not match the standard in
> this respect, and MSVC does. But of course we could be wrong.
Then I'll stop blaming ms in the mentioned comment.
Thanks again,
Peter
More information about the Khtml-devel
mailing list