Sadly, I don't think there s a way of turn an std::pair of iterators into a range-based-for-compliant range (see [1]).
correct me if I'm missing something, but when performing ADL the namespaces of the template parameters are in the set of associated namespaces. So, one could simply overload begin/end in the namespace where the iterator types are defined ...
You're right, a per-namespace solution is possible. I don't think it can be done in general, though (i.e. for all std::pairs of iterators in one stroke). I'm not familiar with BGL - are the iterator types in question defined in a namespace under the library's control, or could they be user-provided types (in which the case the user would have to put the begin()/end() in their own namespace)? Regards, Nate