540. shared_ptr<void>::operator*()

Section: 23.11.3.5 [util.smartptr.shared.obs], 99 [tr.util.smartptr.shared.obs] Status: CD1 Submitter: Martin Sebor Opened: 2005-10-15 Last modified: 2016-02-10

Priority: Not Prioritized

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

View all issues with CD1 status.

Discussion:

I'm trying to reconcile the note in tr.util.smartptr.shared.obs, p6 that talks about the operator*() member function of shared_ptr:

Notes: When T is void, attempting to instantiate this member function renders the program ill-formed. [Note: Instantiating shared_ptr<void> does not necessarily result in instantiating this member function. --end note]

with the requirement in temp.inst, p1:

The implicit instantiation of a class template specialization causes the implicit instantiation of the declarations, but not of the definitions...

I assume that what the note is really trying to say is that "instantiating shared_ptr<void> *must not* result in instantiating this member function." That is, that this function must not be declared a member of shared_ptr<void>. Is my interpretation correct?

Proposed resolution:

Change 2.2.3.5p6

-6- Notes: When T is void, attempting to instantiate this member function renders the program ill-formed. [Note: Instantiating shared_ptr<void> does not necessarily result in instantiating this member function. --end note] it is unspecified whether this member function is declared or not, and if so, what its return type is, except that the declaration (although not necessarily the definition) of the function shall be well-formed.