Skip to content

Fix for clang 15 and older boost versions that still use std::unary_function

Dave Moxey requested to merge dmoxey/nektar:fix/clang-15-old-boost into master

Issue/feature addressed

Some older versions of boost (e.g. 1.76) still use std::unary_function and std::binary_function which have been deprecated in C++17. New versions of clang (15+) have removed this, causing a compilation error with C++17.

Proposed solution

This MR fixes this by adding the _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION definition if Clang or AppleClang are found at version >= 15.

Tests

A new tester has been added for bookworm using clang 15.

Suggested reviewers

@ccantwel

Checklist

  • [ ] Functions and classes, or changes to them, are documented.
  • [ ] User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • [ ] License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Dave Moxey

Merge request reports