KDE/kdelibs/kjs
Darin Adler
darin at apple.com
Thu Feb 16 18:43:41 CET 2006
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.
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.
-- Darin
More information about the Khtml-devel
mailing list