Eric Niebler wrote:
Yuk. Is it ever desirable for an argument of type boost::function to cause lookup in namespace boost? Probably not, right? That would argue for moving boost::function into an ADL-blocker namespace.
Nothing here is specific to boost::function. By this same logic, nothing should ever be in namespace boost. You could very well make the case that, indeed, nothing but subnamespaces should be in boost. In most circumstances you would be right. But the reason everything is in boost is that everything that is accepted into the standard would move into std, and putting everything in boost allows us to catch problems that would in any case occur when the components are placed in std. And in fact, the original problem presents itself with std::function (or std::anything else, for that matter) and std::bind as well.