[Boost-bugs] [Boost C++ Libraries] #3534: [signals2] compile error with MSVC 2010 Beta 2

Subject: [Boost-bugs] [Boost C++ Libraries] #3534: [signals2] compile error with MSVC 2010 Beta 2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-20 14:33:39


#3534: [signals2] compile error with MSVC 2010 Beta 2
---------------------------------------------------------+------------------
 Reporter: Richard Webb <richard.webb@…> | Owner: fmhess
     Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: signals2
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: |
---------------------------------------------------------+------------------
 When trying to build a project that uses Signals2 in VC2010 beta 2, i got
 the error:

 {{{
 boost/signals2/detail/tracked_objects_visitor.hpp(61): error C2668:
 'boost::addressof' : ambiguous call to overloaded function
           \boost/utility/addressof.hpp(51): could be 'T
 *boost::addressof<const T>(T &)'
           with
           [
               T=lapi::ui::type_1::fn_label_change
           ]
           C:\Program Files\Microsoft Visual Studio
 10.0\VC\include\xmemory(109): or '_Ty *std::addressof<const T>(_Ty
 &)' [found using argument-dependent lookup]
           with
 }}}

 Seems that it's finding std::addressof via ADL if the type passed to
 addressof is from namespace std;.

 Changing line 61 of tracked_objects_visitor.hpp to use boost::addressof
 explicitly allows it to compile.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3534>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC