Repository navigation
LazyInit: Delete unused move assignment operator - #17107
Conversation
|
I had another, deeper, look and it looks like the move assignment operator of |
|
We can't compile code that uses it thanks to |
Thanks @blishko and @clonker. I agree with removing the unused operator. I’ve changed LazyInit’s move assignment to = delete, replaced the previous test with a compile-time check, and force-pushed the revision as a single commit. I’ve also updated the PR description. Please take another look when you have a chance. |
Signed-off-by: kediyalua <kediyalua@outlook.com>
Description
util::LazyInit::operator=(LazyInit&&)previously had no return statement. Instantiating it produces a-Wreturn-typewarning, which becomes a build error under-Werror. Since the operator is unused in the codebase, it is now explicitly deleted:Following the review feedback,
test/libsolutil/LazyInit.cppis unchanged from the base branch. This PR changes onlylibsolutil/LazyInit.h.No
Changelog.mdentry: the operator was unused and could not be compiled with-Werror.Checklist
AI Disclosure
AI assistance was used for the reviewer-requested revisions and targeted verification.
Test plan
libsolutil/LazyInit.hwith only the Boost-dependentAssertions.handExceptions.hstubbed out, usingclang++ -std=c++23 -Wall -Wextra -Werror.