Title
Use "equivalent type" to support templated entities
Status
dup
Section
6.7 [basic.link]
Submitter
Brian Bi

Created on 2026-03-10.00:00:00 last changed 3 weeks ago

Messages

Date: 2026-07-27.15:54:01

CWG 2026-06-10

It is believed that 13.7.7.2 [temp.over.link] or 13.6 [temp.type] should define "same type" to be applicable for dependent types, too. See issue 2584 for the missing definition.

Date: 2026-07-27.15:54:01

Proposed resolution (approved by CWG 2026-05-08):

Change in 6.7 [basic.link] bullet 11.1 as follows:

For any two declarations of an entity E:
  • If one declares E to be a (possibly templated) variable or function, the other shall declare E as one of the same equivalent type (13.7.7.2 [temp.over.link]).
  • ...
  • If one declares E to be a class template, the other shall do so with the same kind and an equivalent template-head (13.7.7.2 [temp.over.link]).
  • ...
Date: 2026-07-27.15:54:01

(From submission #860.)

Subclause 6.7 [basic.link] bullet 11.1 applies to all functions and variables, including templated ones, thus can involve dependent types for which "same type" is not defined.

History
Date User Action Args
2026-07-25 12:18:16adminsetmessages: + msg8633
2026-07-25 12:18:16adminsetstatus: tentatively ready -> dup
2026-05-08 21:09:36adminsetstatus: open -> tentatively ready
2026-03-10 22:21:21adminsetmessages: + msg8507
2026-03-10 00:00:00admincreate