* include/std/future (future_error(error_code)): Construct base
class with error_code's message.
* src/c++11/future.cc (future_error::what()): Do not call c_str() on
temporary string.
From-SVN: r221236
+2015-03-06 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/future (future_error(error_code)): Construct base
+ class with error_code's message.
+ * src/c++11/future.cc (future_error::what()): Do not call c_str() on
+ temporary string.
+
2015-03-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/locale_conv.h (wstring_convert::_M_conv): Handle
public:
explicit future_error(error_code __ec)
- : logic_error("std::future_error"), _M_code(__ec)
+ : logic_error("std::future_error: " + __ec.message()), _M_code(__ec)
{ }
virtual ~future_error() noexcept;
future_error::~future_error() noexcept { }
const char*
- future_error::what() const noexcept { return _M_code.message().c_str(); }
+ future_error::what() const noexcept { return logic_error::what(); }
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
&& (ATOMIC_INT_LOCK_FREE > 1)