This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

4185. Ill-formed, no diagnostic required on runtime behavior

Section: 29.9.7 [linalg.helpers], 18.4.9 [concept.swappable], 24.3.3.2 [iterator.cust.swap] Status: New Submitter: Jiang An Opened: 2024-12-18 Last modified: 2024-12-21

Priority: Not Prioritized

View all issues with New status.

Discussion:

Several exposition-only function objects in 29.9.7 [linalg.helpers] are specified with strange wording — "If the function selected by overload resolution does not return […], the program is ill-formed, no diagnostic required;". These conditions don't seem to be static properties because what the selected function returns can be completely dependent on the runtime environment and input.

Likewise, 18.4.9 [concept.swappable] and 24.3.3.2 [iterator.cust.swap] also contain such weird usage. Presumably we should say the behavior is undefined in these cases.

Proposed resolution: