GF2::Vector — Swap All Content

Swap the bits of this bit-vector with that of another.

constexpr Vector &swap(Vector &other);

Method returns a reference to *this so it can be chained with other calls.

Example
#include <GF2/GF2.h>
int main()
{
    GF2::Vector<> u("00"), v("1111");
    std::cout << "u, v: " << u << ", " << v << '\n';
    u.swap(v);
    std::cout << "u, v: " << u << ", " << v << '\n';
}
Output
u, v: 00, 1111
u, v: 1111, 00