This is only called with double, right?  If not, it can get its own unfolded definition (no rush, though).  If so, you can replace "const T&" with "double".