
17 Apr
2010
17 Apr
'10
1:37 a.m.
Steven Watanabe wrote:
AMDG
I just tried to compile the following
#include <boost/exception_ptr.hpp> void f() {}
msvc 10 complains, 1>c:\boost\trunk\boost\smart_ptr\detail\sp_convertible.hpp(48): error C2660: 'f' : function does not take 1 arguments ... This appears to be because type_info is defined in the global namespace, so ADL for boost::error_info<boost::tag_original_exception_type, const type_info *> picks up the global f. I don't have a fix for this yet.
You mean apart from renaming f to something like _spc_helper_f? :-) Lookup from within a class scope shouldn't activate ADL when it finds a member, so it seems to me that MSVC 10 is wrong here, but I don't have chapter and verse handy, so who knows.