Title
Access checking during template argument deduction
Status
c++11
Section
13.10.3 [temp.deduct]
Submitter
Adamczyk

Created on 2010-08-03.00:00:00 last changed 96 months ago

Messages

Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting.]

Date: 2011-01-15.00:00:00

Proposed resolution (January, 2011):

Change 13.10.3 [temp.deduct] paragraph 8 as follows:

If a substitution results in an invalid type or expression, type deduction fails. An invalid type or expression is one that would be ill-formed if written using the substituted arguments. [Note: Access checking is not done as part of the substitution process. end note] Consequently, when deduction succeeds, an access error could still result when the function is instantiated. Only invalid types...
Date: 2010-08-03.00:00:00

According to 13.10.3 [temp.deduct] paragraph 8,

Access checking is not done as part of the substitution process. Consequently, when deduction succeeds, an access error could still result when the function is instantiated.

This mimics the way access checking is done in overload resolution. However, experience has shown that this exemption of access errors from deduction failure significantly complicates the Standard library, so this rule should be changed.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3400
2011-04-10 00:00:00adminsetstatus: tentatively ready -> fdis
2011-02-28 00:00:00adminsetmessages: + msg3238
2011-02-28 00:00:00adminsetstatus: drafting -> tentatively ready
2010-08-03 00:00:00admincreate