util: prevector's move ctor and move assignment is noexcept

Move operations already are `noexcept`, so add the keyword to the methods.
This makes the `PrevectorFillVectorIndirect...` benchmarks about twice
as fast on my machine, because otherwise `std::vector` has to use a copy
when the vector resizes.
This commit is contained in:
Martin Leitner-Ankerl 2023-03-26 15:39:20 +02:00
parent d380d2877e
commit 81f67977f5

View file

@ -264,7 +264,7 @@ public:
fill(item_ptr(0), other.begin(), other.end());
}
prevector(prevector<N, T, Size, Diff>&& other) {
prevector(prevector<N, T, Size, Diff>&& other) noexcept {
swap(other);
}
@ -276,7 +276,7 @@ public:
return *this;
}
prevector& operator=(prevector<N, T, Size, Diff>&& other) {
prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
swap(other);
return *this;
}