mirror of https://github.com/YosysHQ/yosys.git
utils: forbid the use of std::less on pointers in TopoSort
This commit is contained in:
parent
2033df5958
commit
41b41fefb3
|
|
@ -131,6 +131,8 @@ public:
|
|||
|
||||
template <typename T, typename C = std::less<T>> class TopoSort
|
||||
{
|
||||
static_assert(!(std::is_pointer<T>::value && std::is_same<C, std::less<T>>::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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue