Skip to content

RU012 [expr.prim.req].6 Incomplete types in requires-expressions should be ill-formed #12

@wg21bot

Description

@wg21bot

Accessing an incomplete type in requires-expression results in substitution failure. This is a dangerous approach that provokes odr-violations. Making the program ill-formed is a better approach that protects from hard detectable odr-violations.

Proposed change:
Add to the [expr.prim.req] paragraph 6:
In such cases, the requires-expression evaluates to false; it does not cause the program to be ill-formed if the requires-expression does not refer to incomplete type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EWGEvolutionconceptsConceptsrejectedNo consensus for a change.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions