Implement Pp0156r2: 'Variadic Lock Guard, version 5' Reviewed as https://reviews.llvm.org/D31163.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298681 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2017-03-24 03:40:36 +00:00
parent 50e32f569c
commit 59bcc879ab
16 changed files with 201 additions and 155 deletions

View File

@@ -80,21 +80,9 @@ constexpr adopt_lock_t adopt_lock = adopt_lock_t();
#endif
// Forward declare lock_guard as a variadic template even in C++03 to keep
// the mangling consistent between dialects.
#if defined(_LIBCPP_ABI_VARIADIC_LOCK_GUARD)
template <class ..._Mutexes>
class _LIBCPP_TEMPLATE_VIS lock_guard;
#endif
template <class _Mutex>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable)
#if !defined(_LIBCPP_ABI_VARIADIC_LOCK_GUARD)
lock_guard
#else
lock_guard<_Mutex>
#endif
{
public:
typedef _Mutex mutex_type;