so gtest can print out rbd_loc when printing out diagnostic information
when test fails. after moving operator<<(ostream&, const rbd_loc&) to
the `rbd_replay` namespace, ADL is able to find it. for more details on
the lookup rules, see https://en.cppreference.com/w/cpp/language/adl
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
fe696638515dc7a51214930049ebd1a6f951047f)
#include "rbd_replay/rbd_loc.hpp"
-using namespace rbd_replay;
-
+namespace rbd_replay {
std::ostream& operator<<(std::ostream& o, const rbd_loc& name) {
return o << "('" << name.pool << "', '" << name.image << "', '" << name.snap << "')";
}
+}
+
+using namespace rbd_replay;
static void add_mapping(ImageNameMap *map, std::string mapping_string) {
ImageNameMap::Mapping mapping;