The parameters should be const reference, not non-const reference.