-
Notifications
You must be signed in to change notification settings - Fork 548
v1: delete_many_options and delete_one_options (CXX-3237, CXX-3238) #1527
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
v1: delete_many_options and delete_one_options (CXX-3237, CXX-3238) #1527
Conversation
kevinAlbs
left a comment
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.
LGTM with comment fix-ups.
| /// | ||
| /// Convert to the @ref mongocxx::v_noabi equivalent of `v`. | ||
| /// | ||
| /// @note The `ordered` field is initialized as unset. |
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.
Remove non-applicable comment:
| /// @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 |
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.
| // 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 |
| // v1::delete_many_options to_v1(v_noabi::options::delete const& v); | ||
| // v1::delete_one_options to_v1(v_noabi::options::delete const& v); |
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.
| // 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); |
Resolves CXX-3237 and CXX-3238 for the
v1::delete_many_optionsandv1::delete_one_optionscomponents.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 tobsoncxx::v1::element::viewwhich lacks afrom_v1()to eitherv_noabi::array::elementorv_noabi::document::elementdue to ambiguity.