Skip to content
Snippets Groups Projects
Commit da2a7e8f authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Temporary workaround for private members access

parent d6f3b1c6
No related branches found
No related tags found
1 merge request!8GraphView cloning proposal + labelGraph proof of concept
Pipeline #31269 failed
......@@ -33,7 +33,8 @@ class GraphView;
* @brief Object carrying the topological information of the computational graph.
*/
class Node : public std::enable_shared_from_this<Node> {
private:
//private:
public: // TODO: workaround to make GraphView:clone() work, friend doesn't work because of forward declaration
struct weakCompare {
bool operator()(const std::weak_ptr<Aidge::GraphView>& a, const std::weak_ptr<Aidge::GraphView>& b) const {
// Compare the content of the weak_ptrs
......@@ -399,7 +400,8 @@ public:
return node->clone();
}
friend std::shared_ptr<GraphView> GraphView::clone(NodePtr(*cloneNode)(NodePtr)) const;
// TODO: does not work, friend requires full definition, but there is a circular dependency between Node and GraphView
//friend std::shared_ptr<GraphView> GraphView::clone(NodePtr(*cloneNode)(NodePtr)) const;
private:
///////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment