[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] add dummy operator== and dummy qHash for win32 target
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2005-11-06 10:06:33
Message-ID: 436DD5A9.9030903 () gmx ! de
[Download RAW message or body]


Stephan Kulow schrieb:
> On Sunday 06 November 2005 10:33, Christian Ehrlicher wrote:
> 
>>Hi,
>>
>>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:
http://lists.kde.org/?l=kde-core-devel&m=113061009510075&w=2
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>.

Christian

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic