Title
Reference collapsing with pack indexing and splicing
Status
open
Section
9.3.4.3 [dcl.ref]
Submitter
Corentin Jabot

Created on 2026-05-14.00:00:00 last changed yesterday

Messages

Date: 2026-05-15.19:30:31

Possible resolution:

  1. Change in 9.3.4.3 [dcl.ref] paragraph 1 as follows:

    ... Cv-qualified references are ill-formed except when the cv-qualifiers are introduced through the use of a typedef-name (9.2.4 [dcl.typedef], 13.2 [temp.param]) or decltype-specifier (9.2.9.6 [dcl.type.decltype]) computed-type-specifier (9.2.9.3 [dcl.type.simple]), in which case the cv-qualifiers are ignored. ...
  2. Change in 9.3.4.3 [dcl.ref] paragraph 7 as follows:

    If a typedef-name (9.2.4 [dcl.typedef], 13.2 [temp.param]) or a decltype-specifier (9.2.9.6 [dcl.type.decltype]) computed-type-specifier (9.2.9.3 [dcl.type.simple]) denotes a type TR that is a reference to a type T, an attempt to create the type “lvalue reference to cv TR” creates the type “lvalue reference to T”, while an attempt to create the type “rvalue reference to cv TR” creates the type TR. ...
Date: 2026-05-15.19:30:31

(From submission #903.)

Subclause 9.3.4.3 [dcl.ref] paragraph 7 was not updated when pack indexing and splicing was added to the language. And neither was paragraph 1.

History
Date User Action Args
2026-05-14 20:35:45adminsetmessages: + msg8577
2026-05-14 00:00:00admincreate