This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: operator=() issue


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]