feat(concepts): integrate C++20 Concepts with unified thread_concepts.h#279
Merged
Conversation
- Create centralized C++20 Concepts header for thread_system - Define Callable, VoidCallable, ReturningCallable concepts - Define JobType, JobCallable, PoolJob concepts - Add Duration and FutureLike type detection concepts - Provide C++17 fallback using constexpr bool - Re-export concepts to detail namespace for backward compatibility Part of #271, closes #272
- Remove duplicated concept definitions (Callable, VoidCallable, etc.) - Import concepts from thread_concepts.h instead - Fix callable_eraser with proper move semantics and destructor - Use requires clause for C++20 concepts where applicable - Maintain C++17 fallback compatibility Part of #271, closes #273
- Document new thread_concepts.h header and unified concepts - Document pool_traits.h and type_traits.h refactoring - List all new concepts and type traits added - Note backward compatibility and C++17 fallback support Part of #271
Contributor
📊 Performance Benchmark ResultsPerformance Benchmark ReportNo benchmark data available. ℹ️ No baseline reference availableThis is the first benchmark run or baseline file is missing. |
7 tasks
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
….h (#279) * feat(concepts): add unified thread_concepts.h header - Create centralized C++20 Concepts header for thread_system - Define Callable, VoidCallable, ReturningCallable concepts - Define JobType, JobCallable, PoolJob concepts - Add Duration and FutureLike type detection concepts - Provide C++17 fallback using constexpr bool - Re-export concepts to detail namespace for backward compatibility Part of #271, closes #272 * refactor(pool_traits): use unified thread_concepts.h - Remove duplicated concept definitions (Callable, VoidCallable, etc.) - Import concepts from thread_concepts.h instead - Fix callable_eraser with proper move semantics and destructor - Use requires clause for C++20 concepts where applicable - Maintain C++17 fallback compatibility Part of #271, closes #273 * refactor(type_traits): use unified thread_concepts.h - Remove duplicated JobType and JobCallable concept definitions - Import concepts from thread_concepts.h instead - Use requires clause for C++20 concepts where applicable - Simplify template constraints using concepts directly - Maintain C++17 fallback compatibility Part of #271, closes #274 * docs(changelog): add C++20 concepts integration entry - Document new thread_concepts.h header and unified concepts - Document pool_traits.h and type_traits.h refactoring - List all new concepts and type traits added - Note backward compatibility and C++17 fallback support Part of #271
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.
Summary
thread_concepts.hheader centralizing all C++20 Conceptspool_traits.handtype_traits.hto use centralized conceptsChanges
New Files
include/kcenon/thread/concepts/thread_concepts.h: Unified concepts headerModified Files
include/kcenon/thread/core/pool_traits.h: Use thread_concepts.hinclude/kcenon/thread/impl/typed_pool/type_traits.h: Use thread_concepts.hdocs/CHANGELOG.md: Document changesConcepts Added
CallableVoidCallableReturningCallableCallableWith<F, Args...>DurationFutureLikeJobTypeJobCallablePoolJobBackward Compatibility
constexpr booldetailnamespaceTest plan
Closes #271, closes #272, closes #273, closes #274