Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expr.prim.req.general] Correct the IFNDR example #6062

Merged
merged 1 commit into from Nov 8, 2023

Conversation

frederick-vs-ja
Copy link
Contributor

Fixes #6055.

The old example is made well-formed by CWG2392. And it's doubtful whether it was definitely correct before CWG2392, as an implementation may allow a large object type T such that (int)sizeof(T) is equal to 0.

The expression new decltype((void)T{}) used by this PR is guaranteed to be ill-formed and thus makes the program IFNDR - either T{} is ill-formed, or the expression is equivalent to new void which is ill-formed.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 8, 2023

@jensmaurer, any thoughts on the quality of the replacement example?

@tkoeppe tkoeppe merged commit 07ae51a into cplusplus:main Nov 8, 2023
@frederick-vs-ja frederick-vs-ja deleted the concept-ifndr branch November 8, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expression in requirement-seq no longer IFNDR due to DR2392
4 participants