Page MenuHomePhabricator

validation, test, bench: make CScriptCheck and prevector swap member functions noexcept
ClosedPublic

Authored by PiRK on Feb 28 2023, 13:09.

Details

Summary

Reason:
A swap must not fail; when a class has a swap member function, it should be declared noexcept.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c84-a-swap-function-must-not-fail

This is a backport of core#25017

Test Plan

ninja all check-all bench-bitcoin bitcoin-fuzzers

Event Timeline

PiRK requested review of this revision.Feb 28 2023, 13:09
Fabien retitled this revision from validation, test, becnh: make CScriptCheck and prevector swap member functions noexcept to validation, test, bench: make CScriptCheck and prevector swap member functions noexcept.
This revision is now accepted and ready to land.Feb 28 2023, 13:29