We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f52839 commit 2368b4cCopy full SHA for 2368b4c
include/intrusive_graph.h
@@ -71,8 +71,10 @@ namespace detail {
71
// Check for (direct) cycles
72
assert(!has_dependent(dep.node));
73
74
- auto it = maybe_get_dep(dependencies, dep.node);
75
- if(it != std::nullopt) {
+ if(const auto it = maybe_get_dep(dependencies, dep.node)) {
+ // We assume that for dependency kinds A and B, max(A, B) is strong enough to satisfy both.
76
+ static_assert(dependency_kind::ANTI_DEP < dependency_kind::ORDER_DEP && dependency_kind::ORDER_DEP < dependency_kind::TRUE_DEP);
77
+
78
// Already exists, potentially upgrade to full dependency
79
if((*it)->kind < dep.kind) {
80
(*it)->kind = dep.kind;
0 commit comments