There was some related discussion about temporary lifetime inconsistency in this recent thread:
Related Topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Why does the temporary in the last statement is dropped after the local variable? | 31 | 640 | January 10, 2024 | |
Special case at temporary drop order | 3 | 192 | January 18, 2024 | |
Drop rules for temporaries in final expression | 4 | 350 | May 16, 2021 | |
Why the parameter of a function is droped afer the temporary variable in return of the function? | 5 | 141 | February 7, 2024 | |
Does "match" store values into a temporary variable before letting me access it? | 6 | 198 | February 2, 2024 |