From -8159658332416441938 X-Google-Thread: f78e5,51456c3eb8f9490e X-Google-Attributes: gidf78e5,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!cox.net!news-xfer.cox.net!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull From: fgothamNO@SPAM.com (Frederick Gotham) Newsgroups: comp.std.c++ Subject: Re: Copy Constructor Confusion! Date: Fri, 25 Aug 2006 16:01:55 GMT Organization: Eircom.Net http://www.eircom.net Lines: 42 Sender: mail2news@demon.net Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++) Message-ID: References: <1155645873.296811.3890@74g2000cwt.googlegroups.com> <4kebv5Fbjid9U3@individual.net> <1155833275.678725.297060@h48g2000cwc.googlegroups.com> <44e73f70$0$10146$9b4e6d93@newsspool2.arcor-online.net> <1156162332.681008.153540@m73g2000cwd.googlegroups.com> <4l60udFecegU1@individual.net> <1156512377.765813.77030@b28g2000cwb.googlegroups.com> NNTP-Posting-Host: news.news.demon.net Mime-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Transfer-Encoding: quoted-printable X-Trace: news.demon.co.uk 1156521720 10995 158.152.254.254 (25 Aug 2006 16:02:00 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Fri, 25 Aug 2006 16:02:00 +0000 (UTC) X-Original-To: std-c++@mailman.ucar.edu X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-User-Agent: Xnews/5.04.25 X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.csse.unimelb.edu.au id k7PG1vtm022254 X-Virus-Scanned: amavisd-new at csse.unimelb.edu.au X-Path: comp-std-cpp-robomod!not-for-mail X-Received: (from fjh@localhost) by mulga.csse.unimelb.edu.au (8.13.6+Sun/8.13.6/Submit) id k7PG1tHt022222; Sat, 26 Aug 2006 02:01:55 +1000 (EST) X-NNTP-Posting-Date: Fri, 25 Aug 2006 16:56:24 BST X-Delivered-To: std-c++@mailman.ucar.edu X-Authentication-Warning: mulga.csse.unimelb.edu.au: fjh set sender to devnull@stump.algebra.com using -f X-Newsgroups: comp.std.c++ Xref: g2news2.google.com comp.std.c++:3519 kanze posted: > According to =A78.5.1/7: "If there are fewer initializers in the > list than there are members in the aggregate, then each member > not explicitly initialized shall be default-initialized." So > T arr[1] =3D {} ; > is the equivalent of: > T arr[1] =3D { T() } ; > which is the equivalent of: > T arr =3D T() ; I don't think you're corrected there. Just because something is default- initialised, doesn't mean there's a copy-construction involved. For=20 instance: struct MyClass { ostringstream obj; MyClass() : obj() {} }; The following should compile just fine on every implementation: #include using std::ostringstream; int main() { ostringstream arr[1] =3D {}; } --=20 Frederick Gotham --- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]