Add a custom cast?

I put that into my Matrix class and it says that there is no return type. Could you please explain how this method works.