Fix deprecation of result_of in C++17#3681
Merged
pljones merged 1 commit intojamulussoftware:mainfrom May 8, 2026
Merged
Conversation
pljones
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
AUTOBUILD: Please build all targets