Boost C++ Libraries: Ticket #2611: Unordered containers not usable when EBO is not supported https://svn.boost.org/trac10/ticket/2611 <p> If EBO (Empty Base Optimization) is not supported by the compiler unordered containers cannot be used. That is, at least find functions don't compile because they internally use s_iterator_to on the slist bucket, which contains a check that its value_traits is stateless. </p> <p> The root of the problem is in this check implementation and in the detail::is_empty_class implementation in particular. If EBO is not supported, the predicate will always return false. </p> <p> I've encountered the problem with unordered containers, but I suspect other containers might be affected, too. </p> <p> The proposed solution is to specialize is_empty_class template on the library-provided traits, so that it returns in the correct result. Or remove the stateless checks altogether. This should be noted in the docs (if the specialization approach is chosen, it should be said what template users have to specialize to make things work with their custom value traits). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2611 Trac 1.4.3 Ion Gaztañaga Thu, 26 Aug 2010 10:56:18 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/2611#comment:1 https://svn.boost.org/trac10/ticket/2611#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> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.38.0</span> → <span class="trac-field-new">Boost-1.45.0</span> </li> </ul> <p> For compliant compilers now is_stateful_value_traits tries to detect that all needed functions are static. </p> Ticket