From 10240170ac93e6f0e29f6c3c9d6527425bd8ec77 Mon Sep 17 00:00:00 2001 From: Maciej Babinski Date: Thu, 9 Sep 2021 11:11:59 -0500 Subject: [PATCH 1/2] Silence clang warnings about ambiguous operator overload rules in C++20. --- elf/elf++.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/elf++.hh b/elf/elf++.hh index ee59ed0..d16ea09 100644 --- a/elf/elf++.hh +++ b/elf/elf++.hh @@ -423,12 +423,12 @@ public: return *this; } - bool operator==(iterator &o) const + bool operator==(const iterator &o) const { return pos == o.pos; } - bool operator!=(iterator &o) const + bool operator!=(const iterator &o) const { return pos != o.pos; } From f911dfdcc232571f9c9f6f9dbad7b5ac37908a64 Mon Sep 17 00:00:00 2001 From: Maciej Babinski Date: Fri, 8 May 2020 14:24:23 -0500 Subject: [PATCH 2/2] Remove 'const' from non-const setter. --- elf/data.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elf/data.hh b/elf/data.hh index ed5c7a1..4a60944 100644 --- a/elf/data.hh +++ b/elf/data.hh @@ -553,7 +553,7 @@ struct Sym return (stb)(info >> 4); } - void set_binding(stb v) const + void set_binding(stb v) { info = (info & 0xF) | ((unsigned char)v << 4); }