[Boost-bugs] [Boost C++ Libraries] #2611: Unordered containers not usable when EBO is not supported

Subject: [Boost-bugs] [Boost C++ Libraries] #2611: Unordered containers not usable when EBO is not supported
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-12-24 08:27:52


#2611: Unordered containers not usable when EBO is not supported
-------------------------------------+--------------------------------------
 Reporter: andysem | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: intrusive
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: EBO intrusive stateless |
-------------------------------------+--------------------------------------
 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.

 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.

 I've encountered the problem with unordered containers, but I suspect
 other containers might be affected, too.

 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).

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