Skip to content

Commit

Permalink
fix: please gcc 10
Browse files Browse the repository at this point in the history
  • Loading branch information
DNKpp committed Oct 6, 2023
1 parent 781f1cc commit a62c0a5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/graph/Defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,16 +281,22 @@ constexpr auto toCommonRankedNode = []<sg::concepts::ranked_node Node>(const Nod

constexpr auto toDepthRankedNode = []<typename Node>(const sg::decorator::DepthNode<Node>& node)
{
return sg::decorator::DepthNode<sg::CommonRankedNode<sg::node::vertex_t<Node>, sg::node::rank_t<Node>>>{
// leave code as-is, because directly returning the temporary results in an ICE on gcc10
sg::decorator::DepthNode<sg::CommonRankedNode<sg::node::vertex_t<Node>, sg::node::rank_t<Node>>> sliced{
{toCommonRankedNode(node)},
node.depth
};

return sliced;
};

constexpr auto toPredecessorRankedNode = []<typename Node>(const sg::decorator::PredecessorNode<Node>& node)
{
return sg::decorator::PredecessorNode<sg::CommonRankedNode<sg::node::vertex_t<Node>, sg::node::rank_t<Node>>>{
// leave code as-is, because directly returning the temporary results in an ICE on gcc10
sg::decorator::PredecessorNode<sg::CommonRankedNode<sg::node::vertex_t<Node>, sg::node::rank_t<Node>>> sliced{
{toCommonRankedNode(node)},
node.predecessor
};

return sliced;
};

0 comments on commit a62c0a5

Please sign in to comment.