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
[meta.logical] unclear wording #2548
Comments
It seems clear to me. Maybe it would be more precise to say "does not require the definition of the static data member |
I'm not sure what you mean by "fixed" but I've submitted #2549 to use math mode for the subscripts i, j, 1 and N.
This seems non-editorial to me.
It's undefined, because it fails to meet the Requires: precondition.
The cast is supported, but it's not required. If an implementation wants to rely on an implicit conversion instead that's fine (as long as it does so without a narrowing conversion, as per lwg 2587).
That's not an editorial issue with the standard. |
Neither As of the modification done in #2550, is a declaration here same to a definition? |
Yes.
I don't see any precondition prefixed Requires: in this subclause. A non-editorial question: why not make it ill-formed?
|
Right. It's still a requirement though, and your program doesn't meet it. Please take non-editorial questions to the right place. |
OK. Enlightened by the clauses about the editorial style, I think now I'm clear what happens. As per [structure.specifications], Requires: is for "descriptions of function semantics" so I guess it is not fit here. Instead [structure.requirements] is used. As a result, [res.on.requirements] takes effect instead of [res.on.required]. Thus, the program is actually ill-formed without diagnostics required, but not undefined. |
My understanding is that you have to cast: implicit and explicit conversion could yield different results, and the cast was intended to pin down the behavior. I would not be opposed to saying that "the type of |
In N4778 [meta.logical]/2
What is "the instantiation of
Bj::value
"?(The font of
j
should also be fixed.)The change in #1133 (LWG 2567) also introduces another (possibly non-editorial) problem: does the explicit cast to
bool
ofvalue
mandated? For example:Is the program above well-formed?
It seems intentionally ill-formed as per "shall have a member
value
which is convertible tobool
" wording in [meta.logical]/4. (Is this presumely "implicit", or likestd::is_convertible
?) Thenbool(Bj::value)
is not appropriate as it suggests the cast shall be supported, as implemented in cppreference.Otherwise, libstdc++, libc++ and MSVC currently all has the bug concerned with the resolution of LWG 2567, and [meta.logical]/4 should be reworded to clarify the intention. I guess this is not intentional because a) it was not proposed, which should be consisted to existed implementations; b) the context here is more like operands of
&&
but notif
, which needs no contextually conversion, so omission of explicit cast should not be encouraged; and c) it is an editorial side effect implied by the title of #1133: "fixed in add further explicit boolean conversions editorially".The text was updated successfully, but these errors were encountered: