[Bug libstdc++/14493] std::bad_alloc::what() does not explain what happened

pcarlini at suse dot de gcc-bugzilla@gcc.gnu.org
Tue Jan 30 00:58:00 GMT 2007



------- Comment #20 from pcarlini at suse dot de  2007-01-30 00:58 -------
(In reply to comment #19)
> I don't think that is the correct solution as if you subclass these functions,
> you get the incorrect result.

What do you mean by "incorrect"?!? If you subclass, either you provide your own
what(), or you get the what() provided by the base class, which is
implementation defined and, very reasonably, "std::bad_cast" for class
bad_cast, and so on... 


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gdr at integrable-solutions
                   |                            |dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14493



More information about the Gcc-bugs mailing list