Fix compatibility with Boost 1.81

Cherry-picked from !3948 (merged) - @clemenci FYI

Merge request reports

Loading