Boost C++ Libraries: Ticket #12256: boost::container::set<std::pair<int,int>>::insert cause compilation error in debug configuration in Visual Studio 2012 https://svn.boost.org/trac10/ticket/12256 <p> Here is the example code </p> <pre class="wiki"> boost::container::set&lt;std::pair&lt;int,int&gt;&gt; s; std::pair&lt;int,int&gt; p(0, 0); s.insert(p); </pre><p> It outputs a several pages long template error starting as </p> <pre class="wiki">1&gt;...........\boost_1_61_0\boost/intrusive/detail/tree_value_compare.hpp(74): error C2664: 'const std::pair&lt;_Ty1,_Ty2&gt; &amp;boost::move_detail::identity&lt;T&gt;::operator ()(const std::pair&lt;_Ty1,_Ty2&gt; &amp;)' : cannot convert parameter 1 from 'const boost::container::container_detail::pair&lt;T1,T2&gt;' to 'const std::pair&lt;_Ty1,_Ty2&gt; &amp;' 1&gt; with 1&gt; [ 1&gt; _Ty1=int, 1&gt; _Ty2=int, 1&gt; T=std::pair&lt;int,int&gt; 1&gt; ] 1&gt; and 1&gt; [ 1&gt; T1=int, 1&gt; T2=int 1&gt; ] 1&gt; and 1&gt; [ 1&gt; _Ty1=int, 1&gt; _Ty2=int 1&gt; ] 1&gt; Reason: cannot convert from 'const boost::container::container_detail::pair&lt;T1,T2&gt;' to 'const std::pair&lt;_Ty1,_Ty2&gt;' ................................ </pre><p> Same code compiles correctly in release configuration. And it compiles correctly in boost 1.59 in all configurations. </p> <p> Marking it as Showstopper as it breaks a lot of our code. </p> <p> To reproduce - create a new VS2012 project with default settings. I didn't test it on other versions of Visual Studio. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12256 Trac 1.4.3 anonymous Wed, 08 Jun 2016 10:49:49 GMT attachment set https://svn.boost.org/trac10/ticket/12256 https://svn.boost.org/trac10/ticket/12256 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_1.61.0_bug_1.7z</span> </li> </ul> <p> VS2012 project to reproduce error </p> Ticket Ion Gaztañaga Mon, 08 Aug 2016 23:01:54 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12256#comment:1 https://svn.boost.org/trac10/ticket/12256#comment:1 <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> Thanks for the report. Fixed in commit: </p> <p> <a class="ext-link" href="https://github.com/boostorg/container/commit/37c1558a811ef1b320ac7b20fe0d938538c2930a"><span class="icon">​</span>https://github.com/boostorg/container/commit/37c1558a811ef1b320ac7b20fe0d938538c2930a</a> </p> Ticket