-
Notifications
You must be signed in to change notification settings - Fork 285
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
Add DART_COMMON_DECLARE_SMART_POINTERS macro #1022
Conversation
I don't think we should ever completely remove Or if we do remove |
@mxgrey That makes sense, I missed the fact that we have some classes shouldn't be used with Instead, how about following changes:
|
The more I think about it, the less convinced I am of this direction. There are also classes like Consequently, I'm worried that natively providing something like a If a user has a specific purpose in mind for which they want to manage a resource with a Is there a specific motivation that I'm overlooking for trying to declare |
They are all valid points. I intend to use the new macro only to where it makes sense and won't replace The actual motivations of this change are (1) to use |
Codecov Report
@@ Coverage Diff @@
## release-6.4 #1022 +/- ##
============================================
Coverage 56.58% 56.58%
============================================
Files 314 314
Lines 24312 24312
============================================
Hits 13758 13758
Misses 10554 10554 |
@mxgrey By the last commits, this PR only (1) adds a new macro
Let me know what you think. |
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.
We could consider naming the macro DART_COMMON_MAKE_SMART_POINTERS
, but I approve either way.
I sort of regret that I didn't initially name the macro DART_COMMON_DECLARE_SHARED_WEAK
instead of saying ..._MAKE_...
. I think we should consider changing it to say _DECLARE_
instead, but it's very much not important.
I also slightly prefer using |
Changing the macro name and deprecating the old one sounds good to me! Making the "deprecation" warning cross-platform (i.e. work on Windows) is a little tricky, though. |
Summary
std::unique_ptr
declaration to the pointer declaration macrousing
instead of `typedefDART_COMMON_MAKE_SHARED_WEAK
toDART_COMMON_MAKE_POINTERS
If this change makes sense, I will replace the use ofDART_COMMON_MAKE_SHARED_WEAK
to the new macro.Before creating a pull request
clang-format
Before merging a pull request
CHANGELOG.md