[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists marked an inline comment as done. mclow.lists added a comment. Committed as revision 298681. https://reviews.llvm.org/D31163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. I'll send something to the reflectors about the explicit deduction guides over the weekend. https://reviews.llvm.org/D31163 ___ cfe-commit

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 8 inline comments as done. mclow.lists added inline comments. Comment at: include/mutex:176 +template unique_lock(unique_lock) +-> unique_lock; // C++17 mclow.lists wrote: > EricWF wrote: > > This should be guarded behind a feature test m

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 92896. mclow.lists added a comment. Removed the deduction guides. Guarded the tests for the deduction guides with #ifdefs. https://reviews.llvm.org/D31163 Files: include/__config include/__mutex_base include/mutex include/shared_mutex test/l

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-22 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/mutex:177 +template unique_lock(unique_lock) +-> unique_lock; // C++17 + mclow.lists wrote: > And what's with the 'M'? (here and below) No idea, but I would remove the explicit deduction guides from this patc

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-22 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/mutex:176 +template unique_lock(unique_lock) +-> unique_lock; // C++17 EricWF wrote: > This should be guarded behind a feature test macro. I would suggest adding > this to `__config`. > > ``` > #if !d

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-22 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. So Clang only very recently added support for deduction guides. We'll need to add `_LIBCPP_HAS_NO_DEDUCTION_GUIDES` and use it to guard the declarations and the tests. Also I think the explicit deduction guides are incorrect and unneeded. The deduction guides you declar

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. WG21 has decided that the ABI-breaking `lock_guard` proposal that we (@EricWF) implemented (and hid behind an ABI-break macro) is not the way to go. Instead, we're introducing a new class, `scoped_lock`, which is variadic, and leaving `lock_guard` as non-varia