This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.

2887. Revert the changes from P0156R0: variadic lock_guard

Section: 33.6.5.2 [thread.lock.guard] Status: Resolved Submitter: Finland, Great Britain Opened: 2017-02-03 Last modified: 2017-04-22

Priority: Not Prioritized

View all other issues in [thread.lock.guard].

View all issues with Resolved status.

Discussion:

Addresses FI 8, GB 61

The class template lock_guard was made variadic. This is abi-breaking, and confusing because one-argument lock_guards have a typedef mutex_type but lock_guards with more than one argument don't. There's no need to try to shoehorn this functionality into one type.

Proposed change: Revert the changes to lock_guard, and introduce a new variadic class template vlock_guard that doesn't have the mutex_type typedef at all.

[2017-02-02, Marshall notes]

This was the subject of intense discussion in Issaquah, and a joint LEG/LEWG session agreed on this approach.

[2017-03-12, post-Kona]

Resolved by P0156R2.

Proposed resolution: