Title
std::foo<incomplete> should be ill-formed NDR
Status
new
Section
[res.on.functions]
Submitter
Casey Carter

Created on 2018-07-07.00:00:00 last changed 65 months ago

Messages

Date: 2018-11-27.04:34:19

Proposed resolution:

This wording is relative to N4762.

Change [res.on.functions] as indicated:

(2.5) — if an incomplete type ([basic.types]) is used as a template argument when instantiating a template component or evaluating a concept, unless specifically allowed for that component.

-?- Unless explicitly stated otherwise, a program that instantiates a template component or evaluates a concept with an incomplete type ([basic.types]) as a template argument is ill-formed with no diagnostic required.

Date: 2018-11-27.04:34:19

[ 2018-11 Reflector prioritization ]

Set Priority to 3

Date: 2018-07-07.00:00:00

[res.on.functions]/2 states:

-2- In particular, the effects are undefined in the following cases:

[…]

(2.5) — if an incomplete type ([basic.types]) is used as a template argument when instantiating a template component or evaluating a concept, unless specifically allowed for that component.

While undefined behavior is appropriate for the other cases specified in the earlier bullets, which describe failure to meet (runtime) semantic requirements, "instantiating a template component or evaluating a concept" with an incomplete type happens at compile-time, and could potentially be diagnosed. It would therefore be more appropriate to specify that programs which do so are ill-formed with no diagnostic required.

History
Date User Action Args
2018-11-27 04:34:19adminsetmessages: + msg10235
2018-07-11 02:20:14adminsetmessages: + msg10028
2018-07-07 00:00:00admincreate