Why do you need to `const_pointer_cast` here?