[libcxx-commits] [libcxx] 7ad0051 - [libc++][NFC] Mark LWG2731 as complete
Joe Loser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 26 10:46:39 PDT 2021
Author: Joe Loser
Date: 2021-10-26T13:46:00-04:00
New Revision: 7ad00511e4ab3190515501aa05e3e3b4a48a0c00
URL: https://github.com/llvm/llvm-project/commit/7ad00511e4ab3190515501aa05e3e3b4a48a0c00
DIFF: https://github.com/llvm/llvm-project/commit/7ad00511e4ab3190515501aa05e3e3b4a48a0c00.diff
LOG: [libc++][NFC] Mark LWG2731 as complete
Mark LWG2731 as complete. The type alias `mutex_type` is only provided if
`scoped_lock` is given one mutex type and it has been implemented that
way since the beginning of Clang 5 it seems. There already are tests for
verifying existence (and lack thereof) for `mutex_type` type alias
depending on the number of mutex types, so there is nothing to
do for this LWG issue.
Reviewed By: Quuxplusone, Mordante, #libc
Differential Revision: https://reviews.llvm.org/D112462
Added:
Modified:
libcxx/docs/Status/Cxx2bIssues.csv
libcxx/include/mutex
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/docs/Status/Cxx2bIssues.csv b/libcxx/docs/Status/Cxx2bIssues.csv
index 93ef7246eb520..9384357f86206 100644
--- a/libcxx/docs/Status/Cxx2bIssues.csv
+++ b/libcxx/docs/Status/Cxx2bIssues.csv
@@ -11,7 +11,7 @@
"`3447 <https://wg21.link/LWG3447>`__","Deduction guides for ``take_view`` and ``drop_view`` have
diff erent constraints","November 2020","|Complete|","14.0"
"`3450 <https://wg21.link/LWG3450>`__","The const overloads of ``take_while_view::begin/end`` are underconstrained","November 2020","","","|ranges|"
"`3464 <https://wg21.link/LWG3464>`__","``istream::gcount()`` can overflow","November 2020","",""
-"`2731 <https://wg21.link/LWG2731>`__","Existence of ``lock_guard<MutexTypes...>::mutex_type`` typedef unclear","November 2020","",""
+"`2731 <https://wg21.link/LWG2731>`__","Existence of ``lock_guard<MutexTypes...>::mutex_type`` typedef unclear","November 2020","|Complete|","5.0"
"`2743 <https://wg21.link/LWG2743>`__","P0083R3 ``node_handle`` private members missing ""exposition only"" comment","November 2020","",""
"`2820 <https://wg21.link/LWG2820>`__","Clarify ``<cstdint>`` macros","November 2020","",""
"`3120 <https://wg21.link/LWG3120>`__","Unclear behavior of ``monotonic_buffer_resource::release()``","November 2020","",""
diff --git a/libcxx/include/mutex b/libcxx/include/mutex
index eb8e54ad44214..ee1a62a1331d0 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -112,7 +112,7 @@ template <class... MutexTypes>
class scoped_lock // C++17
{
public:
- using mutex_type = Mutex; // If MutexTypes... consists of the single type Mutex
+ using mutex_type = Mutex; // Only if sizeof...(MutexTypes) == 1
explicit scoped_lock(MutexTypes&... m);
scoped_lock(adopt_lock_t, MutexTypes&... m);
diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp
index 7cec5dffd8205..8caa621aa417e 100644
--- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp
+++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp
@@ -11,11 +11,11 @@
// <mutex>
-// template <class Mutex...>
+// template <class... MutexTypes>
// class scoped_lock
// {
// public:
-// typedef Mutex mutex_type; // only if sizeof...(Mutex) == 1
+// typedef Mutex mutex_type; // Only if sizeof...(MutexTypes) == 1
// ...
// };
More information about the libcxx-commits
mailing list