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

### 2572. The remarks for `shared_ptr::operator*` should apply to cv-qualified `void` as well

Section: 20.3.2.2.6 [util.smartptr.shared.obs] Status: C++17 Submitter: Tim Song Opened: 2015-12-13 Last modified: 2017-07-30

Priority: 0

View all other issues in [util.smartptr.shared.obs].

View all issues with C++17 status.

Discussion:

20.3.2.2.6 [util.smartptr.shared.obs]/4 says for `shared_ptr::operator*`

> Remarks: When `T` is `void`, it is unspecified whether this member function is declared. If it is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the definition) of the function shall be well formed.

This remark should also apply when `T` is cv-qualified `void` (compare LWG 2500).

[2016-02, Issues Telecon]

P0; move to Tentatively Ready.

Proposed resolution:

This wording is relative to N4567.

1. Edit 20.3.2.2.6 [util.smartptr.shared.obs]/4 as indicated:

   >     T& operator*() const noexcept;

   > > […]

   > > -4- Remarks: When `T` is (possibly cv-qualified) `void`, it is unspecified whether this member function is declared. If it is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the definition) of the function shall be well formed.