Skip to content

[expr.typeid] Add a note covering abominable function types as type-id #3260

@AlisdairM

Description

@AlisdairM

[expr.typeid]p4 describes the rules of applying the typeid operator to a type-id (rather than an expression). It explicitly disallows incomplete class types, and references to such. This appears to be the only invalid type-id for the operator, but in fact abominable function types are also disallowed, as the typeid operator is not listed as a permitted context in [dcl.fct]p6.

We should add a note (not duplicate normative text) to cross-reference this second category of rejected types, as I believe it is the only other category of unsupported types for this operator, and otherwise the rule in [expr.typeid] looks complete.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions