Title
shared_ptr<void>::operator*()
Status
cd1
Section
[util.smartptr.shared.obs][tr.util.smartptr.shared.obs]
Submitter
Martin Sebor

Created on 2005-10-15.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

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.

Date: 2005-10-15.00:00:00

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?

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3001
2005-10-15 00:00:00admincreate