[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Pimpl copying
From: Lubos Lunak <l.lunak () suse ! cz>
Date: 2006-07-14 9:51:16
Message-ID: 200607141151.16587.l.lunak () suse ! cz
[Download RAW message or body]
On Friday 14 July 2006 11:47, Frans Englich wrote:
> On Friday 14 July 2006 09:28, Lubos Lunak wrote:
> > On Friday 14 July 2006 10:33, André Wöbbeking wrote:
> > > On Thursday 13 July 2006 23:05, Peter Kümmel wrote:
> > > > While debugging KTempDirTest on windows I've found that this patch
> > > >
> > > > Index: ktempdirtest.cpp
> > > > ===================================================================
> > > > --- ktempdirtest.cpp (revision 561767)
> > > > +++ ktempdirtest.cpp (working copy)
> > > > @@ -26,7 +26,7 @@
> > > >
> > > > void KTempDirTest::testBasic()
> > > > {
> > > > - KTempDir dir = KTempDir("test");
> > >
> > > normal ctor and then copy ctor
> >
> > No. It's just syntactic sugar functionally completely equivalent to the
> > case below with just normal ctor. If any compiler uses copy ctor here
> > it's broken.
>
> Is it /required/ to skip creating a temporary value, or /allowed/ to
> implement the optimization?
Ok, looks I was wrong, what I said is not true with classes
apparently. -fno-elide-constructors makes gcc use copy ctor as well, so the
code should be changed to avoid this.
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic