-
Notifications
You must be signed in to change notification settings - Fork 402
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
iox-#2052 Refactor copy_and_move_impl #2105
iox-#2052 Refactor copy_and_move_impl #2105
Conversation
Refactor copy_and_move_impl by new struct `SpecialCreationHelper` and enum class `SpecialCreationOperations` with C++17 features. Deleter __cplusplus branchs. Signed-off-by: Dennis Liu <[email protected]>
When we commit, Clang Format should have already been applied once. However, the CI process failed. I suspect it's due to an issue with inappropriate new lines. Signed-off-by: Dennis Liu <[email protected]>
Signed-off-by: Dennis Liu <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2105 +/- ##
==========================================
+ Coverage 80.28% 80.30% +0.02%
==========================================
Files 417 418 +1
Lines 16121 16143 +22
Branches 2250 2252 +2
==========================================
+ Hits 12942 12963 +21
- Misses 2384 2385 +1
Partials 795 795
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@elBoberido Please review this when you have a moment. Thank you :) |
@Dennis40816 it's on my todo list for today. I hope I find some time :) |
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.
Nice. Looks good overall. I think this could be moved to iceoryx_hoofs/design
in a follow up PR. Then the discussion about names might get hot :)
iceoryx_dust/container/include/iox/detail/fixed_position_container.inl
Outdated
Show resolved
Hide resolved
iceoryx_dust/container/include/iox/detail/fixed_position_container.inl
Outdated
Show resolved
Hide resolved
iceoryx_dust/container/include/iox/detail/fixed_position_container_helper.hpp
Outdated
Show resolved
Hide resolved
iceoryx_dust/container/include/iox/detail/fixed_position_container_helper.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Dennis Liu <[email protected]>
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.
Great job. Like already mentioned, the helper struct could be reused by other classes and it would be great if you had some time to move it to iceoryx_hoofs/design
and write a small design document in doc/design
. Just copy _template.md
. If a sections does not apply just delete it.
I think it could be done as part of #1686. If you want to test the abstraction on another class then #1517 would be ideal :)
No problem. I'll create an new issue about moving it to |
Refactor
FixedPositionContainer::copy_and_move_impl
by new structSpecialCreationHelper
and enum classSpecialCreationOperations
with C++17 features.Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)iceoryx_hoofs
are added to./clang-tidy-diff-scans.txt
Notes for Reviewer
I implement a prototype named
SpecialCreationHelper
according to previous discussion.If it looks good to you, I'll create another issue to move the helper class to
design
module.Btw, I have no idea if
move_or_copy
andmove_or_copy_it
are needed or not. These functions currently cause twice timemoveCtor
calls problem (See example). Currently, I directly useif constexpr
to pass correct value. If you think they are unnecessary, I will delete related comment and code.Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References
FixedPositionContainer
#2069