Skip to content

Fix deprecation of result_of in C++17#3681

Merged
pljones merged 1 commit intojamulussoftware:mainfrom
softins:cpp17-resultof-deprecation
May 8, 2026
Merged

Fix deprecation of result_of in C++17#3681
pljones merged 1 commit intojamulussoftware:mainfrom
softins:cpp17-resultof-deprecation

Conversation

@softins
Copy link
Copy Markdown
Member

@softins softins commented May 8, 2026

Short description of changes

Fixes a deprecation warning for result_of used in threadpool.h, when compiling in C++17 or later. In this case, invoke_result_t should be used instead, with slightly different syntax. In the CI with this change, invoke_result_t is used for Android and macOS, and result_of is used on Linux, macOS Legacy, iOS and Windows.

CHANGELOG: Internals: fix deprecation warnings in threadpool.h for C++17 onwards

Context: Fixes an issue?

I discovered this deprecation while compiling on FreeBSD 15, and subsequently noticed it also occurs in the CI build for macOS (non-legacy). Thanks to ChatGPT for the suggested fix.

Does this change need documentation? What needs to be documented and how?

No. Compilation enhancement only.

Status of this Pull Request

Tested locally and on all CI platforms.

What is missing until this pull request can be merged?

Nothing.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

AUTOBUILD: Please build all targets

@softins softins added this to the Release 4.0.0 milestone May 8, 2026
@softins softins requested review from ann0see and pljones May 8, 2026 13:41
@softins softins self-assigned this May 8, 2026
@softins softins added the refactoring Non-behavioural changes, Code cleanup label May 8, 2026
@softins softins added this to Tracking May 8, 2026
@github-project-automation github-project-automation Bot moved this to Triage in Tracking May 8, 2026
@pljones pljones merged commit 17cc731 into jamulussoftware:main May 8, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Done in Tracking May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Non-behavioural changes, Code cleanup

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants