use feature test macro to check feature available #15
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.
Reason
thread-pool is a great modern and tiny thread pool. However, using the compiler version to check move_only_function is not solid. For example:
I used g++-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0. The library could not compile due to:
error: ‘move_only_function’ in namespace ‘std’ does not name a template type
25 | using default_function_type = std::move_only_function<void()>;
| ^~~~~~~~~~~~~~~~~~
Here is the ci for detailed information.
Hence, I tried to use feature testing instead and it works well.
I am sure that I may have missed something. :)