GF2::Vector — Join Two Bit-Vectors

Joins two arbitrary sized bit-vectors to get a longer one.

template<std::unsigned_integral Block, typename Allocator>
constexpr auto
join(const Vector<Block, Allocator> &lhs,
     const Vector<Block, Allocator> &rhs);
Example
#include <GF2/GF2.h>
int main()
{
    GF2::Vector<> u("11111111");
    GF2::Vector<> v("0000");
    std::cout << u << " joined with " << v << " yields " << join(u, v) << '\n';
    std::cout << v << " joined with " << u << " yields " << join(v, u) << '\n';
}
Output
11111111 joined with 0000 yields 111111110000
0000 joined with 11111111 yields 000011111111
See Also

append