This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [Q] Problem with derived from streambuf class


Hi,

zaufi@sendmail.ru wrote:

3) ostream::put() calls NON VIRTUAL function base_streambuf::sputc() !! -- so there is no way to redefine it in derived classes... :(((


Maybe I'm missing some details (I will read again your message
later), but, if this is your main point, there is little doubt
that, according to the ISO standard that we are implementing,
this is right behavior. See 27.6.2.1/2, in particular:

"... Both groups of output functions generate (or _insert_)
output characters by actions equivalent to calling
rdbuf->sputc(int_type). They may use other public members of
basic_ostream except that they do not invoke any virtual
members of rdbuf() except overflow()."

Paolo.


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