I have translated some parts of MatchPy into C++. I am finding difficulties implementing the type Union[TLeft, TRight]. I could use C++17 and variant<TLeft, TRight>, but this would break compatibility with older compilers.
I have translated parts of BipartiteGraph into C++ and I have temporarily used the template TEdgeValue only:
https://github.com/symengine/symengine/blob/9cb6da759fb95e2ffece407e0cf2bad136a3933b/matchpygen/bipartite.h#L29
Could the dictionary _graph be split into _graph_left and _graph_right to keep type consistency without type unions?
I have translated some parts of MatchPy into C++. I am finding difficulties implementing the type
Union[TLeft, TRight]. I could use C++17 andvariant<TLeft, TRight>, but this would break compatibility with older compilers.I have translated parts of
BipartiteGraphinto C++ and I have temporarily used the templateTEdgeValueonly:https://github.com/symengine/symengine/blob/9cb6da759fb95e2ffece407e0cf2bad136a3933b/matchpygen/bipartite.h#L29
Could the dictionary
_graphbe split into_graph_leftand_graph_rightto keep type consistency without type unions?