Boost C++ Libraries: Ticket #6720: intrusive::unordered_set::clear_and_dispose does not compile on VC11 Beta when passed a stateless lambda https://svn.boost.org/trac10/ticket/6720 <p> Attached is a small example code, which, being compiled on VC11 Beta produces a compilation error. The same code compiles successfully on VC2010. </p> <p> The following error is generated: </p> <pre class="wiki">...\boost\intrusive\slist.hpp(366): error C2247: 'boost::intrusive::hashtable_impl&lt;Config&gt;::node_cast_adaptor&lt;F&gt;::operator ()' not accessible because 'boost::intrusive::detail::node_disposer&lt;F,Container&gt;' uses 'private' to inherit from 'boost::intrusive::detail::ebo_functor_holder&lt;T&gt;' with [ Config=boost::intrusive::detail::usetopt&lt;boost::intrusive::detail::base_hook_traits&lt;Item,boost::intrusive::slist_node_traits&lt;void *&gt;,safe_link,boost::intrusive::default_tag,4&gt;,Item::hash,std::equal_to&lt;Item&gt;,unsigned int,boost::intrusive::detail::bucket_traits_impl&lt;boost::intrusive::detail::get_slist_impl&lt;boost::intrusive::slist_node_traits&lt;void *&gt;&gt;::type&gt;,1&gt;, F=boost::intrusive::detail::node_disposer&lt;main::&lt;lambda_4ec9a6cb8e4a7175a276948992bf9089&gt;,boost::intrusive::hashtable_impl&lt;boost::intrusive::detail::usetopt&lt;boost::intrusive::detail::base_hook_traits&lt;Item,boost::intrusive::slist_node_traits&lt;void *&gt;,safe_link,boost::intrusive::default_tag,4&gt;,Item::hash,std::equal_to&lt;Item&gt;,unsigned int,boost::intrusive::detail::bucket_traits_impl&lt;boost::intrusive::detail::get_slist_impl&lt;boost::intrusive::slist_node_traits&lt;void *&gt;&gt;::type&gt;,1&gt;&gt;&gt; ] and [ F=main::&lt;lambda_4ec9a6cb8e4a7175a276948992bf9089&gt;, Container=boost::intrusive::hashtable_impl&lt;boost::intrusive::detail::usetopt&lt;boost::intrusive::detail::base_hook_traits&lt;Item,boost::intrusive::slist_node_traits&lt;void *&gt;,safe_link,boost::intrusive::default_tag,4&gt;,Item::hash,std::equal_to&lt;Item&gt;,unsigned int,boost::intrusive::detail::bucket_traits_impl&lt;boost::intrusive::detail::get_slist_impl&lt;boost::intrusive::slist_node_traits&lt;void *&gt;&gt;::type&gt;,1&gt;&gt; ] and [ T=main::&lt;lambda_4ec9a6cb8e4a7175a276948992bf9089&gt; ] </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6720 Trac 1.4.3 Alexander Bessonov <alexbav@…> Wed, 21 Mar 2012 08:15:48 GMT attachment set https://svn.boost.org/trac10/ticket/6720 https://svn.boost.org/trac10/ticket/6720 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main.cpp</span> </li> </ul> Ticket y.miroshnyk@… Tue, 25 Nov 2014 11:12:34 GMT <link>https://svn.boost.org/trac10/ticket/6720#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6720#comment:1</guid> <description> <p> I have the same issue on VS12 (2013) when trying to make following: </p> <p> actions_.clear_and_dispose([](Buffer&lt;<a class="missing wiki">ActionRecord</a>&gt;* value) { delete value; }); </p> <p> where actions_ is: </p> <p> boost::intrusive::set&lt;Buffer&lt;<a class="missing wiki">ActionRecord</a>&gt;&gt; actions_; </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Wed, 17 Dec 2014 14:50:33 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6720#comment:2 https://svn.boost.org/trac10/ticket/6720#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> I've changed to public inheritance in classes deriving from ebo_function_holder as a workaround to this MSVC limitation: </p> <p> [develop 12ee566] Workaround for bugs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/10771" title="#10771: Bugs: remove_if is broken for slist (closed: fixed)">#10771</a> and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6720" title="#6720: Bugs: intrusive::unordered_set::clear_and_dispose does not compile on VC11 ... (closed: fixed)">#6720</a>. </p> Ticket