From 9a6dee395a6b75141075dc27fb293440ad8646f9 Mon Sep 17 00:00:00 2001 From: Srikrishna Gopu Date: Mon, 24 Jun 2024 15:15:03 -0700 Subject: [PATCH] Fix for equality comparable operator== infinite loop issue Summary: This is a patch that we are carrying in boost internally - D37196783 This is an open issue with C++20 - https://fburl.com/wtm7yhrm and the suggestion is to add explicit member candidates. More details in D37196783 Reviewed By: peygar, zechengh09 Differential Revision: D58957227 fbshipit-source-id: d48e218c26199180d192f3a174e54f900770aae3 --- build/fbcode_builder/manifests/boost | 1 + .../patches/boost_comparator_operator_fix.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 build/fbcode_builder/patches/boost_comparator_operator_fix.patch diff --git a/build/fbcode_builder/manifests/boost b/build/fbcode_builder/manifests/boost index 2900324a3..969f615bd 100644 --- a/build/fbcode_builder/manifests/boost +++ b/build/fbcode_builder/manifests/boost @@ -62,6 +62,7 @@ boost-static [build] builder = boost job_weight_mib = 512 +patchfile = boost_comparator_operator_fix.patch [b2.args] --with-atomic diff --git a/build/fbcode_builder/patches/boost_comparator_operator_fix.patch b/build/fbcode_builder/patches/boost_comparator_operator_fix.patch new file mode 100644 index 000000000..3771f2fff --- /dev/null +++ b/build/fbcode_builder/patches/boost_comparator_operator_fix.patch @@ -0,0 +1,11 @@ +diff --git a/boost/serialization/strong_typedef.hpp b/boost/serialization/strong_typedef.hpp +--- a/boost/serialization/strong_typedef.hpp ++++ b/boost/serialization/strong_typedef.hpp +@@ -44,6 +44,7 @@ + operator const T&() const {return t;} \ + operator T&() {return t;} \ + bool operator==(const D& rhs) const {return t == rhs.t;} \ ++ bool operator==(const T& lhs) const {return t == lhs;} \ + bool operator<(const D& rhs) const {return t < rhs.t;} \ + }; +