Skip to content

[temp.constr.atomic]/2 Meaning of "the same *expression*" is unclear #2554

Open
@CaseyCarter

Description

@CaseyCarter

[temp.const.atomic]/2 says:

Two atomic constraints are identical if they are formed from the same expression and the targets of the parameter mappings are equivalent according to the rules for expressions described in [temp.over.link].

Not all readers will note that "expression" is italic here, so that it denotes the grammar-term expression, and if they do they may interpret it to mean that "the same expression" means "generated in the same manner from the grammar". Those who don't arrive at this conclusion will likely follow the cross-reference to [temp.over.link] looking for clarification, and will find [temp.over.link]/5:

Two expressions involving template parameters are considered equivalent if two function definitions containing the expressions would satisfy the one-definition rule [basic.def.odr], except that the tokens used to name the template parameters may differ as long as a token used to name a template parameter in one expression is replaced by another token that names the same template parameter in the other expression.

"expressions are equivalent" is pretty close to the phrasing "the same expression", and nothing else in [temp.over.link] tells me what it means for two expressions to be "the same", so paragraph 5 must be why [temp.const.atomic]/2 told me to look at [temp.over.link], right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    cwgIssue must be reviewed by CWG.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions