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
[expected.object.monadic][LWG 3938] Use **this may cause compile fail #6500
Comments
You are referring to CWG3938. This core issue does not exist (yet), we're at least 1000 core issues away from that. Maybe you meant to refer to LWG3938. In any case, your concerns appear to be non-editorial in nature: If a type computation prescribed by the standard yields an incorrect type, that's not for the editors to fix. Please file an LWG issue with your concerns. |
I'm so sorry, that is a typo, I'm referring to LWG3938, and thanks for your tips. |
It seems to me that you detected a wrong type.
The wording is specifying non-static member functions, isn't it? |
Yes. |
I guess it's unnecessary to make Constraints conform to requires-clauses. In the standard wording, IMO it's better to specify conditions in Mandates and Constraints in the same contexts. |
This is not-a-defect. We're describing a non-static member function here, and this certainly has a |
The wording clearly says Let But you forgot the move when declaring
This is just an implementation bug.
This wording is fine too. If you use Feel free to replace |
Thanks for the clarification and advice, the first question was my mistake. |
I'm working on address LWG3938(https://wg21.link/LWG3938) in libc++, there maybe 2 issues in the wording:
*this
always produces an Lvalue http://eel.is/c++draft/expr.unary.op#1.sentence-3 , so the type ofdecltype(**this)
isconst _Tp &
but notconst _Tp &&
When
and_then
called in:This may compile error, because
and_then
callsstd::invoke(std::forward<_Func>(__f), std::move(**this));
andstd::invoke(std::forward<_Func>(__f), std::move(**this));
will callUnexpectedCRVal::operator()(const int&)
, which is a deleted function.The standard wording:
The text was updated successfully, but these errors were encountered: