Left and right shift operators (<< and >>) are already available in C++. However, I couldn\'t find out how I could perform circular shift or rotate operations.
Definitively:
template T ror(T x, unsigned int moves) { return (x >> moves) | (x << sizeof(T)*8 - moves); }