From: Kefu Chai Date: Mon, 8 Feb 2016 05:37:43 +0000 (+0800) Subject: crush/CrushTester: workaround a bug in boost::icl X-Git-Tag: v10.1.0~422^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3395fb9e06da03dae8faee3f9bec1d35a4de3713;p=ceph.git crush/CrushTester: workaround a bug in boost::icl the boost::icl in boost v1.55 has a bug when working with libc++, > Assertion failed: (this->_map.find(inter_val) == this->_map.end()), > function gap_insert, file > /usr/local/include/boost/icl/interval_base_map.hpp, line 555. see https://svn.boost.org/trac/boost/ticket/9501 and https://svn.boost.org/trac/boost/ticket/9987 the bug was fixed in boost v1.56. as a workaround we use the the `set` from `boost::container` instead of the `std::set` from libc++. we should drop this workaround once we bump the supported boost version from 1.42 to 1.56. Signed-off-by: Kefu Chai --- diff --git a/src/crush/CrushTester.cc b/src/crush/CrushTester.cc index da1ed9442632..2ebe8c23d87e 100644 --- a/src/crush/CrushTester.cc +++ b/src/crush/CrushTester.cc @@ -8,6 +8,13 @@ #include #include #include +// to workaround https://svn.boost.org/trac/boost/ticket/9501 +#ifdef _LIBCPP_VERSION +#include +#if BOOST_VERSION < 105600 +#define ICL_USE_BOOST_MOVE_IMPLEMENTATION +#endif +#endif #include #include #include