hide cast functions in detail namespace