https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87121
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- <cmath> declares a std::pow function template that accepts integer types: template<typename _Tp, typename _Up> inline _GLIBCXX_CONSTEXPR typename __gnu_cxx::__promote_2<_Tp, _Up>::__type pow(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return pow(__type(__x), __type(__y)); } Since you're calling pow with two arguments of type 'int' the specialization std::pow<int, int> is a perfect match, but ::pow(u64, int) is not (because 'u64' is not the same type as 'int').