| 139 | |
| 140 | template<class F> |
| 141 | void descend_requirement_tree(F&& f, const dag_node* n) { |
| 142 | if(f(n)) { |
| 143 | for(const auto& req : n->get_requirements()) { |
| 144 | if(auto r = req.lock()) |
| 145 | descend_requirement_tree(f, r.get()); |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | // Looks recursively in the requirement graph of current for x. |
| 151 | // Descends no more than current_level levels and does not |