#ifndef SRK31CXX_ROTATE_HPP_ #define SRK31CXX_ROTATE_HPP_ template inline Integral rotate_left(Integral val, unsigned n) { return (val << n) | (val >> ((sizeof (Integral) * 8) - (signed) n)); } template inline Integral rotate_right(Integral val, unsigned n) { return (val >> n) | (val << ((sizeof (Integral) * 8) - (signed) n)); } #endif