Skip to content

Conversation

@eramongodb
Copy link
Contributor

Resolves CXX-3237 and CXX-3238 for the v1::delete_many_options and v1::delete_one_options components.

The to_v1() helper is not supported due to ambiguity (many vs. one): an explicit cast to the target type is required. This is similar to bsoncxx::v1::element::view which lacks a from_v1() to either v_noabi::array::element or v_noabi::document::element due to ambiguity.

@eramongodb eramongodb requested a review from kevinAlbs December 3, 2025 20:21
@eramongodb eramongodb self-assigned this Dec 3, 2025
@eramongodb eramongodb requested a review from a team as a code owner December 3, 2025 20:21
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM with comment fix-ups.

///
/// Convert to the @ref mongocxx::v_noabi equivalent of `v`.
///
/// @note The `ordered` field is initialized as unset.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove non-applicable comment:

Suggested change
/// @note The `ordered` field is initialized as unset.

return {std::move(v)};
}

// Ambiguous whether `v_noabi::options::delete` should be converted to `v1::delete_many_options` or
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Ambiguous whether `v_noabi::options::delete` should be converted to `v1::delete_many_options` or
// Ambiguous whether `v_noabi::options::delete_options` should be converted to `v1::delete_many_options` or

Comment on lines 301 to 302
// v1::delete_many_options to_v1(v_noabi::options::delete const& v);
// v1::delete_one_options to_v1(v_noabi::options::delete const& v);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// v1::delete_many_options to_v1(v_noabi::options::delete const& v);
// v1::delete_one_options to_v1(v_noabi::options::delete const& v);
// v1::delete_many_options to_v1(v_noabi::options::delete_options const& v);
// v1::delete_one_options to_v1(v_noabi::options::delete_options const& v);

@eramongodb eramongodb merged commit 4e8f2ca into mongodb:master Dec 4, 2025
1 of 2 checks passed
@eramongodb eramongodb deleted the cxx-abi-v1-delete_options branch December 4, 2025 20:49
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