[stmt.return]p3:
The copy-initialization of the result of the call is sequenced before the destruction of temporaries at the end of the full-expression established by the operand of the return statement, which, in turn, is sequenced before the destruction of local variables of the block enclosing the return statement.
This means that the following happen in order:
- The return object is copy-initialized
- Any temporaries inside the return statement are destroyed
- Local variables are destroyed
So, we can infer that get_a is completely safe.