[Boost-bugs] [Boost C++ Libraries] #9009: flat_set.insert() is ambigious

Subject: [Boost-bugs] [Boost C++ Libraries] #9009: flat_set.insert() is ambigious
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-17 06:19:38


#9009: flat_set.insert() is ambigious
--------------------------------+------------------------
 Reporter: Jon Kalb <boost@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost 1.54.0 | Severity: Regression
 Keywords: move |
--------------------------------+------------------------
 Here is the code:

 #include "boost/container/flat_set.hpp"

 int main() {
     boost::container::flat_set<int> const fs0;

     boost::container::flat_set<int> fs1;

     fs1.insert(fs0.begin(), fs0.end());
 }

 This is with C++03 not C++11.

 The error is that the call to insert is ambiguous.

 This is a regression. It doesn't happing in 1.49. (I think it was
 introduced by move support.)

 I believe the issue is that if the iterators are of the same type, then
 the iterator pair insert is supposed to be preferred because the template
 that has both parameters being the same time is more specialized. But with
 the move semantic implementation macros, the form (const_iterator, value)
 is only templated on the second parameter so it isn't less specific.

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