I don't have an answer just 2 observations: 1. VC 2005 (8.0) handles this a little better i.e. it can compile but fails at link time:
internal.obj : error LNK2019: unresolved external symbol "void * __cdecl KXMLCore::extractFirst<struct std::pair<void *,void *> >(struct std ::pair<void *,void *> const &)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@@KXMLCore@@[EMAIL PROTECTED]@std@@@Z) referenced in function "priva te: static void * __cdecl KXMLCore::HashTable<void *,struct std::pair<void *,void *>,&void * __cdecl KXMLCore::extractFirst<struct std::pair <void *,void *> >(struct std::pair<void *,void *> const &),struct KXMLCore::DefaultHash<void *>,struct KXMLCore::PairHashTraits<struct KXMLC ore::HashTraits<void *>,struct KXMLCore::HashTraits<void *> > >::extractKey(struct std::pair<void *,void *> const &)" ([EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@KXMLCore@@YAPAXABU12@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@U?$HashTraits @[EMAIL PROTECTED]@@U12@@3@@KXMLCore@@[EMAIL PROTECTED]@std@@@Z) bin\testkjs.exe : fatal error LNK1120: 1 unresolved externals 2. #include <bits/cpp_type_traits.h> in kxmlcore\HashTraits.h is questionable. According to the source (http://www-evasion.imag.fr/Membres/Frank.Perbet/extdox/stl/html/cpp__type__traits_8h-source.html) it's a private header for libstdc++ and should not be directly included by applications. -- kjk On 9/29/05, Justin Haygood <[EMAIL PROTECTED]> wrote: > Apparently, Microsoft Visual C++ 7.1 doesn't like HashMap: > > {snip}\JavaScriptCore\kxmlcore\HashMap.h(46) : error C2440: 'specialization' : > cannot convert from 'T1::first_type (__cdecl *)(const T1 &)' to > 'KXMLCore::HashMap<Key,Mapped,HashFunctions,KeyTraits,MappedTraits>::KeyType > (__cdecl *)(const > KXMLCore::HashMap<Key,Mapped,HashFunctions,KeyTraits,MappedTraits>::ValueType > &)' > None of the functions with this name in scope match the target type > > This error is fired in 2 cases: different calling conventions (not the case > here, > both using cdecl) or something I don't particularly understand (something > along > the lines like casting from a TemplateType<Bla> to a TemplateType). > > Any clues as to what its not liking? > > Relevant code: > > private: > typedef HashTable<KeyType, ValueType, extractFirst<ValueType>, > HashFunctions, > ValueTraits> ImplType; > > I highly believe its the extractFirst<ValueType> that's causing the failure, > which is defined as: > > template<typename PairType> > inline typename PairType::first_type extractFirst(const PairType& value) > { > return value.first; > } > > Thanks, > Justin Haygood > _______________________________________________ > webkit-dev mailing list > [email protected] > http://www.opendarwin.org/mailman/listinfo/webkit-dev > _______________________________________________ webkit-dev mailing list [email protected] http://www.opendarwin.org/mailman/listinfo/webkit-dev
