C++ Logo

std-discussion

Advanced search

Re: atomic constraint rules vs requires-clause rules

From: mauro russo <ing.russomauro_at_[hidden]>
Date: Thu, 16 Jan 2025 01:15:54 +0100
I thought about the topics once more.
(https://lists.isocpp.org/std-discussion/current/2783.php)

Maybe the solution about the potential ambiguity between the rules on
atomic constraints and the rules on requires-clause, is that a
requires-clause including invalid type/expression, is not itself an invalid
expression, as this would mean that an atomic constraint being a
requires-clause means that the requires-clause is well-formed (valid
expression) and so only the rules for requires-clause apply.

Please, confirm this is true. However, in such a case, I would suggest to
add a short note in [temp.constr.atomic]. I am not convinced such a note
would be a 'tutoring'... but you can choose.

Additionally, I still wonder about the text in [temp.res.general] - p(6.4),
which appear with a different spirit from [expr.prim.req.general] - p5,
because in case the always-ill-forming is in an immediate context and there
is any code triggering the check involving that context, the former does
not lead to IFNDR (nor to a compilation error triggered by the existing
check), whereas the latter does it (IFNDR for immediate context, and of
course compilation error for non-immediate context).

Even my third doubt, that is about the need to specify the generation of
atomic constraints with empty mapping, still applies.

Please, read previous message (mentioned above) of this thread for the
complete background.

Received on 2025-01-16 00:16:10