Use of auto may be occasionally controversial, but when the rhs is a cast expression it's a all-good choice.