kdbgstream::operator<<({,u}char)

Stephan Kulow coolo at kde.org
Tue Nov 12 12:29:35 GMT 2002


Am Tuesday 12 November 2002 13:06 schrieb Bo Thorsen:
> On Tuesday 12 November 2002 11:46, Stephan Kulow wrote:
> > Am Monday 11 November 2002 12:30 schrieb Marc Mutz:
> > > Hi!
> > >
> > > Shouldn't those output the char as character instead of number? If
> > > you want the value, you could then just write
> > >
> > > kdDebug() << int(mychar) << endl;
> > >
> > > while now you need to write ugly stuff like
> > >
> > > kdDebug() << QString( QChar( myChar ) ) << endl;
> > >
> > > to get the char output as character.
> > >
> > > (this is not a patch, just some hand-edited cut'n'paste)
> >
> > if you add a check for 0 and '\n' (to flush) I agree and would suggest
> > you commit it
>
> I can understand the check for 0, but I disagree about the '\n'. A flush
> happens upon endl, not on '\n'.
>
> std::cerr << "Something\n";
> std::cerr << "Something" << std::endl;
>
> The C++ standard says that the second flushes the stream, the first
> doesn't. Does the kdDebug stream not follow this?

Why should the kdDebug stream follow the standard for std::cerr?

Greetings, Stephan





More information about the kde-core-devel mailing list