-
Notifications
You must be signed in to change notification settings - Fork 549
CXX-2745 add aliases and deprecations for v1 renames #1463
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
Changes from 5 commits
9d7c6a0
8d24fd9
7362532
796373a
ab3e030
5f210c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -49,6 +49,8 @@ namespace bson_value { | |||||
| /// For accessors into this type and to extract the various BSON types out, | ||||||
| /// please use bson_value::view. | ||||||
| /// | ||||||
| /// @deprecated Use @ref bsoncxx::v_noabi::types::value instead (renamed). | ||||||
| /// | ||||||
| /// @see | ||||||
| /// - @ref bsoncxx::v_noabi::types::bson_value::view | ||||||
| /// | ||||||
|
|
@@ -254,7 +256,7 @@ class value { | |||||
| /// @throws bsoncxx::v_noabi::exception if the type's value is not k_maxkey, k_minkey, or | ||||||
| /// k_undefined. | ||||||
| /// | ||||||
| /* explicit(false) */ BSONCXX_ABI_EXPORT_CDECL() value(type const id); | ||||||
| /* explicit(false) */ BSONCXX_ABI_EXPORT_CDECL() value(v_noabi::type const id); | ||||||
|
|
||||||
| /// | ||||||
| /// Constructs one of the following BSON values (each specified by the parenthesized type): | ||||||
|
|
@@ -297,6 +299,24 @@ class value { | |||||
| return _value; | ||||||
| } | ||||||
|
|
||||||
| /// | ||||||
| /// Returns the type of the underlying BSON value stored in this object. | ||||||
| /// | ||||||
| /// @deprecated Use @ref type_id() const instead (renamed). | ||||||
| /// | ||||||
| v_noabi::type type() const { | ||||||
| return this->view().type(); | ||||||
| } | ||||||
|
|
||||||
| /// | ||||||
| /// Equivalent to @ref type() const. | ||||||
| /// | ||||||
| /// To support incremental migration to @ref bsoncxx::v1::types::view. | ||||||
|
||||||
| /// To support incremental migration to @ref bsoncxx::v1::types::view. | |
| /// To support incremental migration to @ref bsoncxx::v1::types::value. |
Are the added type, type_id and get_<type> methods intended for feature parity with bsoncxx::v1::types::value? I expect this may not strictly be needed to ease migration since existing applications would not have calls to these methods.
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.
Not for feature parity, but for name parity, so that when root namespace redeclarations are updated from v_noabi to v1, the required changes can be minimized in advance by downstream users without forced-breaking-changes:
bsoncxx::types::view v; // Syntax is the same for v_noabi and v1.
v.type_view(); // Syntax is the same for v_noabi and v1.When bsoncxx::types::view is updated from v_noabi::types::view to v1::types::view, code which have already been incrementally updated (as part of a API minor version release) to use the new names will not be broken by the redeclaration release (as part of a API major version release) to the same extent as if the v_noabi new-name equivalents were not available.
Uh oh!
There was an error while loading. Please reload this page.