home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!doc.ic.ac.uk!uknet!news.cs.bham.ac.uk!bham!bhamvx!mccauleyba
- From: mccauleyba@vax1.bham.ac.uk (Brian McCauley)
- Newsgroups: comp.lang.c++
- Subject: Copying array members
- Message-ID: <1992Nov6.190736.1@vax1.bham.ac.uk>
- Date: 6 Nov 92 19:07:36 GMT
- Sender: usenet@rs6000.bham.ac.uk (USENET News Service)
- Organization: University of Birmingham
- Lines: 36
-
- Perhaps I should RTM but I'm ARMless and cannot find the answer to the
- following in "The C++ Programming Language, 2nd Edition".
-
- struct A {
- int member;
- A();
- A(const A&);
- A& operator=(const A&);
- };
-
- struct B {
- A array_member[10];
- };
-
- Do the compiler generated B::B() B::B(const B&) and B::operator=(const B&)
- call their counterparts in A ten times?
-
- I could check this on my compiler but I want to know what the _standard_ says
- as this is just the sort of thing compilers often get wrong.
-
- Is it possible for the programmer to write a B::B(const B&) that calls
- A::A(const A&) ten times rather than calling A::A() ten times followed by
- A::operator=(const A&) ten times?
-
- This opens the whole issue of changing the standard so that one can initilise
- an array with another array and assign to array variables.
-
- If you with to reply WRT changing the standard, please do *not* do so here.
- Please reply to my posting in comp.std.c++ entitled "Array anachronisms".
- --
- \\ ( ) NO BULLSHIT! from BAM (Brian McCauley)
- . _\\__[oo ============
- .__/ \\ /\@
- . l___\\ E-mail: B.A.McCauley@bham.ac.uk
- # ll l\\
- ###LL LL\\
-