Title
Equivalence of pack-index-specifiers
Status
open
Section
13.6 [temp.type]
Submitter
Corentin Jabot

Created on 2025-04-14.00:00:00 last changed 2 months ago

Messages

Date: 2025-04-14.00:00:00

(From submission #700.)

Subclause 13.6 [temp.type] paragraph 5 and paragraph 6 specify:

For a type template parameter pack T, T...[constant-expression] denotes a unique dependent type.

If the constant-expression of a pack-index-specifier is value-dependent, two such pack-index-specifier s refer to the same type only if their constant-expressions are equivalent (13.7.7.2 [temp.over.link]). Otherwise, two such pack-index-specifier s refer to the same type only if their indexes have the same value.

That seems to imply that pack-index-specifiers referring to different template parameter packs could be equivalent.

Possible resolution:

Change and merge in 13.6 [temp.type] paragraph 5 and paragraph 6 as follows:

For a type template parameter pack T, T...[constant-expression] denotes a unique dependent type. If the constant-expression of a pack-index-specifier is value-dependent, two Two such pack-index-specifiers (9.2.9.4 [dcl.type.pack.index]) refer to the same type only if their typedef-names refer to the same template parameter pack and their constant-expressions are equivalent if value-dependent (13.7.7.2 [temp.over.link]) or otherwise have the same value. Otherwise, two such pack-index-specifier s refer to the same type only if their indexes have the same value.
History
Date User Action Args
2025-04-14 00:00:00admincreate