bool value_equality(Heap1 const & lhs, Heap2 const & rhs, typename Heap1::value_type lval, typename Heap2::value_type rval) { typename Heap1::value_compare const & cmp = lhs.value_comp(); bool ret = !(cmp(lval, rval)) && !(cmp(rval, lval)); // if this assertion is triggered, the value_compare objects of lhs and rhs return different values BOOST_ASSERT((ret == (!(rhs.value_comp()(lval, rval)) && !(rhs.value_comp()(rval, lval))))); return ret; }