The return value should not be void. The following is the fixed version. 401 template<typename T> 402 inline ProjectiveMatrix<2, T>inverseof(const ProjectiveMatrix<2, T>& M) { 403 ProjectiveMatrix<2, T> N(M); 404 invert(N); 405 return N; 406 }