diff mbox

fix libstdc++/55861

Message ID CAH6eHdTmBdK1uLSn0F97D_ZKTwKfpKi4jDrmWhgF8OgZhQ12QA@mail.gmail.com
State New
Headers show

Commit Message

Jonathan Wakely Sept. 26, 2013, 7:04 p.m. UTC
On 19 January 2013 23:43, Jonathan Wakely wrote:
>         PR libstdc++/55861
>         * include/std/future (_State_base::_S_check(const shared_ptr<T>&)):
>         Fix return type.
>         (__basic_future::_M_get_result()): Const qualify.
>         (shared_future::get()): Likewise.
>         * testsuite/30_threads/shared_future/members/get.cc: Use const
>         objects.
>
> Tested x86_64-linux, committed to trunk.

I've backported the first part of this, fixing the return type, to the
4.7 branch.

Unfortunately it makes std::future unusable with clang, see
http://llvm.org/bugs/show_bug.cgi?id=17375

Tested x86_64-linux, committed to the 4.7 branch.
commit e2829e7c39c153cfc0d09cd8a8be14c5467c7730
Author: Jonathan Wakely <jwakely.gcc@gmail.com>
Date:   Thu Sep 26 10:11:29 2013 +0100

    	Backport from mainline
    
    	2013-01-19  Jonathan Wakely  <jwakely.gcc@gmail.com>
    
    	PR libstdc++/55861
    	* include/std/future (_State_base::_S_check(const shared_ptr<T>&)):
    	Fix return type.
diff mbox

Patch

diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 98c7b84..150c1af 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -1,6 +1,6 @@ 
 // <future> -*- C++ -*-
 
-// Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -456,7 +456,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       __setter(promise<void>* __prom);
 
       template<typename _Tp>
-        static bool
+        static void
         _S_check(const shared_ptr<_Tp>& __p)
         {
           if (!static_cast<bool>(__p))