Skip to content

Bump version to 0.2.0#5

Merged
FrozenLemonTee merged 57 commits intomainfrom
refactor-operations
Mar 17, 2026
Merged

Bump version to 0.2.0#5
FrozenLemonTee merged 57 commits intomainfrom
refactor-operations

Conversation

@FrozenLemonTee
Copy link
Member

No description provided.

…tic, error handling, and concurrency policies
… policy, concurrency policy, custom underlying, custom policy, and custom operations
Copilot AI review requested due to automatic review settings March 17, 2026 15:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the project version to 0.2.0 while also landing a substantial refactor of the primitives “policy/operation” stack to a handler-protocol + dispatcher pipeline architecture, plus updated tests and a refreshed set of examples.

Changes:

  • Introduces policy handler protocol modules (policy.handler, policy.utility) and reworks built-in policies/tags into category sub-namespaces (policy::value::*, policy::type::*, etc.).
  • Replaces the previous operations implementation with capability-tagged operations + a central dispatcher/invoker pipeline (concurrency → value → error).
  • Updates/expands tests and replaces the single “basic” example with a set of focused examples (CMake + xmake).

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/basic/test_templates.cpp Adds custom underlying/rep-type test coverage (custom numeric-like reps, rep validation, dispatcher behavior).
tests/basic/test_policies.cpp Updates policy tag names and adds protocol/concurrency/capability tests.
tests/basic/test_operations.cpp Rewrites operations tests for the new dispatcher + policy pipeline (value/error/type/concurrency behaviors).
src/underlying/traits.cppm Extends underlying rep-type eligibility to allow “custom numeric-like” rep types and adjusts category consistency rules.
src/primitive/traits.cppm Updates default policy resolution to use policy::defaults::*.
src/policy/utility.cppm New: priority-based policy selection/merging utilities (common_policies_t).
src/policy/traits.cppm Simplifies policy traits to concepts only (policy tags/merging moved out).
src/policy/policy.cppm Exports new policy submodules (policy.handler, policy.utility).
src/policy/impl.cppm Defines built-in policy tags in category namespaces + default handler specializations.
src/policy/handler.cppm New: defines handler protocol contracts and shared types for error/value/type/concurrency policy layers.
src/operations/traits.cppm Refactors operations traits into arity/capability metadata and validation concepts.
src/operations/operators.cppm Implements operations::apply/add/sub/mul/div/equal/not_equal + operator overloads routed through the dispatcher.
src/operations/operations.cppm Re-exports dispatcher as part of the operations entry module.
src/operations/invoker.cppm New: runtime value op bindings + checked/unchecked/saturating arithmetic and error construction helpers.
src/operations/impl.cppm Redefines built-in operation tags (Addition/Subtraction/…) and their capability metadata.
src/operations/dispatcher.cppm New: compile-time negotiation + runtime pipeline dispatcher (rep validation, normalization, handler chaining).
examples/xmake.lua Replaces single example target with a loop building multiple example binaries.
examples/ex01_default_arithmetic.cpp New: demonstrates default arithmetic through operators/dispatcher.
examples/ex02_type_policy.cpp New: demonstrates strict vs compatible type policy negotiation (compile-time).
examples/ex03_value_policy.cpp New: demonstrates checked/unchecked/saturating overflow behavior.
examples/ex04_error_policy.cpp New: demonstrates expected vs throwing error behavior.
examples/ex05_concurrency_policy.cpp New: demonstrates atomic concurrency policy consistency under concurrency.
examples/ex06_custom_underlying.cpp New: demonstrates custom underlying traits + rep validation mapped to domain errors.
examples/ex07_custom_policy.cpp New: demonstrates implementing custom policy handlers and op bindings.
examples/ex08_custom_operation.cpp New: demonstrates adding custom operations + runtime bindings.
examples/basic.cpp Removes the old monolithic basic example.
examples/CMakeLists.txt New: builds each example as its own executable linked against the library.
README.md Updates documentation to the new policy tag namespaces and protocol surface.
CMakeLists.txt Bumps version to 0.2.0; switches module file globbing to CONFIGURE_DEPENDS; moves examples to subdirectory.
.github/prompts/plan-policyBehaviorProtocol.prompt.md New: design/plan doc describing the policy behavior protocol and dispatcher approach.
.github/copilot-instructions.md Links the current in-progress plan under .github/prompts/.
.agents/docs/architecture.md Documents stdlib usage convention for modules (headers in global module fragment; avoid import std;).

You can also share your feedback on Copilot code review. Take the survey.

@FrozenLemonTee FrozenLemonTee merged commit 298978f into main Mar 17, 2026
3 checks passed
@FrozenLemonTee FrozenLemonTee deleted the refactor-operations branch March 17, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants