[webkit-dev] Problems specializing DefaultHash
Mike Emmel
mike.emmel at gmail.com
Wed Feb 22 07:00:34 PST 2006
First here is my gcc version
gcc --version
gcc (GCC) 4.0.3 20060115 (prerelease) (Debian 4.0.2-7)
Copyright (C) 2005 Free Software Foundation, Inc.
Next the following code in won't specialize for me
JavaScriptCore/kxmlcore/HashMap.h
template<typename Key, typename Mapped, typename HashFunctions =
typename DefaultHash<Key>::Hash, typename KeyTraits = HashTraits<Key>,
typename MappedTraits = HashTraits<Mapped> >
class HashMap
The error is
WebCore/dom/xml_tokenizer.h:75: error: invalid use of undefined type
'struct KXMLCore::DefaultHash<WebCore::DOMString>'
JavaScriptCore/kxmlcore/HashFunctions.h:32: error: declaration of
'struct KXMLCore::DefaultHash<WebCore::DOMString>'
WebCore/dom/xml_tokenizer.h:75: error: template argument 3 is invalid
WebCore/dom/xml_tokenizer.h:75: error: invalid type in declaration
before ';' token
And the offending line is
HashMap<DOMString, DOMString> parseAttributes(const DOMString&, bool& attrsOK);
This is way beyond my limited knowledge of templates my guess is that
at this point
DOMString has not been defined completely ? So you can't create a
template of a predeclared type ?
Mike
More information about the webkit-dev
mailing list