mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-14 12:55:41 +00:00
utils: forbid the use of std::less on pointers in TopoSort
This commit is contained in:
parent
2033df5958
commit
41b41fefb3
1 changed files with 2 additions and 0 deletions
|
|
@ -131,6 +131,8 @@ public:
|
||||||
|
|
||||||
template <typename T, typename C = std::less<T>> class TopoSort
|
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:
|
public:
|
||||||
// We use this ordering of the edges in the adjacency matrix for
|
// We use this ordering of the edges in the adjacency matrix for
|
||||||
// exact compatibility with an older implementation.
|
// exact compatibility with an older implementation.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue