void compare (Distances distances, Reference const & reference_) { auto reference = range::view (reference_); while (!empty (reference)) { BOOST_CHECK (!empty (distances)); if (empty (distances)) return; auto d = chop_in_place (distances); auto r = chop_in_place (reference); BOOST_CHECK_EQUAL (first (d), first (r)); BOOST_CHECK_EQUAL (second (d), second (r)); } BOOST_CHECK (empty (distances)); }