Title
Omission of the typename keyword in a member template parameter list
Status
drafting
Section
13.8.1 [temp.res.general]
Submitter
Mark Hall

Created on 2020-12-03.00:00:00 last changed 41 months ago

Messages

Date: 2020-12-03.00:00:00

According to 13.8.2 [temp.local] paragraph 5,

A qualified-id is assumed to name a type if

  • it is a qualified name in a type-id-only context (see below), or

  • it is a decl-specifier of the decl-specifier-seq of a

    • simple-declaration or a function-definition in namespace scope,

    • member-declaration,

    • parameter-declaration in a member-declaration140, unless that parameter-declaration appears in a default argument,

    • ...

This specification would appear to allow an example like:

   template<typename T> struct Y {};
   template<typename T> struct S {
     Y<int(T::type)> m;  // Omitted typename okay because it is in a member-declaration?
  };

The affected parameter-declarations should be only those of the member declarator, not in a member template's template parameter list.

(Note: this issue was spun off from issue 2462 to allow the resolutions to proceed independently.)

History
Date User Action Args
2020-12-03 00:00:00admincreate