C++ Logo

std-discussion

Advanced search

Re: atomic constraint rules vs requires-clause rules

From: mauro russo <ing.russomauro_at_[hidden]>
Date: Fri, 21 Feb 2025 00:36:51 +0100
> I see what you're saying. Perhaps any nested SFINAE contexts,
> i.e. an atomic constraint or the body of a requires-expression,
> should be considered to not be in the immediate context of the
> enclosing expression, so that only the innermost enclosing
> SFINAE context is considered to be unsatisfied, or evaluates
> to false. I think this could be a viable core issue.

Ok, thank you for the confirmation.

I would say that a couple of notes may fix the problem:

1) in [temp.constr.atomic], avoid the content (requires-seq) of a
requires-expression to be considered part of the immediate context for the
atomic constraint

2) in [expr.prim.req.nested], avoid the content (constrained-expression) of
the nested requirement to be considered part of the immediate context for
the nested requirement (in terms of what [expr.prim.req.general]-p5 states)

I am asking your opinion as a guide to try also proposing a draft idea when
opening an issue on https://github.com/cplusplus/CWG/issues/

Thank you.

PS: then I will move to second question of my original longer post 2800.

Received on 2025-02-20 23:37:03