Re:Show HN: Cppmatch – Rust-Like Pattern Matching and Error ...
by Rucadi on Monday March 17, 2025 @03:13AM
(#43385908)
RVO/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%3...
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.