Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10882: error C2668: 'boost::swap' : ambiguous call to overloaded function (MSVC)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-22 16:20:35
#10882: error C2668: 'boost::swap' : ambiguous call to overloaded function (MSVC)
--------------------------------------------+---------------------------
Reporter: Gabor Marton <martongabesz@â¦> | Owner: apolukhin
Type: Bugs | Status: assigned
Milestone: Boost 1.58.0 | Component: variant
Version: Boost 1.56.0 | Severity: Problem
Resolution: | Keywords: compile error
--------------------------------------------+---------------------------
Comment (by Thomas Riccardi <riccardi@â¦>):
Replying to [comment:5 apolukhin]:
> Replying to [comment:4 Thomas Riccardi <riccardi@â¦>]:
> > Since which Boost version this issue is present? At least 1.56, but
what about earlier versions (like 1.55)?
>
> Looks like this issue exists from the very beginning of the Varinat
library.
>
>
> > And does this ambiguous call resolution cause a risk on other
compilers (like gcc)?
>
> Yes
>
> > Does it work by luck on gcc? Is this luck stable? Or is there a risk
that under some more complicated scenario the issue could happen on gcc
too (without the fix)?
>
> Issue happen if a class located in `boost::` namespace is being swapped
and `boost/swap.hpp` is included. Anyway, it's a compile-time error, so
you'll definitely know if you are hit by this issue.
Thank you for all your precise answers.
I added to this ticket 2 patches that backport the fix for this issue on
boost 1.55.0 and 1.57.0.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10882#comment:6> 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:17 UTC