Boost C++ Libraries: Ticket #9009: flat_set.insert() is ambigious https://svn.boost.org/trac10/ticket/9009 <p> Here is the code: </p> <p> #include "boost/container/flat_set.hpp" </p> <p> int main() { </p> <blockquote> <p> boost::container::flat_set&lt;int&gt; const fs0; </p> </blockquote> <blockquote> <p> boost::container::flat_set&lt;int&gt; fs1; </p> </blockquote> <blockquote> <p> fs1.insert(fs0.begin(), fs0.end()); </p> </blockquote> <p> } </p> <p> This is with C++03 not C++11. </p> <p> The error is that the call to insert is ambiguous. </p> <p> This is a regression. It doesn't happing in 1.49. (I think it was introduced by move support.) </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9009 Trac 1.4.3 Ion Gaztañaga Thu, 12 Sep 2013 21:57:38 GMT <link>https://svn.boost.org/trac10/ticket/9009#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9009#comment:1</guid> <description> <p> You are right. It was introduced by the move support. I think I have a fix for it. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Thu, 12 Sep 2013 22:00:52 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9009#comment:2 https://svn.boost.org/trac10/ticket/9009#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85660" title="Fixes #9009">[85660]</a>) Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/9009" title="#9009: Bugs: flat_set.insert() is ambigious (closed: fixed)">#9009</a> </p> Ticket