Article View: comp.std.c++
Article #2310Re: Q: is A a = 100; equivalent to A a (100); ?
From: Fergus Henderson
Date: Thu, 26 Oct 1995 11:21
Date: Thu, 26 Oct 1995 11:21
22 lines
1662 bytes
1662 bytes
Michael Cook <mcook@cognex.com> writes: >>>>>> "SC" == Steve Clamage <clamage@Eng.sun.com> writes: > > SC> Silly example: Write a message to the terminal from the copy > SC> constructor. If the copy is optimized away, you won't see the message. > >If the constructor writes a message to the terminal, then the contructor has >side effects. Such a constructor could not be optimized away and still >conform to the (drafts) standard, right? No, that's not right. The draft standard explicitly gives implementations permission to optimize away copy constructors in this situation *even if they have side effects*. -- Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3 --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<9529918.27354@mulga.cs.mu.OZ.AU>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backReferences:
<JLM.95Oct12202250@ludo.two-oo-one.fr> <u9burle2pv.fsf@yorick.cygnus.com> <45skdo$cm4@engnews2.Eng.Sun.COM> <45sl3a$coc@engnews2.Eng.Sun.COM> <r4pwftlaok.fsf@erawan.cognex.com>Show Full Headers
Complete Article Headers
Approved: fjh@cs.mu.oz.au Date: 26 Oct 95 11:21:48 GMT From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson) Message-ID: <9529918.27354@mulga.cs.mu.OZ.AU> Newsgroups: comp.std.c++ Organization: Computer Science, University of Melbourne, Australia Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back References: <JLM.95Oct12202250@ludo.two-oo-one.fr> <u9burle2pv.fsf@yorick.cygnus.com> <45skdo$cm4@engnews2.Eng.Sun.COM> <45sl3a$coc@engnews2.Eng.Sun.COM> <r4pwftlaok.fsf@erawan.cognex.com> Subject: Re: Q: is A a = 100; equivalent to A a (100); ? X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMI9vfeEDnX0m9pzZAQEaqQF/XXDezzLqwqHYrzCgmIqsus2zcpnylybO MjB/czO/KmnNBbnAuVkBuM4KO2ixAvAd =ob24