[PATCH] operator==() is supposed to be a const-method, at least c++20 requires

Денис Пронин dannftk@yandex.ru
Fri Jan 3 07:40:21 GMT 2025


Please, consider applying the patch

---

 From 8efed2f0602a8d5cb33af16d6314c2a87643d4db Mon Sep 17 00:00:00 2001
From: Denis Pronin <dannftk@yandex.ru>
Date: Fri, 3 Jan 2025 10:11:01 +0300
Subject: [PATCH] operator==() is supposed to be a const-method, at least 
c++20
  requires

Signed-off-by: Denis Pronin <dannftk@yandex.ru>
---
  session.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/session.h b/session.h
index 9c54925c8..8d6ce44e4 100644
--- a/session.h
+++ b/session.h
@@ -95,7 +95,7 @@ struct statistic_decl
    int64_t linear_step;
    int bit_shift;
    int stat_ops;
-  bool operator==(statistic_decl const & other)
+  bool operator==(statistic_decl const & other) const
    {
      return type == other.type
        && linear_low == other.linear_low
-- 
2.45.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-operator-is-supposed-to-be-a-const-method-at-least-c.patch
Type: text/x-patch
Size: 748 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/systemtap/attachments/20250103/ffb5f448/attachment.bin>


More information about the Systemtap mailing list