[PATCH] D41498: [libcxx] Add clang negative thread safety assertions to std::mutex
Luis Héctor Chávez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 21 14:15:42 PST 2017
lhchavez added inline comments.
================
Comment at: include/__mutex_base:65
void unlock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
+#ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
+ const mutex& operator!() const { return *this; }
----------------
mclow.lists wrote:
> We don't get to add public member functions to classes defined in the standard - at least not ones with pronounceable names.
>
So there's no way to support negative assertions as stated in the docs? That's unfortunate :(
Repository:
rCXX libc++
https://reviews.llvm.org/D41498
More information about the cfe-commits
mailing list