This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: operator=() issue
- From: Ian Lance Taylor <iant at google dot com>
- To: Arthur Schwarz <aschwarz1309 at verizon dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 10 Apr 2009 16:48:15 -0700
- Subject: Re: operator=() issue
- References: <844845.95204.qm@web84005.mail.mud.yahoo.com>
Arthur Schwarz <aschwarz1309@verizon.net> 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 private inheritance does not
grant access to private methods in the parent class. It merely
prohibits access to the parent class by users of the class.
Ian