From 41b41fefb38900e12e709137a35565cceb0bf02b Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Mon, 6 Apr 2026 15:03:29 +0200 Subject: [PATCH] utils: forbid the use of std::less on pointers in TopoSort --- kernel/utils.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/utils.h b/kernel/utils.h index 1d6c038fd..e71fb4911 100644 --- a/kernel/utils.h +++ b/kernel/utils.h @@ -131,6 +131,8 @@ public: template > class TopoSort { + static_assert(!(std::is_pointer::value && std::is_same>::value), + "std::less is run-to-run unstable for pointers"); public: // We use this ordering of the edges in the adjacency matrix for // exact compatibility with an older implementation.