Avoid multiple definitions of struct Node in same namespace
using V = vespalib::ConstArrayRef<float>;
class AnnoyLikeNns;
-struct Node;
+inline namespace xpannoynns { struct Node; }
static size_t plane_dist_cnt = 0;
static size_t w_cen_dist_cnt = 0;
@@ -21,6 +21,8 @@ static size_t find_cand_cnt = 0;
using QueueNode = std::pair<double, Node *>;
using NodeQueue = std::priority_queue<QueueNode>;
+namespace xpannoynns {
+
struct Node {
Node() {}
virtual ~Node() {}
@@ -31,6 +33,8 @@ struct Node {
virtual void stats(std::vector<uint32_t> &depths) = 0;
};
+}
+
struct LeafNode : public Node {
std::vector<uint32_t> docids;
