template<typename _It> double Alg(_It it1, _It it2) { return AlgInternal( it1, it2, std::_Iter_cat(it1) ); } End of Listing