Explicitly cast away the const-ness instead of doing it implicitly.