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

List:       kde-core-devel
Subject:    Re: about kde4's smart pointer
From:       Bart Coppens <kde () bartcoppens ! be>
Date:       2006-10-03 20:47:23
Message-ID: 200610032247.23911.kde () bartcoppens ! be
[Download RAW message or body]

On Tuesday 03 October 2006 22:14, Adriaan de Groot wrote:
> I'd like to focus on the explicitness of the constructor:
>
> 501697    hermier     inline explicit KSharedPtr( T* p )
>
> is that or is that not a good idea for this kind of shared pointer? I'd
> like comments from people who know something about the intended use of such
> pointers (the change has been in there for a long time though).
Well, from ksharedptr.h's apidox:
' * This struct emulates C++ pointers virtually perfectly.
 * So just use it like a simple C++ pointer.'
IMO using explicit here makes it not a 'virtually perfect' emulation of 
regular pointers. (And it may have been there a long time, but I only svn 
up'ed in kde4 today to look at forwardporting my Krita 1.6 stuff, which isn't 
made easier with this (on top of the other cosmetic changes).)

Bart Coppens
[prev in list] [next in list] [prev in thread] [next in thread] 

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