mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-10 01:54:35 +08:00
future (future_error(error_code)): Construct base class with error_code's message.
* 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
This commit is contained in:
parent
7bfa4bc51e
commit
664e99eac4
@ -1,3 +1,10 @@
|
||||
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
|
||||
|
@ -98,7 +98,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
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;
|
||||
|
@ -75,7 +75,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user