libstdc++/17: cout is not a real ostream; dynamic_cast SEGV's as a result

Benjamin Kosnik bkoz@cygnus.com
Fri Dec 3 20:07:00 GMT 1999


The following reply was made to PR libstdc++/17; it has been noted by GNATS.

From: Benjamin Kosnik <bkoz@cygnus.com>
To: pbd@op.net
Cc: libstdc++-gnats@sourceware.cygnus.com
Subject: Re: libstdc++/17: cout is not a real ostream; dynamic_cast SEGV's as a result
Date: Fri, 3 Dec 1999 20:01:52 -0800 (PST)

 > because cout is not a real ostream, but a _fake_ostream,
 > dynamic_cast<ClassDerivedFromOstream *> will fail
 > when applied to a pointer or reference to cout.
 
 see http://sourceware.cygnus.com/libstdc++
 
 that's what this database is for. . . . if you checkout the CVS sources, 
 you'll see that cout is indeed a "real" ostream
 
 
 -benjamin
 


More information about the Libstdc++-prs mailing list