aboutsummaryrefslogtreecommitdiff
path: root/src/test/prevector_tests.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2022-04-28 13:33:57 +0200
committerJon Atack <jon@atack.com>2022-04-28 20:34:43 +0200
commite5485e8e4be7f2ee0671f58c3dcce35c68ba0ee0 (patch)
tree0aa75159fb49606730d74080140f224ed4c8b01a /src/test/prevector_tests.cpp
parentabc1ee509025d92db5311c3f5df3b61c09cad24f (diff)
test, bench: make prevector and checkqueue swap member functions noexcept
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
Diffstat (limited to 'src/test/prevector_tests.cpp')
-rw-r--r--src/test/prevector_tests.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp
index 89814748fe..3977a3d548 100644
--- a/src/test/prevector_tests.cpp
+++ b/src/test/prevector_tests.cpp
@@ -165,7 +165,8 @@ public:
test();
}
- void swap() {
+ void swap() noexcept
+ {
real_vector.swap(real_vector_alt);
pre_vector.swap(pre_vector_alt);
test();