[BUG] Last use of an object resulting in std::move
is incompatible with CTAD
#968
Labels
bug
Something isn't working
std::move
is incompatible with CTAD
#968
Describe the bug
Cppfront generates a
std::move
for the last-use of an object, but this can cause problems if that last-use is an argument passed to a constructor which is relying on CTAD.To Reproduce
Run Cppfront on this code:
It lowers to:
This results in a compilation error, e.g. with Clang:
(Similar errors with MSVC and GCC.)
See Godbolt
The text was updated successfully, but these errors were encountered: