Skip to content

Enhance algorithms and limits modules with improved functionality and tests#19

Merged
FrozenLemonTee merged 7 commits intomainfrom
feat-algorithms
Mar 26, 2026
Merged

Enhance algorithms and limits modules with improved functionality and tests#19
FrozenLemonTee merged 7 commits intomainfrom
feat-algorithms

Conversation

@FrozenLemonTee
Copy link
Copy Markdown
Member

No description provided.

…dependencies for algorithms and conversion layers

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
…eval

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
Signed-off-by: FrozenlemonTee <1115306170@qq.com>
…mports

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
…ionality

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
… type limits handling

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
Copilot AI review requested due to automatic review settings March 26, 2026 16:04
Copy link
Copy Markdown
Contributor

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 introduces an algorithms module layer (starting with limits and hash) and refactors existing modules to consume this shared “value metadata” API instead of directly using std::numeric_limits, with new basic tests to validate behavior for built-in and custom underlying types.

Changes:

  • Add mcpplibs.primitives.algorithms module with limits and hash facilities.
  • Refactor operations::invoker and conversion::underlying to use algorithms::{min,max,lowest}_value and algorithms::limits.
  • Add new basic test suites for algorithms/limits and algorithms/hash, and wire them into the basic test CMake.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/basic/algorithms/limits/test_limits.cpp Adds unit tests for algorithms::limits on builtin + custom underlying types.
tests/basic/algorithms/hash/test_hash.cpp Adds unit tests for algorithms::hash/hash_value on builtin + custom underlying types.
tests/basic/CMakeLists.txt Adds basic_algorithms_tests suite and includes it in basic_tests dependencies.
src/primitives.cppm Re-exports the new mcpplibs.primitives.algorithms module from the umbrella module.
src/operations/invoker.cppm Replaces std::numeric_limits usage with algorithms limit queries for overflow/shift checks.
src/conversion/underlying.cppm Replaces std::numeric_limits usage with algorithms limit queries in risk/cast logic.
src/algorithms/limits.cppm Introduces algorithms::limits and {min,lowest,max,epsilon,infinity,quiet_nan}_value APIs.
src/algorithms/hash.cppm Introduces algorithms::hash, hashable, and hash_value, including an underlying-type adapter.
src/algorithms/algorithms.cppm Adds the mcpplibs.primitives.algorithms aggregator module exporting hash + limits.
.agents/docs/plans/implementation-plan.md Updates internal implementation plan with clarified layering/dependency direction.

…ed hashing functionality

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
@FrozenLemonTee FrozenLemonTee merged commit bb5e527 into main Mar 26, 2026
3 checks passed
@FrozenLemonTee FrozenLemonTee deleted the feat-algorithms branch March 26, 2026 16:21
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