[PATCH] KSharedPtr operator== problem

Alex Merry kde at randomguy3.me.uk
Fri Oct 3 23:27:09 BST 2008

On Thursday 02 October 2008 07:27:25 Thiago Macieira wrote:
> Alex Merry wrote:
> >KSharedPtr's two non-member operators (operator==(T*, const
> > KSharedPtr<T>&) and the equivalent operator!=) are not friends of the
> > class, so these comparisons fail to compile.

> Template friends are not supported in any compiler but gcc. You'll have to
> expose the privates as public for all other compilers.

Good job I checked, then.

How does the attached look?  I'm assuming that no-one would try compiling one 
part of KDE under gcc and another under a different compiler (since I would 
guess that way lies madness).


Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksharedptr.diff
Type: text/x-patch
Size: 999 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081003/d9678e08/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081003/d9678e08/attachment.sig>

More information about the kde-core-devel mailing list