Title
Impenetrable definition of atomic constraint
Status
open
Section
13.5.2.3 [temp.constr.atomic]
Submitter
Brian Bi

Created on 2025-01-30.00:00:00 last changed 2 months ago

Messages

Date: 2025-03-04.22:39:53

The definition of "atomic constraint" is hard to read.

Possible resolution:

Change in 13.5.2.3 [temp.constr.atomic] paragraph 1 as follows:

An atomic constraint is formed from an expression E and a mapping from the template parameters that appear within E to template arguments that are formed via substitution during constraint normalization in the declaration of a constrained entity (and, therefore, can involve the unsubstituted template parameters of the constrained entity), called the parameter mapping (13.5.3 [temp.constr.decl]).

An atomic constraint is a pair (E, M) where E is an expression and M is a mapping from the template parameters that appear within E to template arguments expressed using the normalizing context of the atomic constraint. The parameter mapping of an atomic constraint is M. The normalizing context of an atomic constraint is

  • the surrounding context of the last concept-id for which arguments were substituted into the parameter mapping via constraint normalization (13.5.4 [temp.constr.normal]), if any, and
  • the surrounding context where E appears otherwise.

[Note: The atomic constraints in the associated constraints of a constrained entity have parameter mappings that map the template parameters that appear within their expressions to template arguments expressed using the context of the declaration of the constrained entity, which may involve the unsubstituted template parameters of the constrained entity. -- end note]

History
Date User Action Args
2025-01-30 00:00:00admincreate