[Boost-bugs] [Boost C++ Libraries] #9624: boost::icl::swap causes ambiguity with std::swap with ADL

Subject: [Boost-bugs] [Boost C++ Libraries] #9624: boost::icl::swap causes ambiguity with std::swap with ADL
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-31 18:28:35


#9624: boost::icl::swap causes ambiguity with std::swap with ADL
---------------------------------------+---------------------
 Reporter: Nathan Thomas <nthomas@…> | Owner: jofaber
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: ICL
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
---------------------------------------+---------------------
 With C++11, the swap() function overload in boost::icl is ambiguous with
 std::swap due to ADL. I'm using boost 1.53, but this doesn't appear to be
 addressed in git yet either. It think it's the exact same problem
 previously addressed in Boost.Variant
 (https://svn.boost.org/trac/boost/ticket/2839).

 I've applied the same fix (i.e., using separate template params for two
 arguments to swap, making it less specialized than std::swap) to my local
 copy of boost, and it appears to resolve it.

 I'm using clang 3.4 / libstdc++ from gcc 4.7.2 / boost 1.53, compile line
 ==> clang -std=c++11 -o test_adl test_adl.cc

 test file and error message attached.

 Thanks,
 --Nathan

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9624>
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:15 UTC