This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-09-28


3056. Missing semicolons in grammar for type-requirement

Section: 7.5.8.3  [expr.prim.req.type]     Status: open     Submitter: Peter Bindels     Date: 2025-08-14

(From submission #751.)

These lines in the example in 7.5.8.3 [expr.prim.req.type] paragraph 1 are not covered by the grammar:

  typename [:T::r1:];        // fails if T::r1 is not a reflection of a type
  typename [:T::r2:]<int>;   // fails if T::r2 is not a reflection of a template Z for which Z<int> is a type

Suggested resolution:

Change in 7.5.8.3 [expr.prim.req.type] paragraph 1 as follows:

  type-requirement:
    typename nested-name-specifieropt type-name ;
    typename splice-specifier ;
    typename splice-specialization-specifier ;