-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Make TransformRange fulfill range concept #3971
feat: Make TransformRange fulfill range concept #3971
Conversation
This allows using it with range algorithms
WalkthroughEnhance iterator functionality and integration with C++ ranges, the changes do. A default constructor and post-increment operator overload, added to Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
Tests/UnitTests/Core/Utilities/TransformRangeTests.cpp (1)
149-153
: Wise to test const pointers, it is! Yet consistency, we must maintain.Good, the test of const pointer ranges is. But suggest I do, to use BOOST_CHECK_EQUAL_COLLECTIONS like the other tests, for consistency's sake, hmm.
- BOOST_CHECK(unpacked == std::vector<int>({1, 2, 3})); + std::vector<int> exp = {1, 2, 3}; + BOOST_CHECK_EQUAL_COLLECTIONS(exp.begin(), exp.end(), unpacked.begin(), + unpacked.end());
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
Core/include/Acts/Utilities/TransformRange.hpp
(3 hunks)Tests/UnitTests/Core/Utilities/TransformRangeTests.cpp
(4 hunks)
🔇 Additional comments (5)
Core/include/Acts/Utilities/TransformRange.hpp (3)
172-173
: Wise addition to the force, this default constructor is!
Fulfill the C++ range concept requirements, this change does. Properly implemented with '= default', it is.
189-195
: Correctly implemented, the post-increment operator is!
Follow the canonical pattern, this implementation does:
- Copy the current state, it does
- Increment the original, it does
- Return the copy, it does
Complete, the range concept requirements now are!
233-235
: Strong with the Force, this specialization is!
Enable the use of TransformRange with standard range algorithms, this specialization does. Correctly placed in the std::ranges namespace, it is. A borrowed range, it declares TransformRange to be, allowing efficient use of range algorithms without ownership transfer, hmm.
Tests/UnitTests/Core/Utilities/TransformRangeTests.cpp (2)
105-111
: Well crafted, these tests are!
Verify the non-const range transformation capabilities, this test does. With std::ranges::transform, it works harmoniously.
123-128
: Strong in const correctness, these tests are!
Verify the const range transformation capabilities, this test does. The path to robust code, thorough testing is!
Quality Gate passedIssues Measures |
This PR implements building a tracking geometry using the blueprint building mechanism. ``` +---------------+ +-----------+ | | | | | Root | | v | | | +---------------+ +---------------+ | | | | | | Child 1 | +----------+ | | | v +----------+ +---------------+ +---------------+ | | | +--------------+ | Child 2 | v +----------+ | | .---------. | | +---------------+ / \ | v ( Proc node ) | +---------------+ `. ,' | | | `-------' | | Child 3 | | | | | | | +---------------+ +---------+ ``` The construction phases are documented in @c BlueprintNode, which is the base class for all nodes in the tree. Part of: - #3502 Blocked by: - #3816 - #3818 - #3971
This allows using it with range algorithms
--- END COMMIT MESSAGE ---
Summary by CodeRabbit
New Features
TransformRange
.Tests
TransformRange
instances into standard vectors, improving test robustness and ensuring correct transformation logic.