Title
§[res.on.functions]/2's prohibition against incomplete types shouldn't apply to type traits
Status
c++17
Section
[meta]
Submitter
Tim Song

Created on 2016-01-07.00:00:00 last changed 89 months ago

Messages

Date: 2016-02-07.20:24:45

Proposed resolution:

This wording is relative to N4567.

  1. Insert a new paragraph after [meta.type.synop]/1:

    -?- Unless otherwise specified, an incomplete type may be used to instantiate a template in this subclause.

Date: 2016-02-07.20:24:45

[ 2016-02, Issues Telecon ]

P0; move to Tentatively Ready.

Date: 2016-01-07.00:00:00

[res.on.functions]/2.5 says that the behavior is undefined "if an incomplete type is used as a template argument when instantiating a template component, unless specifically allowed for that component."

This rule should not apply to type traits — a literal application would make is_same<void, void> undefined behavior, since nothing in [meta] (or elsewhere) "specifically allows" instantiating is_same with incomplete types.

Traits that require complete types are already explicitly specified as such, so the proposed wording below simply negates [res.on.functions]/2.5 for [meta].

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2016-03-07 04:11:48adminsetstatus: ready -> wp
2016-02-07 20:24:45adminsetmessages: + msg7971
2016-02-07 20:24:45adminsetstatus: new -> ready
2016-01-16 16:39:36adminsetmessages: + msg7681
2016-01-07 00:00:00admincreate