Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
topo-sort.hh File Reference
#include "nix/util/error.hh"
#include "nix/util/fun.hh"
#include <variant>
#include <concepts>

Go to the source code of this file.

Classes

struct  nix::Cycle< T >

Typedefs

template<typename T>
using nix::TopoSortResult = std::variant<std::vector<T>, Cycle<T>>

Functions

template<typename T, typename Compare, std::invocable< const T & > F>
requires std::same_as<std::remove_cvref_t<std::invoke_result_t<F, const T &>>, std::set<T, Compare>>
TopoSortResult< T > nix::topoSort (std::set< T, Compare > items, const F &getChildren)