[PATCH] add dummy operator== and dummy qHash for win32 target
Ch.Ehrlicher at gmx.de
Sun Nov 6 10:06:33 GMT 2005
Stephan Kulow schrieb:
> On Sunday 06 November 2005 10:33, Christian Ehrlicher wrote:
>>Here is an idea how to work around the problem that msvc needs a full
>>instatiated template when exporting a class. It adds an dummy operator==
>>(K_DUMMY_COMPARISON_OPERATOR) and a dummy qHash function
>>(K_DUMMY_QHASH_OPERATOR). I've masked it with
>>K_FULL_TEMPLATE_EXPORT_INSTANTIATION so gcc will not create any code for
>>the dummy functions.
> Hmm, can you describe the problem a bit more in detail. It sounds to me as if
> the compiler sees the symbol, it might indeed be called, no? BTW: you should
> make the operator private if it's not supposed to be called. And don't name
> macros K_ - those that are already there are often enough. Typing 2 chars more
> to get KDE_ will be ok.
The problem here is based on this discussion:
I can make them private or mask them with an '#if MAKE_KDEUI_LIB' to
avoid caling them from outside the lib. But with gcc you can call them
too (and you'll get a linker error that gcc can't auto-create the
operator) because the operator comes from QList<T>.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 250 bytes
Desc: OpenPGP digital signature
More information about the kde-core-devel