3 Aug 2010 12:46
system_error::what
Rodrigo Rivas <rodrigorivascosta <at> gmail.com>
2010-08-03 10:46:23 GMT
2010-08-03 10:46:23 GMT
Hi all. The std::system_error from C++0x is lacking the "what()" function. The attached patch adds it. Also, it looks like the testsuite works fine with it. What do you think? Regards -- Rodrigo.
Index: libstdc++-v3/src/system_error.cc
===================================================================
--- libstdc++-v3/src/system_error.cc (revision 162786)
+++ libstdc++-v3/src/system_error.cc (working copy)
<at> <at> -80,6 +80,23 <at> <at>
system_error::~system_error() throw() { }
+ const char *
+ system_error::what() const throw()
+ {
+ if (_M_string.empty()) {
+ try {
+ _M_string = runtime_error::what();
+ if (!_M_string.empty())
+ _M_string += ": ";
+ _M_string += _M_code.message();
(Continue reading)
RSS Feed