Skip to content

Conversation

@ronen-fr
Copy link
Contributor

as a non-default, non-noexcept move constructor is expected to
be 'noexcept'. Otherwise - it is ignored by stl containers.

See clang-tidy's performance-noexcept-move-constructor

@ronen-fr ronen-fr requested a review from a team as a code owner September 28, 2023 12:12
@github-actions github-actions bot added the core label Sep 28, 2023
src/osd/PG.h Outdated
class PGLockWrapper {
public:
explicit PGLockWrapper(PGRef locked_pg) : m_pg{locked_pg} {}
explicit PGLockWrapper(PGRef locked_pg) : m_pg{std::move(locked_pg)} {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably simpler to template the argument and use std::forward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified as suggested.

@ronen-fr
Copy link
Contributor Author

@ljflores, @yuriw - can this be added to the next 'main' run?

as a non-default, non-noexcept move ctor is ignored by
stl containers.

See clang-tidy's performance-noexcept-move-constructor

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
@ronen-fr
Copy link
Contributor Author

ronen-fr commented Dec 3, 2023

Merging based on Teuthology runs.

@ronen-fr ronen-fr merged commit 6594540 into ceph:main Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants