I guess it’s an additional use-case for move constructors in one form or another. One of the previous discussions.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| The way to see how memcpy and alloca introduced by move is optimized | 4 | 1015 | October 12, 2023 | |
| Add `push`, `push_back`, `pop` & `pop_back` methods to fixed-size arrays | 40 | 2565 | October 23, 2022 | |
| Idea: `shift_move` to efficiently move elements in a `Vec` | 6 | 566 | January 21, 2025 | |
| Vec! lack of optimization for "zeroed" types | 12 | 1133 | March 25, 2019 | |
|
Defer memcpy when passing types that is !Copy until it is actually moved to another variable
|
5 | 1354 | October 14, 2022 |