Skip to content

CWG3165 [basic.link] Use "equivalent type" instead of "same type" to cover templated functions and variables #860

Description

@t3nsor

Full name of submitter: Brian Bi

Issue description: [basic.link]/11.1 applies to all functions and variables, including templated ones; since their types can be dependent, their declared types should be required to be "equivalent" across all declarations, rather than "the same".

Suggested resolution: Edit [basic.link]/11.1 as follows:

  • If one declares E to be a (possibly templated) variable or function, the other shall declare E as one of the sameequivalent type ([temp.over.link]).

Then, remove the cross-reference to [temp.over.link] from bullet 11.5.

Activity

  1. jensmaurer commented on Mar 10, 2026

    @jensmaurer
    Member
  2. changed the title [-][basic.link] Use "equivalent type" instead of "same type" to cover templated functions and variables[/-] [+]CWG3165 [basic.link] Use "equivalent type" instead of "same type" to cover templated functions and variables[/+] on Mar 10, 2026
  3. t3nsor commented on Mar 11, 2026

    @t3nsor
    Author

    CWG3165

    Link doesn't work.

  4. jensmaurer commented on Mar 11, 2026

    @jensmaurer
    Member

    Link doesn't work.

    @t3nsor , now it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions