This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Add std::future_error constructor from future_errc
On 12/11/16 02:34 -0500, Tim Song wrote:
On Fri, Nov 11, 2016 at 10:39 PM, Jonathan Wakely <jwakely@redhat.com> wrote:
making the existing not-required-by-the-standard constructor private.
+ public:
+ explicit
+ future_error(error_code __ec)
+ : logic_error("std::future_error: " + __ec.message()), _M_code(__ec)+ { }
That doesn't look private to me...
Whoops, fixed by this patch.
Tested powerpc64le-linux, committed to trunk.
commit 889e7308ad2c7072326698cc76b902d0cb189b6a
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Sat Nov 12 18:08:06 2016 +0000
* include/std/future (future_error): Fix public typo to private.
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 4d125e8..cb42830 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -109,7 +109,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const error_code&
code() const noexcept { return _M_code; }
- public:
+ private:
explicit
future_error(error_code __ec)
: logic_error("std::future_error: " + __ec.message()), _M_code(__ec)