From bcdcf24f3528f23c47c094b89781a4977b91826f Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Sun, 24 Mar 2024 22:24:06 -0400 Subject: [PATCH] net: make IteratorComparator's operator const Although this is okay to be sloppy on c++11, it is not okay when using c++17. See: https://cplusplus.github.io/LWG/issue2542 --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 4e51f70e5..832ca33a5 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -43,7 +43,7 @@ std::atomic nTimeBestReceived(0); // Used only to inform the wallet of struct IteratorComparator { template - bool operator()(const I& a, const I& b) + bool operator()(const I& a, const I& b) const { return &(*a) < &(*b); }