To all, I stand abashed - don't try this without a trained instructor. I
misread the Schildt quote and (I think) wasted your time(s).
Thank you
art
--- On Fri, 4/10/09, David Fang wrote:
> From: David Fang
> Subject: Re: operator=() issue
> To: "Arthur Schwarz"
One more thing to add ...
Program 1 fails
# include
using namespace std;
class thing : private ios_base {
ostream& xo;
public:
thing(ostream& y) : xo(y) { xo = y; }
};
gcc.3.4.4 messaging
x.cpp: In member function `std::basic_ios >&
std::basic_ios >::operator=(const
std::basic_ios >&
On Fri, Apr 10, 2009 at 05:28:50PM -0700, Arthur Schwarz wrote:
>
> You understood me correctly. My (mis?)understanding comes from:
>
> The Complete Reference,Fourth Edition
> Herbert Schildt
> Copyright 2003
> ISBN 0-07-222680-3
gcc doesn't implement Schildt's book, it aims to implement
Arthur Schwarz writes:
> "Remember: When a base class' access specifier is private, public and
> protected members of the base become private members of the derived
> class. This means that they are still accessible by members of the
> derived class but cannot be accessed by parts of your program
avior seen by gcc is unexpected. Given your statement it appears that an
access specifier of 'private' has no effect.
art
--- On Fri, 4/10/09, Ian Lance Taylor wrote:
> From: Ian Lance Taylor
> Subject: Re: operator=() issue
> To: "Arthur Schwarz"
> Cc: gcc@gcc.gnu.
operator=() is private in ios_base. Using private inheritance of
ios_base the program below fails in the constructor when '=' is used
(but not during memory initialization). I don't understand why
assignment is prohibited.
art
Program 1 fails
# include
using namespace std;
class thing : pr
Arthur Schwarz writes:
> operator=() is private in ios_base. Using private inheritance of
> ios_base the program below fails in the constructor when '=' is used
> (but not during memory initialization). I don't understand why
> assignment is prohibited.
Perhaps I misunderstand your question, but
operator=() is private in ios_base. Using private inheritance of ios_base the
program below fails in the constructor when '=' is used (but not during memory
initialization). I don't understand why assignment is prohibited.
art
Program 1 fails
# include
using namespace std;
class thing : pri