-
Notifications
You must be signed in to change notification settings - Fork 249
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
[BUG] No implicit move for move this
, explicit move
doesn't parse
#857
Comments
This does parse (https://cpp2.godbolt.org/z/3zdhbPnMo):
I have other report(s) where |
I think it's reasonable to also expect
Expected: [[nodiscard]] auto t::operator*() && -> std::string { return std::move(s); } Actual: [[nodiscard]] auto t::operator*() && -> std::string { return s; } |
Of course, the same should also apply to destructors (https://cpp2.godbolt.org/z/hvxxdaozq):
|
What to do for a data member of reference type? |
|
|
Title: No implicit move for
move this
, explicitmove
doesn't parse.Minimal reproducer (https://cpp2.godbolt.org/z/WhxKGfn83):
Commands:
cppfront main.cpp2 clang++18 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -Werror=unused-value -Werror=unused-parameter -I . main.cpp
Expected result:
Actual result and error:
A copy.
Cpp2 lowered to Cpp1:
See also:
The text was updated successfully, but these errors were encountered: