This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 108i. See for the official list.


1535. typeid in core constant expressions

Section: 7.7  [expr.const]     Status: CD3     Submitter: Richard Smith     Date: 2012-08-10

[Moved to DR at the April, 2013 meeting.]

One of the criteria in 7.7 [expr.const] paragraph 2 for disqualifying an expression from being a constant expression is:

on the basis that a runtime test for the dynamic type is inconsistent with a constant expression. However, it is only glvalues of polymorphic type that require a runtime test; type-ids and prvalues with a polymorphic type could (and should) be permitted in constant expressions.

Proposed resolution (October, 2012):

Change 7.7 [expr.const] paragraph 2 as follows: