From 664e99eac4333f9978959e9d8636b8e0d36527d5 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 6 Mar 2015 12:31:43 +0000 Subject: 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 --- libstdc++-v3/src/c++11/future.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libstdc++-v3/src') diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc index c711a5f..3cf503b 100644 --- a/libstdc++-v3/src/c++11/future.cc +++ b/libstdc++-v3/src/c++11/future.cc @@ -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) -- cgit v1.1