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

2981. Remove redundant deduction guides from standard library

Section: 22.10.6 [refwrap], 32.6.5.2 [thread.lock.guard], 32.6.5.3 [thread.lock.scoped], 32.6.5.4 [thread.lock.unique], 32.6.5.5 [thread.lock.shared] Status: C++20 Submitter: Mike Spertus Opened: 2017-06-15 Last modified: 2021-02-25

Priority: 0

View all other issues in [refwrap].

View all issues with C++20 status.

Discussion:

There are several deduction guides added to the standard library by P0433R2 that have no effect probably because LWG had not considered late changes to core wording that automatically adds a "copy deduction candidate" (12.2.2.9 [over.match.class.deduct]) that renders these explicit guides moot.

[2017-07 Toronto Monday issue prioritization]

Priority 0; move to Ready

Proposed resolution:

This wording is relative to N4659.

  1. Edit 22.10.6 [refwrap], end of class template reference_wrapper synopsis, as indicated:

    template<class T>
      reference_wrapper(reference_wrapper<T>) -> reference_wrapper<T>;
    
  2. Edit 32.6.5.2 [thread.lock.guard], end of class template lock_guard synopsis, as indicated:

    template<class Mutex> lock_guard(lock_guard<Mutex>) -> lock_guard<Mutex>;
    
  3. Edit 32.6.5.3 [thread.lock.scoped], end of class template scoped_lock synopsis, as indicated:

    template<class... MutexTypes>
      scoped_lock(scoped_lock<MutexTypes...>) -> scoped_lock<MutexTypes...>;
    
  4. Edit 32.6.5.4 [thread.lock.unique], end of class template unique_lock synopsis, as indicated:

    template<class Mutex> unique_lock(unique_lock<Mutex>) -> unique_lock<Mutex>;
    
  5. Edit 32.6.5.5 [thread.lock.shared], end of class template shared_lock synopsis, as indicated:

    template<class Mutex> shared_lock(shared_lock<Mutex>) -> shared_lock<Mutex>;