diff mbox

N3659: add C++14's <shared_mutex>

Message ID CAH6eHdT2eYgOuKqszZknEg-JDBVOhF28zzgMaLPLbPBqXRO=Mg@mail.gmail.com
State New
Headers show

Commit Message

Jonathan Wakely June 16, 2013, 9:58 p.m. UTC
Fix a stupid bug in shared_lock.

Tested x86_64-linux, committed to trunk.

        * include/std/shared_mutex (shared_lock::operator=): Add missing
        return statement.
commit b177aa326855e5e27ab53427d5a02012ffb944a4
Author: Jonathan Wakely <jwakely.gcc@gmail.com>
Date:   Sun Jun 16 21:27:55 2013 +0100

    	* include/std/shared_mutex (shared_lock::operator=): Add missing
    	return statement.
diff mbox

Patch

diff --git a/libstdc++-v3/include/std/shared_mutex b/libstdc++-v3/include/std/shared_mutex
index f606282..39ab83a 100644
--- a/libstdc++-v3/include/std/shared_mutex
+++ b/libstdc++-v3/include/std/shared_mutex
@@ -339,7 +339,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       shared_lock&
       operator=(shared_lock&& __sl) noexcept
-      { shared_lock(std::move(__sl)).swap(*this); }
+      {
+	shared_lock(std::move(__sl)).swap(*this);
+	return *this;
+      }
 
       void
       lock()