The second overload should use a const or forwarding reference. And you can keep only the second overload and pass
ranges::subrange
when you want two raw iterators.