Someone suggested here using tuples instead of all public structures. And I found this helpful. But now my problem is with the following section:
using Edge = std::tuple<Node_wp,
Node_wp>;
using Edge_wp = std::weak_ptr<Edge>;
using Node = std::tuple<std::vector<Edge_wp>,
std::vector<Edge_wp>>;
using Node_wp = std::weak_ptr<Node>;
How can I overcome this cyclic dependency in the template options. An advanced declaration (with the knowledge at my disposal) will not work, because the Edge type cannot be formed without knowledge of the Node type and vice versa.
Obviously, I can do one of them struct
and do with it. But it will be ugly to break access symmetry.
source
share