On 4/5/2011 10:46 PM, Peter Dimov wrote:
Robert Jones wrote:
On Tue, Apr 5, 2011 at 2:27 PM, Peter Dimov
wrote: using boost::lambda::bind;
should be a better choice.
Hello Peter
Yes, that was my first thought too. But this code still has ambiguity issues.
Yes, you're right, it has. Since boost::function is in namespace boost, the compiler still finds boost::bind via argument-dependent lookup.
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. And perhaps boost::bind and its placeholders should also be in an ADL-blocker namespace, but I seem to recall that the placeholders are not in any namespace for legacy reasons, is that right? -- Eric Niebler BoostPro Computing http://www.boostpro.com