Another thing to consider. According to this: http://en.cppreference.com/w/cpp/numeric/math/sqrt in C++11 for Integral types double is returned however I doubt that we call sqrt() for integral types since it wouldn't compile on older compilers.
Another thing is that we can't predict what type would be returned for some non-fundamental user-defined type. But here returning the same type is also a sane choice.

It's a shame we shouldn't use C++11 auto, decltype and trailing return type or even better C++14 auto return type deduction.