Skip to content

Conversation

@jll63
Copy link
Collaborator

@jll63 jll63 commented Oct 30, 2025

No description provided.

@jll63 jll63 requested a review from Copilot October 30, 2025 21:04
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 pull request refactors the policy initialization interface to pass a context object instead of iterator pairs, improving API consistency and enabling better access to initialization state. The changes update the initialize function signatures across policies and add proper documentation for the new InitializeContext and InitializeClass blueprints.

  • Refactored policy initialize methods to accept a context object instead of iterator pairs
  • Updated documentation to describe the new InitializeContext and InitializeClass blueprints
  • Removed unused option_base infrastructure and simplified option handling
  • Fixed parameter constness for finalize methods across policies

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/test_shared_virtual_ptr_value_semantics.cpp Removed space in cast expression for style consistency
include/boost/openmethod/preamble.hpp Added unspecified type, removed option_base, updated InitializeContext documentation, refactored option handling
include/boost/openmethod/policies/vptr_vector.hpp Updated initialize to accept context object, improved parameter constness
include/boost/openmethod/policies/vptr_map.hpp Updated initialize to accept context object, improved parameter constness
include/boost/openmethod/policies/fast_perfect_hash.hpp Updated initialize to use context object, refactored trace handling to use context members
include/boost/openmethod/initialize.hpp Added context methods to compiler, refactored trace handling, removed option_base checks, added MSVC workaround
include/boost/openmethod/core.hpp Moved unspecified type definition to preamble.hpp

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

//!
//! @return A forward iterator to the end of a range of @ref
//! InitializeClass objects.
detail::unspecified classes_end() const;
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

The InitializeContext blueprint is incomplete. It should document the has_option template member and the tr member, which are accessed in fast_perfect_hash.hpp at lines 193, 194, 226, and 227. These members are part of the actual context interface (provided by the compiler class) but are not documented in the blueprint.

Suggested change
detail::unspecified classes_end() const;
detail::unspecified classes_end() const;
//! Checks if a given option is enabled in the context.
//!
//! @tparam Option The option to check.
//! @return true if the option is enabled, false otherwise.
template <typename Option>
bool has_option() const;
//! Translation or type registry object associated with the context.
//!
//! The exact type is unspecified and provided by the compiler class.
detail::unspecified tr;

Copilot uses AI. Check for mistakes.
//! function arguments.
//! @param options Zero or more option objects.
//! @tparam Options... Zero or more option types.
//! @param ctx A Context object.
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

The @param ctx documentation is incorrect for the finalize method. This method does not have a ctx parameter - it only takes options. Remove the @param ctx line.

Suggested change
//! @param ctx A Context object.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@e5762bd). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop      #44   +/-   ##
==========================================
  Coverage           ?   93.03%           
==========================================
  Files              ?       40           
  Lines              ?     2713           
  Branches           ?     1226           
==========================================
  Hits               ?     2524           
  Misses             ?      159           
  Partials           ?       30           
Files with missing lines Coverage Δ
include/boost/openmethod/core.hpp 94.48% <ø> (ø)
include/boost/openmethod/initialize.hpp 93.93% <100.00%> (ø)
...de/boost/openmethod/policies/fast_perfect_hash.hpp 86.20% <100.00%> (ø)
include/boost/openmethod/policies/vptr_map.hpp 100.00% <100.00%> (ø)
include/boost/openmethod/policies/vptr_vector.hpp 100.00% <100.00%> (ø)
include/boost/openmethod/preamble.hpp 71.11% <ø> (ø)
test/test_shared_virtual_ptr_value_semantics.cpp 98.85% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5762bd...f7d47fb. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jll63 jll63 merged commit f7d47fb into boostorg:develop Oct 31, 2025
55 of 57 checks passed
@jll63 jll63 deleted the feature/initialize-context branch October 31, 2025 16:40
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.

1 participant