Yes, without the cast, it complains with that same "pointer lives longer" error.