Skip to content

Fix some compilation issues on modern macOS systems#6709

Merged
SiarheiFedartsou merged 2 commits intomasterfrom
danpat_apple_clang_15_fixes
Oct 12, 2023
Merged

Fix some compilation issues on modern macOS systems#6709
SiarheiFedartsou merged 2 commits intomasterfrom
danpat_apple_clang_15_fixes

Conversation

@danpat
Copy link
Copy Markdown
Member

@danpat danpat commented Oct 6, 2023

Apple clang 15 doesn't like some of our coding practices, notably some use of:

std::find_if
std::adjacent_find

where we're not interested in the return values, just the side-effects of the lambda functions. This PR adds dummy variables to hold the results, and marks them as [[maybe_unused]], which appeases the compiler.

I've also thrown in a workaround to boostorg/phoenix#111 which is preventing things from building when compiled against Boost 1.8x, which is the current version available in Homebrew on macOS.

I haven't actually tested anything here, I just know it all compiles cleanly on my Apple M1 machine now.

Should address most of #6707 - I didn't observe the issues with std::unary_function when using Boost 1.8x

@SiarheiFedartsou SiarheiFedartsou merged commit 31e31a6 into master Oct 12, 2023
@SiarheiFedartsou SiarheiFedartsou deleted the danpat_apple_clang_15_fixes branch October 12, 2023 21:04
eliseier pushed a commit to wanderlog/osrm-backend that referenced this pull request Mar 25, 2025
* Fix various compiler warnings generated by Apple clang 15, and workaround some boost 1.8 bugs

* Fix formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants