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

List:       kde-devel
Subject:    Re: strings and QStrings
From:       Christopher Willmot <chris () willmot ! org ! uk>
Date:       2000-12-10 10:26:23
[Download RAW message or body]

On Sun, Dec 10, 2000 at 09:29:55AM +0100, Bo Thorsen wrote:
> Date: Sun, 10 Dec 2000 09:29:55 +0100 (MET)
> From: Bo Thorsen <bo@sonofthor.dk>
> To: kde-devel@master.kde.org
> Subject: Re: strings and QStrings
> 
> On Sun, 10 Dec 2000, David van Hoose wrote:
> See this code: ...

Ah, I thought constructors and assignment operators were semantically
different.  If that's the case it would surely be wrong for the compiler
to substitute one for the other.  Scott Meyers, in his (now rather old?)
book "Effective C++" claims that the compiler has to create a temporary
object which is then passed to the assignment operator.  That would
account for there being two contructor calls.

But aren't QStrings shared?  So either way is should be just a matter of
increasing a count in the shared object.


-- 
Chris Willmot
County DURHAM, England.

Linux:   chris@willmot.org.uk
Artwork: chris.willmot@valleyview.co.uk
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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