3 ms·
This is great! Thanks for sharing, it is a cool idea to try bringing QoL improvements from Rust to C++. Got a question: Does this prevent the RVO/NRVO compiler
by j1elo 2y ago
This is great! Thanks for sharing, it is a cool idea to try bringing QoL improvements from Rust to C++. Got a question:
Does this prevent the RVO/NRVO compiler optimizations for return values? And when those fail, same question for the move-construction for types that do have a move constructor.
- Rucadi 2y agoRVO/NRVO are valid and are not affected. We are dealing with std::variant, and the move semantics are defined by the alternative. https://en.cppreference.com/w/cpp/utility/variant/operator%3D https://en.cppreference.com/w/cpp/utility/variant/operator%3...