diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-01-12 22:56:59 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-01-12 22:56:59 +0000 |
commit | 59a7dc95deef20ca25282e85f367214f7f733220 (patch) | |
tree | 26061c2e9f75b07b66fcbe06dca0d86dedc0c08d /libcxx/include/mutex | |
parent | 4478f858b5fd086e6f1d4ab9f5990d99efdee94e (diff) | |
download | bcm5719-llvm-59a7dc95deef20ca25282e85f367214f7f733220.tar.gz bcm5719-llvm-59a7dc95deef20ca25282e85f367214f7f733220.zip |
Fixing an ambiguity in variadics found by clang.
llvm-svn: 123337
Diffstat (limited to 'libcxx/include/mutex')
-rw-r--r-- | libcxx/include/mutex | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libcxx/include/mutex b/libcxx/include/mutex index c87d0fdaecb..21d38342dd1 100644 --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -364,9 +364,9 @@ lock(_L0& __l0, _L1& __l1) #ifndef _LIBCPP_HAS_NO_VARIADICS -template <class _L0, class _L1, class ..._L2> +template <class _L0, class _L1, class _L2, class ..._L3> void -__lock_first(int __i, _L0& __l0, _L1& __l1, _L2& ...__l2) +__lock_first(int __i, _L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3) { while (true) { @@ -375,7 +375,7 @@ __lock_first(int __i, _L0& __l0, _L1& __l1, _L2& ...__l2) case 0: { unique_lock<_L0> __u0(__l0); - __i = try_lock(__l1, __l2...); + __i = try_lock(__l1, __l2, __l3...); if (__i == -1) { __u0.release(); @@ -388,32 +388,32 @@ __lock_first(int __i, _L0& __l0, _L1& __l1, _L2& ...__l2) case 1: { unique_lock<_L1> __u1(__l1); - __i = try_lock(__l2..., __l0); + __i = try_lock(__l2, __l3..., __l0); if (__i == -1) { __u1.release(); return; } } - if (__i == sizeof...(_L2)) + if (__i == sizeof...(_L3) + 1) __i = 0; else __i += 2; sched_yield(); break; default: - __lock_first(__i - 2, __l2..., __l0, __l1); + __lock_first(__i - 2, __l2, __l3..., __l0, __l1); return; } } } -template <class _L0, class _L1, class ..._L2> +template <class _L0, class _L1, class _L2, class ..._L3> inline _LIBCPP_INLINE_VISIBILITY void -lock(_L0& __l0, _L1& __l1, _L2& ...__l2) +lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3) { - __lock_first(0, __l0, __l1, __l2...); + __lock_first(0, __l0, __l1, __l2, __l3...); } #endif // _LIBCPP_HAS_NO_VARIADICS |