[PATCH] KSharedPtr operator== problem

Thiago Macieira thiago at kde.org
Thu Oct 2 07:27:25 BST 2008


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.
>
>Since some forward-declarations and friending of template functions is
>involved, I wanted to make sure
>  (a) I didn't do anything stupid and
>  (b) no-one knows of any problems with old gcc versions or other
> platforms before I commit, especially as it's a candidate for 4.1.3.
>
>Anyone see any issues?

Yes.

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

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081002/85bb0f40/attachment.sig>


More information about the kde-core-devel mailing list