From: Michael Beach Date: Sat, 9 Feb 2019 15:06:18 +0000 (+0900) Subject: bindings: cxx: make bitset_cmp::operator() const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c34d74a7e66cbea0cf1a8593a93e5928a3c05661;p=qemu-gpiodev%2Flibgpiod.git bindings: cxx: make bitset_cmp::operator() const This fixes build problems with clang and libc++ and such constness is now required by C++17 (see https://cplusplus.github.io/LWG/issue2542). Signed-off-by: Michael Beach Signed-off-by: Bartosz Golaszewski --- diff --git a/bindings/cxx/line_bulk.cpp b/bindings/cxx/line_bulk.cpp index c93f364..e52d33d 100644 --- a/bindings/cxx/line_bulk.cpp +++ b/bindings/cxx/line_bulk.cpp @@ -29,7 +29,7 @@ const ::std::map reqtype_mapping = { struct bitset_cmp { - bool operator()(const ::std::bitset<32>& lhs, const ::std::bitset<32>& rhs) + bool operator()(const ::std::bitset<32>& lhs, const ::std::bitset<32>& rhs) const { return lhs.to_ulong() < rhs.to_ulong(); }