Posts of the month: april 2014

2014-04-04

Variadic C++ functions for packing and unpacking bits

Shall you need variadic C++11 functions for packing and unpacking (a few) bits, here is what I have done for myself.

In most cases it's probably better to use std::bitset or any other container, but these two functions may provide a quick and easy way to pack some bits into an integer and the other way around, without using any specific class or container. Read more...

Tags: cpp, cpp11
Fork me on GitHub