Variables can be automatically moved when a function returns. However, declaring a variable as const prevents that move from occuring (as the move modifies the moved-from variable).