Boost logo

Boost :

Subject: Re: [boost] [exception] [shared_ptr] ADL problem with msvc 10
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-04-16 21:37:21


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk