Title
Deduction failure matching placement new
Status
c++11
Section
13.10.3.7 [temp.deduct.decl]
Submitter
Mike Miller

Created on 2010-08-19.00:00:00 last changed 131 months ago

Messages

Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

Date: 2010-11-15.00:00:00

Proposed resolution (November, 2010) [SUPERSEDED]:

Change 13.10.3.7 [temp.deduct.decl] paragraphs 1-2 as follows:

In a declaration whose declarator-id refers to a specialization of a function template, template argument deduction is performed to identify the specialization to which the declaration refers. Specifically, this is done for explicit instantiations (13.9.3 [temp.explicit]), explicit specializations (13.9.4 [temp.expl.spec]), and certain friend declarations (13.7.5 [temp.friend]). This is also done to determine whether a deallocation function template specialization matches a placement operator new (6.7.6.5.3 [basic.stc.dynamic.deallocation], 7.6.2.8 [expr.new]). In all these cases, P is the type of the function template being considered as a potential match and A is either the function type from the declaration or the type of the deallocation function that would match the placement operator new as described in 7.6.2.8 [expr.new]. The deduction is done as described in 13.10.3.6 [temp.deduct.type].

If, for the set of function templates so considered, there is either no match or more than one match after partial ordering has been considered (13.7.7.3 [temp.func.order]), deduction fails and, in the declaration cases, the declaration program is ill-formed.

Date: 2010-11-29.00:00:00

The new wording added by issue 873 says,

...This is also done to determine whether a function template specialization matches a placement operator new (6.7.6.5.3 [basic.stc.dynamic.deallocation], 7.6.2.8 [expr.new])... If, for the set of function templates so considered, there is either no match or more than one match after partial ordering has been considered (13.7.7.3 [temp.func.order]), deduction fails and the declaration is ill-formed.

The statement describing the consequence of deduction failure (“the declaration is ill-formed”) does not apply to the case when deduction is being performed for placement operator delete, as there is no declaration involved. It may not be necessary to describe what happens when deduction fails in that case, but at least the wording should be tweaked to limit the conclusion to declarative contexts.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3403
2011-04-10 00:00:00adminsetstatus: review -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3112
2010-11-29 00:00:00adminsetstatus: open -> review
2010-08-19 00:00:00admincreate