You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expression is contextually converted to bool. The expression is not evaluated. If the converted expression would evaluate to true at the point where the assumption appears, the assumption has no effect.
Otherwise, the behavior is undefined.
This wording is mildly contradictory because the first sentence says that contextual conversion takes place. This might even invoke user-defined conversion operators, so the reader should assume that something is being evaluated here.
However, this is then contradicted by saying that the expression is not evaluated. If it's not evaluated, then obviously contextual conversion can't take place.
I think it would be much clearer to write:
-The expression is contextually converted to bool.+The expression shall be contextually convertible to bool.
The expression is not evaluated.
If the converted expression would evaluate to true at the point where the assumption appears,
the assumption has no effect.
Otherwise, the behavior is undefined.
I am not sure if this issue is so severe that it's non-editorial.
The text was updated successfully, but these errors were encountered:
Hmm, I think it might really be non-editorial, because the wording only says that the expression is not evaluated, but it does not say that the contextual conversion is not evaluated.
This is obviously unimplementable, because an implementation can't contextually convert the result of an expression that doesn't exist, because the expression has never been evaluated.
The talk about conversions here is just about creating the syntax tree (with some implicit nodes). Whether that syntax tree is evaluated, is a second consideration.
[dcl.attr.assume] says:
This wording is mildly contradictory because the first sentence says that contextual conversion takes place. This might even invoke user-defined conversion operators, so the reader should assume that something is being evaluated here.
However, this is then contradicted by saying that the expression is not evaluated. If it's not evaluated, then obviously contextual conversion can't take place.
I think it would be much clearer to write:
I am not sure if this issue is so severe that it's non-editorial.
The text was updated successfully, but these errors were encountered: