Skip to content

Commit

Permalink
Fix for equality comparable operator== infinite loop issue
Browse files Browse the repository at this point in the history
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
  • Loading branch information
srikrishnagopu authored and facebook-github-bot committed Jun 24, 2024
1 parent 1975e0a commit 13a6519
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/fbcode_builder/manifests/boost
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ boost-static
[build]
builder = boost
job_weight_mib = 512
patchfile = boost_comparator_operator_fix.patch

[b2.args]
--with-atomic
Expand Down
11 changes: 11 additions & 0 deletions build/fbcode_builder/patches/boost_comparator_operator_fix.patch
Original file line number Diff line number Diff line change
@@ -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;} \
};

0 comments on commit 13a6519

Please sign in to comment.