Skip to content

CWG2720 [temp.res] template validity rules don't cover templates without specializations #286

Closed
cplusplus/draft
#6328
@zygoloid

Description

@zygoloid

[temp.res.general]/6 gives the rules that determine when a template is valid, but it's specified in terms of "valid specializations". That doesn't seem like it can work for templates that don't have specializations, in particular for concepts and alias templates. Clearly the intent here is that the same rule applies everywhere -- any construct appearing as or within a templated entity is required to be valid for at least one substitution -- but it's currently at best unclear that that follows from the wording.

I think we should replace some or most of the mentions of "specializations" and "instantiations" in that paragraph with words that talk about substitutions being performed into the template. (Also, this paragraph means to talk about templated entities, not just templates.)

It seems sufficiently clear what this wording means to say that I think we can do this editorially, but it probably makes sense to run the result past CWG.

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