Skip to content

Conversation

@depau
Copy link
Contributor

@depau depau commented May 12, 2022

This PR addresses the following:

  • Some move operators had the following check:

    if (this != &other) return *this;

    which is obviously a typo since you want to return this if it's the same, not if it's different.

  • (not really important) while I was there I also added noexcept to allow move operators to be used by the STL containers. See here for an explanation why

I highly recommend you try clangd and/or clang-tidy: I see in v4.0.0 you additionally have some missing returns in move ops, clangd would have easily caught it.

@RobLoach
Copy link
Owner

Thanks so much for this. Good catches. I'll have to check out clangd!

@RobLoach RobLoach merged commit 642d8e1 into RobLoach:master May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants