Made auto ref work for non template functions.