[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Bug libstdc++/14493] No std::bad_alloc::what() const



close 236912
thanks

This bug report reinforces my opinion that bug reports consisting of
claims of nonconformance, but not accompanied by a testcase, should be
immediately closed.


On Mon, Mar 08, 2004 at 11:15:05PM -0000, bangerth at dealii dot org wrote:
> For Andrew: the code takes the respective method of the base 
> class. 

More to the point, it doesn't matter how it's implemented, and the user
should not care.  It only matters that

    std::bad_alloc foo;
    std::cerr << foo.what() << std::endl;

works, which the submitter didn't apparently try.  Looking at the original
Debian bug report, there are no compiler error messages, just a "my code
doesn't do what I want it to do, so it must be your fault"-style complaint.


> I believe that libstdc++ is actually conforming, since the method exists 
> (even if in the base class)

Correct.  There is no requirement on implementation, only behavior.

> and it returns an implementation defined 
> string (as required by the standard).

Correct.  As described in the documentation.



Reply to: